Navigate
The Imaging Source Helpdesk
  • Register

  • or
  • Login
    Need a password reminder?
  • English
or
Contact Us
  • Get in touch

    Send us an email

  • Submit Community Topics

    Community Topics and suggestions submitted by customers like you

  • Start a chat session

  • Knowledgebase Read help articles
  • Community Custom suggestions
  • Contact Us We are here to help
  • Portal
  • Knowledgebase
  • FAQ
  • Linux Set Video Formats in Camera and Memory
Download PDF

Linux Set Video Formats in Camera and Memory

S.Geißler
2019-08-05
in FAQ

This article explains, how to set RGB32, RGB24, GRAY8, Bayer raw 8 bit and Bayer raw 16 with tcambin and GStreamer.

The color formats are quite simple:

RGB32

    format="video/x-raw, format=BGRx, width=640, height=480,framerate=30/1"

    gst-launch-1.0 tcambin ! $format ! videoconvert ! videoscale !  ximagesink


RGB24

    format="video/x-raw, format=BGR, width=640, height=480,framerate=30/1"

    gst-launch-1.0 tcambin ! $format ! videoconvert ! videoscale !  ximagesink


GRAY8

GRAY8 provides are gray scale image. This is not to be mixed with Bayer Raw data, because if a color camera is used, this is debayered. The Bayer Mosaic pattern is lost.

    format="video/x-raw, format=GRAY8, width=640, height=480,framerate=30/1"

    gst-launch-1.0 tcambin ! $format ! videoconvert ! videoscale !  ximagesink


The 8 bit and 16 bit Bayer Raw are set as follows:

Bayer Raw 8 bit:

    format="video/x-bayer, format=rggb, width=640, height=480,framerate=30/1"

    displayformat="video/x-raw, format=GRAY8, width=640, height=480,framerate=30/1"

    gst-launch-1.0 tcambin ! $format ! capssetter join=false replace=true caps="$displayformat" ! videoconvert ! videoscale !  ximagesink

Bayer Raw 16 bit:

    format="video/x-bayer, format=rggb16, width=640, height=480,framerate=30/1"

    displayformat="video/x-raw, format=GRAY16_LE, width=640, height=480,framerate=30/1"

    gst-launch-1.0 tcambin ! $format ! capssetter join=false replace=true caps="$displayformat" ! videoconvert ! videoscale !  ximagesink 

The capsetter module is used for replacing "video/x-bayer" with "video/x-raw" and "rggb" with "GRAY". This makes the format understandable by the videoconvert module.  Using these formats makes the Bayer Mosaic pattern of the Raw data visible as checker board pattern on the live view.

The Bayer start pattern "rggb" depends on the used color camera model.  Use "tcam-ctrl -c <serial>" in order to get the start pattern of the currently used camera model

Rate the quality of this page

This page was helpful :) :( This page was not helpful

Quick Jump
  • The Imaging Source Helpdesk
  • Knowledgebase
  • Community
  • Contact Us
Top
Helpdesk software provided by Deskpro