freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

飛思卡爾智能車(chē)競(jìng)賽光電組技術(shù)報(bào)告(編輯修改稿)

2025-04-05 07:59 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 { *pixel_pt++ = 0。 } StartIntegration()。//預(yù)曝光 EnableInterrupts。//開(kāi)中斷 for(。) { //SpeedControl()。 MotorAction(10)。 //key_scan()。//鍵盤(pán)掃描 if(TimerFlag10ms == 1) { TimerFlag10ms = 0。//清 10ms 標(biāo)志 t++。 if(t =5) { t = 0。 18 SendImageData(PixNew)。 } : 在實(shí)際測(cè)試和比賽之中, CCD 接收到的信息往往伴隨著許多雜點(diǎn),那么就要削減這些雜點(diǎn)對(duì)計(jì)算的影響,我們采用了高斯濾波去除錯(cuò)誤點(diǎn)并實(shí)現(xiàn)曲化采集到的賽道信息點(diǎn),為判斷出黑線邊界我們又對(duì) 數(shù)據(jù)進(jìn)行了二值化,以獲取賽道的邊緣線。同時(shí)為了盡量減少 CCD的曝光時(shí)間我們隊(duì) CPU 的執(zhí)行進(jìn)行了順序化。最后達(dá)到獲取賽道的信息。二值化的閾值在這里用了動(dòng)態(tài)閾值,大大克服了 CCD 對(duì)環(huán)境的光亮強(qiáng)的狹小范圍內(nèi)依賴(lài)程度搞得高的缺點(diǎn)、 ,去噪點(diǎn) void Enosing(uchar *a) { char i。 for(i=1。i127。i++) { if(a[i]==0) { if((a[i1]==1)amp。amp。(a[i+1]==1)) { a[i]=1。 } } if(a[i]==1) { if((a[i1]==0)amp。amp。(a[i+1]==0)) { a[i]=0。 } 19 } } } 計(jì)算動(dòng)態(tài)閾值 void trends_threshold(uchar *a) { unsigned char i,j,zmax=0,zmin=255,zbmax=0,zbmin=255,zamax=0,zamin=255,t0,t1,za,zb。 for(i=0。irow。i++) { for(j=0。jcolumn。j++) { if(a[j]zmax) { zmax=a[j]。 } if(a[j]zmin) { zmin=a[j]。 } } } t0=(zmax+zmin)/2。 if(Threshold!=t0) { for(j=0。jcolumn。j++) { if(a[j]=t0) { if(a[j]zamax) 20 { zamax=a[j]。 } if(a[j]zamin) { zamin=a[j]。 } } else { if(a[j]zbmax) { zbmax=a[j]。 } if(a[j]zbmin) { zbmin=a[j]。 } } } za=(zamax+zamin)/2。 zb=(zbmax+zbmin)/2。 t1=(za+zb)/2。 if(t1!=t0) t0=t1。 } Threshold=t1。 } 21 獲取賽道信息;通過(guò)對(duì)左丟線還是右丟線來(lái)判別車(chē)體偏離中心線的程度。 uchar RightLostCnt,LeftLostCnt。 void Getline2 (uchar *a) { uchar i。 uchar LeftLostFlog=1,RightLostFlog=1。 for(i=2。i124。i++) { if(abs(a[i]a[i+2])Threshold) { if(abs(a[i1]a[i+3])amp。amp。abs(a[i2]a[i+4])) { if(a[i]a[i+2]) { LeftPot=i+1。 LeftLostFlog=0。 LeftLostCnt=0。 } if(a[i]a[i+2]) { RightPot=i+1。 RightLostFlog=0。 RightLostCnt=0。 } } } } if((LeftLostFlog==0)amp。amp。(RightLostFlog==0)) 22 RaceFlog=NotLost。 else if(LeftLostFlog==0) { RightLostCnt++。 RaceFlog=RightLost。 } else if(RightLostFlog==0) { LeftLostCnt++。 RaceFlog=LeftLost。 } else RaceFlog=AllLost。 策略 。 轉(zhuǎn)向控制信號(hào)的源輸入控制信號(hào)源自 CPU 對(duì)編碼器信息和傳感器 CCD 信息經(jīng)過(guò)一系 PID 計(jì)算分別對(duì)電機(jī)控制模塊輸出當(dāng)前小車(chē)狀態(tài)下 賽道對(duì)電機(jī)運(yùn)轉(zhuǎn)的要求。 提取賽道信息 : float Direction_P。 float Direction_D。 float DirectionError0,DirectionError1,DirectionDiff。 //0 當(dāng)前差值, 1 上次差值 int DirectionOut。 void DirectionControl1(void) { float fP,fD。 float BorderCom。//丟線補(bǔ)償量 23 float BorderError。//丟線偏差 //取中線偏差 if(RaceFlog==NotLost) { Centerpot=(LeftPot+RightPot)/2。 DirectionError0=CenterpotLineCenter。 } else if (RaceFlog==RightLost) { BorderError=LeftPot。 BorderCom=Borde
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1