This NB2-based example design demonstrates the use of C-to-Hardware Compilation technology, in combination with I/O hardware. This example requires Altium's Audio / Video peripheral board PB01 to be attached to the NB2 motherboard. Connect a video source to the
COMPOSITE VIDEO – Input A connector on the PB01. The design displays moving video on the NB2'S TFT screen and draws a color histogram on top of it.
Each image is read from the camera and written into memory using double buffering. The buffer is then copied to video memory. While copying, the image is analyzed to determine the histogram, and the histogram is then drawn on top of it. The video memory also uses double buffering to display the image on the TFT screen.
Histograms are cached for several frames. The drawn histogram is the average of all the cached histograms. This creates a more stable histogram that is less affected by noise on the video stream.
Use the generic user switches below the NB2's TFT panel to:
- Freeze video capture (SW1)
- Switch to grayscale mode (SW2)
- Disable R channel (SW3)
- Disable G channel (SW4)
- Disable B channel (SW4)
The design includes C Code Symbols, as well as BT656 Controller, I2C Master Wishbone, Wishbone Multi-Master, SRAM Controller, Wishone Display Driver, Configurable Bus Joiner components.
Altium Designer projects included in this download: