wiki:ventana/hdmicamera

HDMI Camera and LVDS LCD Display Demo

Embedded system developers are increasingly incorporating networking, wireless, video and audio into their applications thus requiring a powerful and flexible platform. This tutorial covers the use of an HDMI microscope camera connected to a Gateworks Ventana i.MX6 Quad Core, 1GHz, GW5400 Single Board Computer. A LCD display, connected to the LVDS port on the Ventana GW5400, allows for instantaneous viewing of the video stream. This demonstration shows how the Ventana GW5400 can simultaneously support multiple video inputs and outputs making it ideal for a multitude of applications.

Physical Connections

Ventana GW5400

http://www.gateworks.com/images/products/GW5400transparent.gif

Today's digital world is leading to more digital devices with higher resolutions. That is why the Ventana has a HDMI input for a wide variety of today's electronics.

  • HDMI Microscope HDMI Microscope
  • Plug the HDMI camera to the HDMI input on the Ventana GW5400 using a HDMI cable
    • Please reference the silkscreen or operating manual for identifying the HDMI input port.

The 10.1" LCD with an LVDS interface connects to the Ventana's LVDS port as a great display option!

  • 10.1 LCD Information here: Freescale 10.1 LCD
  • Plug the LCD LVDS connector into the LVDS connector on the Ventana GW5400 using a proper cable as detailed in the Operating Manual
    • Please reference the silkscreen or operating manual for identifying the LVDS port.

Software

During the time of this demo, this was only supported using the Yocto BSP.

The operating system will register the video devices typically as a /dev/video. There is a tutorial regarding Ventana displays located here: Ventana Video Devices Tutorial

With it's Linux operating system, the Ventana's Video and Audio is best controlled through the GStreamer multimedia framework. Gateworks has created a quick GStreamer tutorial located here: GStreamer Tutorial

The GStreamer Pipeline used for the HDMI input:

gst-launch tvsrc device=/dev/video0 ! mfw_v4lsink disp-width=1024 disp-height=768 device=/dev/video17 & 
  • Description:
    • gst-launch : Program to launch GStreamer
    • tvsrc : The source points to /dev/video0 which is the device the camera was registered to when connected to the system
    • mfw_v4lsink : The V4L sink
      • disp-width=1024 disp-height=768 : Specified height and width to match the LVDS panel
      • device=/dev/video17 : The LVDS display as registered to the system

Software Extension - Image Overlay

Gateworks demo also involved overlaying an image on top of the video.

A strong understanding of frame buffers is required for this. This is outlined on the Ventana device page located here: Ventana Video Devices Tutorial

The GStreamer Pipeline used to overlay an image was:

gst-launch filesrc location=/home/root/logo1024768test.jpg ! jpegdec ! imagefreeze ! ffmpegcolorspace ! fbdevsink device=/dev/fb0 &
  • Description:
    • gst-launch : Program to launch GStreamer
    • filesrc : The source points to a file at location
    • jpegdec : JPEG file format decoder
    • imagefreeze : Element that can grab a single frame, in this case a static image
    • ffmpegcolorspace : Convert colorspace
    • fbdevsink device=/dev/fb0 : Frame Buffer sink to source of frame buffer 0

Software Extension - Start at Bootup

It is very standard to put a startup script into the file /etc/rc.local so that it starts right when the board is booted up.

Please consult Google to learn more about this if it is unfamiliar. Here is an additional link: http://www.netbsd.org/docs/guide/en/chap-rc.html

To start the script we simply put the two lines in the /etc/rc.local file as shown below:

gst-launch filesrc location=/home/root/logo1024768test.jpg ! jpegdec ! imagefreeze ! ffmpegcolorspace ! fbdevsink device=/dev/fb0 &
gst-launch tvsrc device=/dev/video0 ! mfw_v4lsink disp-width=1024 disp-height=768 device=/dev/video17 & 

Note the '&' at the end of each line puts each process into the background so that the serial console can still be worked with.

Conclusion

This demo was an example of how the high performance and versatile Ventana GW5400 can take HDMI video input and output it to an LVDS LCD Display with an image overlay.

Using the theory of this demo, there are hundreds of other combinations that can be achieved with the Ventana Video Inputs and Outputs and the powerful GStreamer software.

For further reference, please see the following links:

NOTE All software used is Open Source and thus information pertaining to these topics is also available on the web.

Last modified 2 years ago Last modified on 04/01/15 09:56:16

Attachments (1)

Download all attachments as: .zip