单片机设计_车牌识别系统(STM32 OV7670 TFT)
生活随笔
收集整理的這篇文章主要介紹了
单片机设计_车牌识别系统(STM32 OV7670 TFT)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
想要更多項目私wo!!!
一、電路設計
? ? ? ? 此系統由STM32最小系統開發板、TFT液晶顯示模塊和OV7670攝像頭模塊組成的。
? ? ? ? 基于STM32+OV7670+TFT液晶屏。
車牌識別系統原理圖二、運行結果?
?三、部分代碼
#include "stm32f10x.h" #include "stm32f10x_it.h" #include "key.h" #include "usart.h" #include "delay.h" #include "lcd.h" #include "ov7670.h" #include "rcc.h" #include "ShowChar.h" #include "discern.h"extern vu8 Red_Vlaue, Green_Value ,Blue_Value;//閾值int main(void) { unsigned int scan_time = 0;STM32_Clock_Init(16); //初始化時鐘LCD_Init(); Key_Init(); //初始化 KEY1 PA8OV7670_GPIO_Init(); //OV7670引腳初始化,放在串口初始化前面//USART1_init(); //初始化串口 TIM3_Configuration(); //10Khz的計數頻率,計數到5000為500ms LCD_Fill(0x6666); while(!Sensor_Init());LCD_Fill(0xF800);delayms(100);scan_time = 2;//二值化閾值 Red_Vlaue = 24;Green_Value = 53;Blue_Value = 24;while(1){if(scan_time <= 1) {CameraDiscern(); //車牌識別}if(scan_time > 1) {CameraScan(); //攝像頭掃描測試LCD_ShowNum(30,220,21 - scan_time, 2); while(GPIO_ReadInputDataBit(KEY1_PORT,KEY1_PIN)==0) //按鍵按下{LCD_Fill(0x00); //黑屏Show_Title(); //顯示標題Show_Card(0); //顯示第幾組車牌Show_Card(1);Show_Card(2);Show_Card(3);Show_Card(4);delay_ms(5000);}}if(scan_time == 20) {scan_time = 0;}scan_time++;} }總結
以上是生活随笔為你收集整理的单片机设计_车牌识别系统(STM32 OV7670 TFT)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HTML5实现的经典播放器Winamp
- 下一篇: 【教程】VMware创建虚拟机教程