Project Background
This project used an STM32H743 platform and an OV9281 monochrome global-shutter image sensor. The goal was to acquire 480x480 RAW8 images, display them on a 5-inch LCD, improve image quality, detect a bright spot, and show coordinates on the screen.
Applicable Scenarios
This case is suitable for industrial inspection, spot positioning, motion tracking, embedded cameras, edge vision terminals, and small vision control boards that need a balance between MCU resources, DMA cache handling, display bandwidth, and sensor configuration.
Client Requirements
- Confirm the DVP parallel interface, MCLK, RESET, PWDN, I2C/SCCB, level conversion, and signal integrity between STM32H743 and OV9281.
- Configure OV9281 for 480x480 8-bit RAW DVP output with 30/60/90fps debug modes.
- Implement DCMI 8-bit hardware sync, DMA snapshot acquisition, continuous acquisition, and double-buffer management.
- Display RAW8 grayscale images on a 5-inch 800x480 RGB LCD through RGB565 conversion.
- Implement image quality mapping, spot detection, coordinate calculation, screen overlay, and UART diagnostic logs.
Technical Solution
The project followed a staged route: hardware and communication first, single-frame verification second, continuous acquisition third, and display plus algorithm overlay last. Stable versions were preserved for rollback and reuse.
- Confirmed the OV9281 DVP, MCLK, RESET, PWDN, SCCB/I2C, and high-speed signal connections.
- Implemented Chip ID reading, register table loading, Start/Stop Stream, and Test Pattern interfaces.
- Used DCMI plus DMA to receive RAW8 data and handled D-Cache consistency.
- Implemented RAW8 to RGB565 conversion, centered 480x480 display, LCD double buffering, and brightness/contrast mapping.
- Implemented spot detection, dynamic threshold, centroid calculation, coordinate output, coordinate overlay, and red cross marking.
Core Functions
- OV9281 recognition, DVP RAW8 output configuration, MCLK, reset, and power-up timing.
- DCMI plus DMA snapshot acquisition, continuous acquisition, double buffering, and cache consistency.
- 5-inch LCD real-time display, RAW8 grayscale conversion, brightness and contrast mapping.
- Spot position detection, coordinate calculation, top-right coordinate display, and cross overlay.
- FPS statistics, image min/max/avg statistics, DCMI Overrun, DMA Error, and Sync Error counters.
Implementation Process
The team first read the OV9281 Chip ID through SCCB/I2C, then configured DVP RAW8 output and DCMI reception. After single-frame acquisition was validated, the project moved to 90fps continuous acquisition and LCD double buffering. Issues such as line artifacts, display tearing, frozen images, dark frames, and capture artifacts were handled through register settings, cache strategy, display refresh, and diagnostic tooling.
Testing and Verification
- Verified OV9281 Chip ID reading, register configuration, Start/Stop Stream, and Test Pattern.
- Verified 480x480 RAW8 snapshot, continuous acquisition, double buffering, and D-Cache consistency.
- Verified 800x480 LCD centered display, RAW8 to RGB565 conversion, and double framebuffer display.
- Verified brightness/contrast mapping, spot detection, coordinate overlay, and red cross marking.
- Verified FPS statistics, error counters, ST-LINK memory capture analysis, and stable version backup.
Delivery Results
- A compilable, flashable, and runnable STM32H743 project.
- OV9281 DVP RAW8 480x480@90fps camera driver and register configuration.
- DCMI plus DMA acquisition driver, double-buffer management, and LCD display chain.
- Spot detection algorithm, coordinate calculation, screen overlay, and UART diagnostic logs.
- Stable version backups including v2, image-quality version, and spot-detection version.
Project Value
The project verified that STM32H743 can support high-speed vision acquisition and real-time display under a DCMI plus DMA plus LTDC architecture. It established a reusable method from hardware interface and camera registers to cache consistency, LCD display, algorithm overlay, and diagnostic logs.
Reusable Experience
Embedded vision projects should validate sensor communication and single-frame data first, then continuous acquisition, cache consistency, and display refresh, and finally algorithm overlay. Capture artifacts from debugging tools should be separated from real acquisition issues.
Project Boundary
This case summarizes functionality and development methods. Productization still requires further verification with the selected lens, lighting, enclosure, EMC, temperature conditions, and long-running requirements.
Related Services
FAQ
Is STM32H743 suitable for high-speed vision acquisition?
It is suitable for certain embedded acquisition and display scenarios, but DCMI, DMA, cache consistency, display bandwidth, and algorithm complexity must be carefully managed.
Why use OV9281?
OV9281 is a monochrome global-shutter image sensor suitable for spot detection, moving targets, and low-latency vision. The final selection still depends on resolution, frame rate, and interface needs.
Can more algorithms be added later?
Yes. With acquisition, display, and basic spot detection working, edge detection, threshold segmentation, and tracking can be expanded according to the MCU resource budget.
Online
Phone
WeChat
Top