第六届飞思卡尔智能车大赛摄像头组用的什么摄像头
答案:2 悬赏:20 手机版
解决时间 2021-02-06 22:09
- 提问者网友:聂風
- 2021-02-06 18:24
第六届飞思卡尔智能车大赛摄像头组用的什么摄像头
最佳答案
- 五星知识达人网友:一叶十三刺
- 2021-02-06 19:52
HQ7620 或 OV7620
全部回答
- 1楼网友:爱难随人意
- 2021-02-06 20:24
main.c #include <hidef.h> #include <mc9s12db128.h> #pragma link_info derivative "mc9s12db128b" #include "define.h" #include "init.h" // variable used in video process volatile unsigned char image_data[row_max][line_max] ; // data array of picture unsigned char black_x[row_max] ; // 0ne-dimensional array unsigned char row ; // x-position of the array unsigned char line ; // y-position of the array unsigned int row_count ; // row counter unsigned char line_sample ; // used to counter in ad unsigned char row_image ; unsigned char line_temp ; // temperary variable used in data transfer unsigned char sample_data[line_max] ; // used to save one-dimension array got in interruption // variables below are used in speed measure unsigned char pulse[5] ; // used to save data in pa process unsigned char counter; // temporary counter in speed detect unsigned char cur_speed; // current speed short stand; short data; unsigned char curve ; // valve used to decide straight or turn short bounds(short data); short fuzzylogic(short stand); unsigned char receive_sci(void) // receive data through sci { unsigned char sci_data; while(sci0sr1_rdrf!=1); sci_data=sci0drl; return sci_data; } void transmit_sci(unsigned char transmit_data) // send data through sci { while(sci0sr1_tc!=1); while(sci0sr1_tdre!=1); sci0drl=transmit_data; } unsigned char abs_sub(unsigned char num1, unsigned char num2) { unsigned char difference; if(num1>=num2){ difference=num1-num2; }else{ difference=num2-num1; } return difference; } void pwm_set(unsigned int dutycycle) { pwmdty1=dutycycle&0x00ff; pwmdty0=dutycycle>>8; } void get_black_wire(void) // used to extract black wire { unsigned char i; for(row=0;row<row_max;row++){ for(line=line_min;line<line_max-3;line++){ if(image_data[row][line]>image_data[row][line+3]+valve){ for(i=3;i<10;i++){ if(image_data[row][line+i]+valve<image_data[row][line+i+3]){ black_x[row]=line+i/2+2; i=10; } } line=line_max; } else{ //black_x[row]=(black_x[row]/45)*78; } } } } /*----------------------------------------------------------------------------*\ 这是第一届上海交通大学cybersmart技术报告里面的. 智能车论坛里有很多.
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯