导航:首页 > 文件教程 > 智能车摄像头教程

智能车摄像头教程

发布时间:2025-08-22 20:49:41

1. 求飞思卡尔智能车CCD摄像头程序

Main.c

#include <hidef.h> /* common defines and macros */
#include <mc9s12db128.h> /* derivative information */
#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);
/*----------------------------------------------------------------------------*\
receive_sci
\*----------------------------------------------------------------------------*/
unsigned char receive_sci(void) // receive data through sci
{ unsigned char sci_data;
while(SCI0SR1_RDRF!=1);
sci_data=SCI0DRL;
return sci_data;
}

/*----------------------------------------------------------------------------*\
transmit_sci
\*----------------------------------------------------------------------------*/
void transmit_sci(unsigned char transmit_data) // send data through sci
{
while(SCI0SR1_TC!=1);
while(SCI0SR1_TDRE!=1);
SCI0DRL=transmit_data;
}
/*****************************************************************************
***/
/*----------------------------------------------------------------------------*\
abs_sub
\*----------------------------------------------------------------------------*/
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 tycycle)
{
PWMDTY1=tycycle&0x00FF;
PWMDTY0=tycycle>>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;
}
}
}
}
/*----------------------------------------------------------------------------*\

这是第一届上海交通大学技术报告里面的.
智能车论坛里有很多.

2. 如何开始学习制作飞思卡尔摄像头智能车

我也准备做飞思卡尔的摄像头竞赛,对于摄像头,我也是才开始学,关于经验,还是有一些智能车方面的经验。
(1)智能车论坛上有最新的今年的技术报告,多看一看。
(2)不知道你们组好队了没有,组队也很关键,我觉得要有一人软件比较强,有想法,肯认认真真的去编写程序,耐得住枯燥乏味,耐得住寂寞。还有有一个人擅长硬件,关于车体的改装,PCB的绘制,电路板的制作,硬件问题的解决等等。另外一个人就要软硬都会,充当一个权衡点。到了后期,大家可能都要去看程序,去调车,因为硬件固定后就基本不动了;
(3)多请教你们学校的参加过竞赛的学长,他们的建议,可以让你们少走很多弯路
(4)对于摄像头的相关知识多下载资料,多看,提前多了解
(5)往年的视频可以多看看,从中你可以发现他们跑的好的车的一些算法,一些技巧,以及对某些赛道的处理方法。
以上都是个人的一些建议,希望对你有用

阅读全文

与智能车摄像头教程相关的资料

热点内容
java读取文件名 浏览:877
accessql怎么转换数据 浏览:139
手机文件保密柜可以收纳多少照片 浏览:300
相机相片怎么修改文件名 浏览:587
vb分支结构程序设计 浏览:134
智能车摄像头教程 浏览:869
mac如何删除移动硬盘里的文件 浏览:258
joomla视频教程 浏览:470
网页中css文件怎么打开 浏览:578
数控网络编程是什么 浏览:737
百度云能同时上传多少个文件 浏览:504
编程特长班有哪些项目 浏览:977
文件夹里面一般都是pdf还是word 浏览:110
编程语言有哪些种类各有何特点 浏览:611
win10如何设置d盘文件名 浏览:833
3寸锥度管牙怎么编程 浏览:867
苹果手机短信发送文件 浏览:172
js简单的游戏代码下载 浏览:354
git把文件夹 浏览:514
为什么手机qq没声音了 浏览:658

友情链接