




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、倒車軌跡理論實(shí)現(xiàn)方法 帥文 王文梁關(guān)鍵字:倒車軌跡 視角轉(zhuǎn)換 前言:倒車軌跡是近兩年部分國(guó)產(chǎn)汽車導(dǎo)航設(shè)備上新消滅的一個(gè)功能,其借助方向盤轉(zhuǎn)角信息將汽車可能的后退路線疊加到后視攝像頭的輸出上并標(biāo)注出距離,以直觀形象化的形式幫忙駕駛?cè)藛T調(diào)整選擇倒車路線,削減駕駛?cè)藛T特殊是新手的誤推斷,對(duì)使用者是一個(gè)不錯(cuò)的有用功能。倒車軌跡
2、在智能倒車領(lǐng)域內(nèi)屬于幫助倒車系統(tǒng)中的一種,雖然其還無法達(dá)到智能化倒車,但是其有用性和幫助性上對(duì)汽車智能化單元技術(shù)方面是一個(gè)有效的補(bǔ)充。本文將基于使用為目的,從閱歷角度并結(jié)合基本數(shù)學(xué)推導(dǎo)分析倒車軌跡的原理、實(shí)現(xiàn)過程并給出實(shí)際使用過程中需要的操作點(diǎn)。由于本文非側(cè)重于數(shù)學(xué)理論,對(duì)部分?jǐn)?shù)學(xué)細(xì)節(jié)在不影響實(shí)際結(jié)論狀況下不做深化探討。一 倒車軌跡的基本原理 從日常閱歷可知,以自行車為例,假如前輪有肯定轉(zhuǎn)角,在維持轉(zhuǎn)角不變狀態(tài)和無軸向移動(dòng)前提下自行車走過的路徑將會(huì)以某個(gè)圓點(diǎn)為中心旋轉(zhuǎn),同樣的狀態(tài)也會(huì)消滅在汽車上。其走過路徑如圖1。圖中假設(shè)車輪不會(huì)消滅軸向移動(dòng),故假如保持車輪轉(zhuǎn)角
3、不變的狀況下,每個(gè)車輪只能沿著垂直其車軸的方向行進(jìn),這里取前后輪的軸心作為軌跡跟蹤點(diǎn)(實(shí)際過程中兩個(gè)前輪軸心不會(huì)消滅平行),則軌跡應(yīng)當(dāng)是以前后輪軸向線的焦點(diǎn)為圓心的圓。圖中為為前輪同水平方向的夾角,記前后輪軸距為L(zhǎng),后輪軸長(zhǎng)為W,后輪距離車尾的距離為D,從幾何關(guān)系可知,后輪軸心的運(yùn)動(dòng)軌跡可以描述為以半徑Lcot()的圓周運(yùn)動(dòng)。兩個(gè)后輪的軌跡分別為L(zhǎng)cot()-W/2和Lcot()+W/2的圓。這里的推導(dǎo)過程接受閱歷法結(jié)合幾何推算,完全從數(shù)學(xué)角度的推算過程請(qǐng)參考資料1。圖中的x方向和y方向不同于一般習(xí)慣主要是考慮后面的視角變換。從等式可以看到,當(dāng)接近0度時(shí)候行進(jìn)軌跡近似直線,接近90度時(shí)半徑呈縮
4、小趨勢(shì),符合我們?nèi)粘i啔v值。二 視角轉(zhuǎn)換 從倒車公式推導(dǎo)出的路線圖為行進(jìn)路線的俯視圖,實(shí)際顯示給操作者的路線應(yīng)當(dāng)是從車內(nèi)觀看點(diǎn)觀看到的軌跡,駕駛?cè)藛T看到的運(yùn)動(dòng)軌跡實(shí)際為以車尾攝像頭為中心點(diǎn)坐標(biāo)的圖像描述(圖一中車尾位置的原點(diǎn))。將攝像頭位置定為坐標(biāo)零點(diǎn),則軌跡上的任意點(diǎn)位置公式為:(x+Lcot())2+(y+D)2=(Lcot()2 (1)上面推導(dǎo)的軌跡仍舊是基于俯視條件下的軌跡,看到的應(yīng)當(dāng)為處于肯定視角觀看的軌跡,故需要進(jìn)行肯定角度的轉(zhuǎn)換才能切換到實(shí)際觀看到的圖像。假設(shè)攝像頭的可視角范圍為
5、2,攝像頭距離地面h,攝像頭中心線同水平面的夾角為,輸出屏幕的高度為H,這里假設(shè)攝像頭相對(duì)于屏幕為一個(gè)點(diǎn),會(huì)造成實(shí)際計(jì)算結(jié)果的肯定偏差,關(guān)于偏差的細(xì)節(jié)數(shù)學(xué)計(jì)算不屬本文爭(zhēng)辯的重點(diǎn)。我們實(shí)際觀看到的Yr為地面y在顯示屏H上的投影,y方向的轉(zhuǎn)換過程如圖二:上圖中為了便于計(jì)算,將經(jīng)過攝像頭采集后輸出的顯示器直接投影到同一個(gè)圖中,這和實(shí)際輸出沒有區(qū)分。上圖中的虛線為水平線,點(diǎn)線為屏幕的中心點(diǎn)到攝像頭的連線,為中心線和水平線的夾角將上圖進(jìn)行簡(jiǎn)化可轉(zhuǎn)為下列數(shù)學(xué)問題,等腰三角形中同頂點(diǎn)成已知角度所對(duì)應(yīng)的邊長(zhǎng),簡(jiǎn)化后的計(jì)算如圖三。Yr對(duì)應(yīng)的角度為+-,其中=arctg(h/y) 通過幾何運(yùn)算可得:三&
6、#160;計(jì)算軌跡的條件從以上計(jì)算我們可以看到,需要計(jì)算出軌跡,必需供應(yīng)以下參數(shù):1 攝像頭的可視角范圍2a2 攝像頭距離地面距離h3 攝像頭中心線同水平面的夾角4 輸出屏幕的高度H和寬帶W5 汽車前后輪軸距L6 汽車軸長(zhǎng)W,后輪距離車尾的距離D7 前輪同水平方向的夾角以上參數(shù)中除轉(zhuǎn)角外對(duì)于固定的車型和安裝方式都已經(jīng)固定,轉(zhuǎn)角的獵取可以有兩種方式:1 對(duì)于有方向盤角度信息的車型可以直接通過輸出接口如can總線獵取。2外加角度傳感器獵取角度信息。兩種方式都需要對(duì)采集的信息作肯定的校正。 四 驗(yàn)證 將上面公
7、式的2和3帶入1,可推導(dǎo)出顯示屏幕上的實(shí)際軌跡圖像。我們用vc實(shí)現(xiàn)了過程模擬,程序流程圖四,模擬結(jié)果如圖五。在真實(shí)的嵌入式平臺(tái)上實(shí)現(xiàn)需要該平臺(tái)支持圖像疊加功能,目前很多多媒體soc芯片都能具備硬件融合功能,可以便利的將描繪出的軌跡疊加到攝像頭的輸入信號(hào)上,對(duì)于角度信息的采集,則要求平臺(tái)有can總線接口(部分車型可以輸出角度信息)或外加角度傳感器接口獵取車輪轉(zhuǎn)角。五 結(jié)論:從驗(yàn)證狀況看,結(jié)果和閱歷吻合,證明算法的主要正確性。一些細(xì)節(jié)信息需要針對(duì)具體的實(shí)現(xiàn)平臺(tái)進(jìn)行微調(diào)。以上算法對(duì)于下列場(chǎng)景無法解決,假如路面有斜坡由于整個(gè)系統(tǒng)無法感知而導(dǎo)致疊加圖像有誤,當(dāng)?shù)管囁俣冗^快(如漂移)
8、會(huì)造成上述公式整體失效,但是對(duì)于一般用戶場(chǎng)景-低速、路面相對(duì)平整還是主要場(chǎng)合,故將參數(shù)校準(zhǔn)后會(huì)有較好的參考價(jià)值。/ BackTrack.h: interface for the CBackTrack class. / / #if !defined(AFX_BACKTRACK_H_EAF4E3A8_3691_44DA_A864_72658056A1D9_INCLUDED_) #define AFX_BACKTRACK_H_EAF4E3A8_3691_44DA_A864_72658056A1D9_INCLUDED_ #if _MSC_VER > 1000 #pragma once #endi
9、f / _MSC_VER > 1000 #include "RearCalibration.h" /* struct Mypoint int x; int y; ; typedef struct Mypoint MyPoint; */ class CBackTrack public: bool InitObject(CRearCalibration *pCali, float fAngle,float fAxleDist,float fWheelDist,int lWidth, int lHeight); void DrawExtendSpot(unsigned ch
10、ar *lpDIBBits, int lWidth, int lHeight, bool bInverse=false); void DrawExtendTrack(unsigned char *lpDIBBits, int lWidth, int lHeight); void DrawBackSpot(unsigned char *lpDIBBits, int lWidth, int lHeight); void DrawBackTrack(unsigned char *lpDIBBits, int lWidth, int lHeight, bool bInverse=false); /*
11、void Way2_Back_Track_Draw(char *lpDIBBits, int lWidth, int lHeight); void Back_Track_Draw(char *lpDIBBits, int lWidth, int lHeight); void Calibration_Track_Draw(CRearCalibration *pCali,char *lpDIBBits, int lWidth, int lHeight); void GetBackTrackDraw(CRearCalibration *pCali,char *lpDIBBits, int lWidt
12、h, int lHeight, float fAngle); */ void DrawTrack(unsigned char *lpDIBBits, int lWidth, int lHeight); CBackTrack(); virtual CBackTrack(); private: void InverseBmp(unsigned char *lpDIBBits, int lWidth, int lHeight); CRearCalibration *m_pCali; float m_fAngle; float m_VBack; int m_iTlong; int m_step; vo
13、id GetExtendUV(); void ComputerExtendXY(); void GetTfromView(int lWidth, int lHeight); void ComputerXY(); void ComputerUV(); CPoint GetUfromVofExtend(short v); CPoint GetUfromV(short v); void GetMarkXU(); short RelationYV(short v); int m_iNT; int m_iFT; float m_fLX40; float m_fLY40; float m_fRX40; f
14、loat m_fRY40; float m_fLeX40; float m_fLeY40; float m_fReX40; float m_fReY40; int m_iLU40; int m_iLV40; int m_iRU40; int m_iRV40; int m_iLeU40; int m_iLeV40; int m_iReU40; int m_iReV40; float m_LRearAxle; float m_LRearWheel; int m_U1288,m_U2288; ; #endif / !defined(AFX_BACKTRACK_H_EAF4E3A8_3691_44DA
15、_A864_72658056A1D9_INCLUDED_) / BackTrack.cpp: implementation of the CBackTrack class. / / #include "stdafx.h" #include "BackTrack.h" #include "math.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE=_FILE_; #define new DEBUG_NEW #endif / / Construction/Destruction
16、 / CBackTrack:CBackTrack() m_VBack = 0.1f; m_LRearAxle = 0; m_LRearWheel = 0; m_iTlong = 0; GetMarkXU(); CBackTrack:CBackTrack() / /分步驟進(jìn)行編程 /* void CBackTrack:GetTfromView() /float VBack = 138.9; / 相機(jī)視野的最近點(diǎn)和最遠(yuǎn)點(diǎn)距離汽車后軸的距離,Ny要大于100,由于現(xiàn)在假定相機(jī)安裝在后軸中心,故先付值100 int Ny,Fy; Ny = 100; Fy = 330; / 中間變量 float a,b
17、; int t; /推斷分母中為零的項(xiàng),a不行能為零,由于前軸中心的轉(zhuǎn)向角永久小于50度 if( sin(m_fAngle) != 0 ) a = m_LRearAxle / (float)(tan (m_fAngle) - m_LRearWheel / 2; b = m_LRearAxle / m_VBack / (float)(sin (m_fAngle); m_iNT = (int)(b * (float)(asin ( Ny / a) + 0.5f); m_iFT = (int)(b * (float)(asin ( Fy / a) + 0.5f); /當(dāng)這兩項(xiàng)為零時(shí),車輛沒有倒車,因
18、此可以只把后輪的延長(zhǎng)線畫出 else m_iNT = (int)(Ny/m_VBack + 0.5f); m_iFT = (int)(Fy/m_VBack + 0.5f); / computer time jump step m_step = (m_iFT - m_iNT) / 30; m_iTlong = 0; for( t = m_iNT; t m_iFT; t = t + m_step) m_iTlong + ; */ void CBackTrack:GetTfromView(int lWidth, int lHeight) /float VBack = 138.9; / 相機(jī)視野的最近
19、點(diǎn)和最遠(yuǎn)點(diǎn)距離汽車后軸的距離,Ny要大于100,由于現(xiàn)在假定相機(jī)安裝在后軸中心,故先付值100 int Ny,Fy; Ny = 100; Fy = 380; / 中間變量 /float a,b; int t; CPoint pl,pr; m_iNT = (int)(Ny/m_VBack + 0.5f); m_iFT = (int)(Fy/m_VBack + 0.5f); /* float a,b; a = m_LRearAxle / (float)tan (m_fAngle); b = m_LRearAxle / m_VBack / (float)sin (m_fAngle); do m_fL
20、X0 = -(a - m_LRearWheel / 2) * (float)(cos(m_iNT / b) + a; m_fLY0 = (a- m_LRearWheel / 2) * (float)(sin(m_iNT / b); pl = m_pCali->GetUVfromXY( m_fLX0, m_fLY0); m_fRX0 = -(a+m_LRearWheel / 2) * (float)(cos(m_iNT / b) + a; m_fRY0 = (a+ m_LRearWheel / 2)* (float)(sin(m_iNT / b); pr = m_pCali->Get
21、UVfromXY( m_fRX0, m_fRY0); m_iNT +; while( pl.x 1 | pl.y 1 | pr.x 1 | pr.y 1); do m_fLX0 = -(a - m_LRearWheel / 2) * (float)(cos(m_iFT / b) + a; m_fLY0 = (a- m_LRearWheel / 2) * (float)(sin(m_iFT / b); pl = m_pCali->GetUVfromXY( m_fLX0, m_fLY0); m_fRX0 = -(a+m_LRearWheel / 2) * (float)(cos(m_iFT
22、/ b) + a; m_fRY0 = (a+ m_LRearWheel / 2)* (float)(sin(m_iFT / b); pr = m_pCali->GetUVfromXY( m_fRX0, m_fRY0); m_iFT -; while( pl.x > lWidth | pl.y > lHeight | pr.x > lWidth | pr.y > lHeight); */ / computer time jump step m_step = (m_iFT - m_iNT) / 38; m_iTlong = 0; for( t = m_iNT; t m
23、_iFT; t = t + m_step) m_iTlong + ; /* ComputerXY() 計(jì)算倒車軌跡點(diǎn) 參數(shù)是方向盤轉(zhuǎn)角,此處暫為前軸中心點(diǎn)的轉(zhuǎn)角 */ void CBackTrack:ComputerXY() float a,b; a = m_LRearAxle / (float)(tan (m_fAngle); b = m_VBack * (float)(sin (m_fAngle) / m_LRearAxle; int t; int l = 0; for ( t = m_iNT ; t m_iFT ; t = t + m_step) / left rear wheel ba
24、ck track m_fLX l = - ( a - m_LRearWheel / 2) * (float)(cos ( b * t ) + a; m_fLY l = ( a - m_LRearWheel / 2) * (float)(sin( b * t ); / right rear wheel back track m_fRX l = - ( a + m_LRearWheel / 2) * (float)(cos ( b * t ) + a; m_fRY l = ( a + m_LRearWheel / 2) * (float)(sin( b * t ); l+; /* 車輛后輪延長(zhǎng)線,
25、無論方向盤轉(zhuǎn)角等參數(shù)如何變, 延長(zhǎng)線上的點(diǎn)是不變的,因此可分開來寫,尤其是當(dāng)前軸 中心點(diǎn)的轉(zhuǎn)角為零時(shí),在圖像上只顯示后輪延長(zhǎng)線,因此需要 單獨(dú)寫出來 */ void CBackTrack:ComputerExtendXY() int t; int l = 0; for(t = m_iNT ; t m_iFT ; t = t + m_step) / left rear wheel extend m_fLeX l = m_LRearWheel / 2; m_fLeY l = t*m_VBack; / right rear wheel extend m_fReX l = - m_LRearWheel
26、 / 2; m_fReY l = m_fLeY l ; l+; void CBackTrack:ComputerUV() int t; int l = 0; CPoint p; for( t = m_iNT ; t m_iFT ; t = t + m_step) / left rear wheel back track in image p = m_pCali->GetUVfromXY( m_fLXl, m_fLYl); m_iLUl = p.x; m_iLVl = p.y; /right rear wheel back track in image p = m_pCali->Ge
27、tUVfromXY( m_fRXl, m_fRYl); m_iRUl = p.x; m_iRVl = p.y; l+; void CBackTrack:GetExtendUV() int t; int l = 0; CPoint p; for( t = m_iNT ; t m_iFT ; t = t + m_step) / left rear wheel extend in image p = m_pCali->GetUVfromXY( m_fLeXl, m_fLeYl); m_iLeUl = p.x; m_iLeVl = p.y; / right rear wheel extend i
28、n image p = m_pCali->GetUVfromXY( m_fReXl, m_fReYl); m_iReUl = p.x; m_iReVl = p.y; l+; void CBackTrack:DrawBackSpot(unsigned char *lpDIBBits, int lWidth, int lHeight) int t ; long lLineBytes = WIDTHBYTES(lWidth * 8); for( t = 0 ; t m_iTlong ; t +) / left wheel track spot *(unsigned char *)lpDIBBi
29、ts + lLineBytes * m_iLVt + m_iLUt) = 255; *(unsigned char *)lpDIBBits + lLineBytes * (m_iLVt -1) + m_iLUt) = 255; *(unsigned char *)lpDIBBits + lLineBytes * (m_iLVt +1) + m_iLUt) = 255; *(unsigned char *)lpDIBBits + lLineBytes * m_iLVt + m_iLUt -1) = 255; *(unsigned char *)lpDIBBits + lLineBytes * m
30、_iLVt + m_iLUt + 1) = 255; / right wheel track spot *(unsigned char *)lpDIBBits + lLineBytes * m_iRVt + m_iRUt) = 255; *(unsigned char *)lpDIBBits + lLineBytes * (m_iRVt -1) + m_iRUt) = 255; *(unsigned char *)lpDIBBits + lLineBytes * (m_iRVt +1) + m_iRUt) = 255; *(unsigned char *)lpDIBBits + lLineBy
31、tes * m_iRVt + m_iRUt -1) = 255; *(unsigned char *)lpDIBBits + lLineBytes * m_iRVt + m_iRUt + 1) = 255; void CBackTrack:DrawExtendSpot(unsigned char *lpDIBBits, int lWidth, int lHeight, bool bInverse) if(bInverse) InverseBmp(lpDIBBits,lWidth,lHeight); int t ; long lLineBytes = WIDTHBYTES(lWidth * 8)
32、; for( t = 0 ; t m_iTlong ; t +) / left wheel track spot *(unsigned char *)lpDIBBits + lLineBytes * m_iLeVt + m_iLeUt) = 255; *(unsigned char *)lpDIBBits + lLineBytes * (m_iLeVt -1) + m_iLeUt) = 255; *(unsigned char *)lpDIBBits + lLineBytes * (m_iLeVt +1) + m_iLeUt) = 255; *(unsigned char *)lpDIBBit
33、s + lLineBytes * m_iLeVt + m_iLeUt -1) = 255; *(unsigned char *)lpDIBBits + lLineBytes * m_iLeVt + m_iLeUt + 1) = 255; / right wheel track spot *(unsigned char *)lpDIBBits + lLineBytes * m_iReVt + m_iReUt) = 255; *(unsigned char *)lpDIBBits + lLineBytes * (m_iReVt -1) + m_iReUt) = 255; *(unsigned ch
34、ar *)lpDIBBits + lLineBytes * (m_iReVt +1) + m_iReUt) = 255; *(unsigned char *)lpDIBBits + lLineBytes * m_iReVt + m_iReUt -1) = 255; *(unsigned char *)lpDIBBits + lLineBytes * m_iReVt + m_iReUt + 1) = 255; if(bInverse) InverseBmp(lpDIBBits,lWidth,lHeight); void CBackTrack:DrawBackTrack(unsigned char
35、 *lpDIBBits, int lWidth, int lHeight, bool bInverse) if(bInverse) InverseBmp(lpDIBBits,lWidth,lHeight); int t,tj ; float k ; int U,offset; long lLineBytes = WIDTHBYTES(lWidth * 8); for( t = 0 ; t m_iTlong - 1 ; t +) / draw left wheel back track k = (float) ( m_iLU t - m_iLU t + 1 ) / (float) ( m_iLV
36、 t - m_iLV t + 1 ); if( m_iLV t m_iLV t + 1 ) for ( tj = m_iLV t ; tj m_iLV t + 1 ; tj+) offset = lLineBytes * tj; U = (int) (m_iLU t - k * (m_iLV t - tj); if( U lWidth - 1 && tj lHeight - 1 && tj >1 && U >1 ) *(unsigned char *)lpDIBBits + offset + U) = 255; *(unsigned
37、char *)lpDIBBits + offset - lLineBytes + U) = 255; *(unsigned char *)lpDIBBits + offset + lLineBytes + U) = 255; *(unsigned char *)lpDIBBits + offset + U +1) = 255; *(unsigned char *)lpDIBBits + offset + U -1) = 255; else if( m_iLV t > m_iLV t + 1 ) for ( tj = m_iLV t ; tj > m_iLV t + 1 ; tj-)
38、 offset = lLineBytes * tj; U = (int) (m_iLU t - k * (m_iLV t - tj); if( U lWidth - 1 && tj lHeight - 1 && tj >1 && U >1 ) *(unsigned char *)lpDIBBits + offset + U) = 255; *(unsigned char *)lpDIBBits + offset - lLineBytes + U) = 255; *(unsigned char *)lpDIBBits + offset
39、+ lLineBytes + U) = 255; *(unsigned char *)lpDIBBits + offset + U +1) = 255; *(unsigned char *)lpDIBBits + offset + U -1) = 255; / draw right wheel back track k = (float) ( m_iRU t - m_iRU t + 1 ) / (float) ( m_iRV t - m_iRV t + 1 ); if( m_iRV t m_iRV t + 1 ) for ( tj = m_iRV t ; tj m_iRV t + 1 ; tj
40、+) offset = lLineBytes * tj; U = (int) (m_iRU t - k * (m_iRV t - tj); if( U lWidth - 1 && tj lHeight - 1 && tj >1 && U >1 ) *(unsigned char *)lpDIBBits + offset + U) = 255; *(unsigned char *)lpDIBBits + offset - lLineBytes + U) = 255; *(unsigned char *)lpDIBBits + offse
41、t + lLineBytes + U) = 255; *(unsigned char *)lpDIBBits + offset + U +1) = 255; *(unsigned char *)lpDIBBits + offset + U -1) = 255; else if( m_iRV t > m_iRV t + 1 ) for ( tj = m_iRV t ; tj > m_iRV t + 1 ; tj-) offset = lLineBytes * tj; U = (int) (m_iRU t - k * (m_iRV t - tj); if( U lWidth - 1 &
42、amp;& tj lHeight - 1 && tj >1 && U >1 ) *(unsigned char *)lpDIBBits + offset + U) = 255; *(unsigned char *)lpDIBBits + offset - lLineBytes + U) = 255; *(unsigned char *)lpDIBBits + offset + lLineBytes + U) = 255; *(unsigned char *)lpDIBBits + offset + U +1) = 255; *(unsigne
43、d char *)lpDIBBits + offset + U -1) = 255; if(bInverse) InverseBmp(lpDIBBits,lWidth,lHeight); void CBackTrack:DrawExtendTrack(unsigned char *lpDIBBits, int lWidth, int lHeight) int t ,tj; float k ; int V; long lLineBytes = WIDTHBYTES(lWidth * 8); for( t = 0 ; t m_iTlong - 1 ; t +) / draw left wheel
44、extend track if( m_iLeU t > m_iLeU t + 1 ) for ( tj = m_iLeU t ; tj > m_iLeU t + 1 ; tj-) k = (float) ( m_iLeV t - m_iLeV t + 1 ) / (float) ( m_iLeU t - m_iLeU t + 1 ); V = (int) ( k * tj + m_iLeV t - k * m_iLeU t ); if( tj lWidth - 1 && V lHeight - 1 && tj >1 && V &
45、gt;1 ) *(unsigned char *)lpDIBBits + lLineBytes * V + tj) = 255; *(unsigned char *)lpDIBBits + lLineBytes * ( V - 1 ) + tj) = 255; *(unsigned char *)lpDIBBits + lLineBytes * (V + 1) + tj) = 255; *(unsigned char *)lpDIBBits + lLineBytes * V + tj +1) = 255; *(unsigned char *)lpDIBBits + lLineBytes * V
46、 + tj -1) = 255; else for ( tj = m_iLeU t ; tj m_iLeU t + 1 ; tj+) k = (float) ( m_iLeV t - m_iLeV t + 1 ) / (float) ( m_iLeU t - m_iLeU t + 1 ); V = (int) ( k * tj + m_iLeV t - k * m_iLeU t ); if( tj lWidth - 1 && V lHeight - 1 && tj >1 && V >1 ) *(unsigned char *)lpDI
47、BBits + lLineBytes * V + tj) = 255; *(unsigned char *)lpDIBBits + lLineBytes * ( V - 1 ) + tj) = 255; *(unsigned char *)lpDIBBits + lLineBytes * (V + 1) + tj) = 255; *(unsigned char *)lpDIBBits + lLineBytes * V + tj +1) = 255; *(unsigned char *)lpDIBBits + lLineBytes * V + tj -1) = 255; / draw right
48、 wheel extend track if( m_iReU t > m_iReU t + 1 ) for ( tj = m_iReU t ; tj > m_iReU t + 1 ; tj-) k = (float) ( m_iReV t - m_iReV t + 1 ) / (float) ( m_iReU t - m_iReU t + 1 ); V = (int) ( k * tj + m_iReV t - k * m_iReU t ); if( tj lWidth - 1 && V lHeight - 1 && tj >1 &&a
49、mp; V >1 ) *(unsigned char *)lpDIBBits + lLineBytes * V + tj) = 255; *(unsigned char *)lpDIBBits + lLineBytes * ( V - 1 ) + tj) = 255; *(unsigned char *)lpDIBBits + lLineBytes * (V + 1) + tj) = 255; *(unsigned char *)lpDIBBits + lLineBytes * V + tj +1) = 255; *(unsigned char *)lpDIBBits + lLineBytes * V + tj -1) = 255; else for ( tj = m_iReU t ; tj m_iReU t + 1 ; tj+) k = (float) ( m_iReV t - m_iReV t + 1
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年MySQL考試報(bào)名須知試題及答案
- 世界著名工程機(jī)械設(shè)備智能工程機(jī)械運(yùn)用技術(shù)專業(yè)國(guó)家級(jí)教學(xué)19
- 高考作文探索人文情懷的主題及答案
- 財(cái)務(wù)成本管理專項(xiàng)訓(xùn)練試題及答案
- 2025酒店健身房承包經(jīng)營(yíng)合同
- 多樣化學(xué)習(xí)的計(jì)算機(jī)二級(jí)Msoffice試題及答案
- 財(cái)務(wù)分析中的邏輯推理與判斷試題及答案
- 經(jīng)濟(jì)法與社會(huì)經(jīng)濟(jì)的互動(dòng)關(guān)系試題及答案
- 2025年MySQL考試主要考察點(diǎn)試題及答案
- 2025市區(qū)商業(yè)店鋪?zhàn)赓U合同
- 中國(guó)郵政集團(tuán)有限公司國(guó)企招聘筆試真題2024
- 社會(huì)福利 課件匯 高和榮 第6-11章 社會(huì)福利客體-社會(huì)福利的挑戰(zhàn)
- 《銷售區(qū)域管理》課件
- 2025年安徽合肥東部新中心建設(shè)管理辦公室招聘2人歷年高頻重點(diǎn)模擬試卷提升(共500題附帶答案詳解)
- 《井工煤礦職業(yè)病防治》培訓(xùn)課件2025
- uni-app移動(dòng)應(yīng)用開發(fā)課件 7-智慧環(huán)保項(xiàng)目
- 2025年江蘇南通市通州區(qū)水務(wù)有限公司及下屬子公司招聘筆試參考題庫(kù)附帶答案詳解
- 音樂可視化藝術(shù)-洞察分析
- GB/T 2812-2024頭部防護(hù)通用測(cè)試方法
- 心肌三項(xiàng)臨床意義
- 校長(zhǎng)履職“校園餐”主體責(zé)任述職報(bào)告:全心致力于保障全體師生的飲食安全與營(yíng)養(yǎng)健康
評(píng)論
0/150
提交評(píng)論