(This project is taken over by another project).
- Capture QCIF images.
- Cut out 128 x 128 pixel or 64 x 64 pixel images from QCIF for deep learning
As per the OV7670 datasheet, SCCB slave addresses are:
- 0x42 for write
- 0x43 for read
My HiLetgo OV7670 module returned the following ID over SCCB:
- Product ID: 0x76
- Version: 0x73
I faced a problem that void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi) is called every two HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mode, uint32_t pData, uint32_t Length) calls.
It took a whole day to determine the cause of the problem. OV7670 seems like outputing 172x144 pixels rather than 176x144.
I have developed an image viewer program in Python to capture an image with the device and to show it on my PC.
STM32L4 Discovery
...................
: :
[OV7670]----->[DCMI] [UASRT]------>[Python program on my PC]
: :
...................
I took a picture of myself. It seems like requiring calibraion on its color map.
I figured out the OV7670 register settings to aquire RGB565 color images, and I took a picture of tobacco pipe doll in QCIF format.
I bought a text book of image processing for college students, and implemented part of the algorithms in the book on STM32.
- OV7670 datasheet
- OV7670 implementation guide
- Serial Camera Control Bus Functional Specification
- Digital camera interface (DCMI) for STM32 MCUs
- STM32マイコンによるデジタルカメラの作成
- STM32マイコンでOV7670などとSCCB通信する際の注意点
- https://github.com/maslovk/STM32_OV7670/blob/master/Src/OV7670.c
- https://os.mbed.com/users/diasea/notebook/ov7670_FIFO_AL422B/
- https://thinksmallthings.wordpress.com/2012/11/03/ov7670-yuv-demystified/comment-page-1/
- https://ja.scribd.com/document/356160003/Beginning-Arduino-Ov7670-Camera-Development