This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Capturing RAW monochrome video data

Other Parts Discussed in Thread: DM3730, OMAP3530

Hello all,

Using the CamISP port, I am planning to capture video frames composed of upto, 16bits per pixel, gray scale data. Each pixel is represented with 16bits and there is only one color component.

Let's say i have a frame resolution of 640x480 pixels, then 1 frame should be composed of 640x480x16 = 4915200 bits RAW data.

I know OMAP3530/DM3730 CamISP input data port is 12 bits wide and not enough for 16 / 14 bits if we want to receive 1 pixel at each clock cycle.

What is the proper way to follow in this scenario? How should I organize my pixel data ? Should I write my own capture driver or is there already one for monochrome cameras with RAW output?

Those who have experience with processing gray-scale video with OMAP3530 / DM3730, what would you recommend ?

Thanks in advance for all your input !

  • Study the effective range of the camera, it is possible that the Data from scene does not need 16 bits fullnrange

    Otherwise you will have to connect the 12bit most Significant data bus lines to the ISP

    Also be aware of some further limitations when later at software stage

    You get data at CCDC or preview or resizer stage ...

    Regards

    Brahim

  • Hello Brahim,

    Thank you for your answer. Actually my camera output will be 14 or 12 bits. I wrote 16 bits just for the sake of simplicity and to raise the question what if we are to receive data wider than 12 bits (which is CamISP bus width).

    When I look at the TRM (technical Reference Manual) of OMAP3530, on the related pages of CamISP block, all I see is registers configured for color (RGB) data. There are many RGB modes and you can configure incoming RGB data pattern configuring the responsible CamISP registers. In addition, some "add-on" ISP blocks such as the Histogram block is designed to work for Bayer RGB, and two other color patterns.

    There is not a single reference for pure "monochrome" CamISP input data.

    I know I can still use RGB for monochrome gray-scale data by, equaling R, G, and B channel values, but this would be so inefficient than using RAW mono data.

    So, I am wondering if anyone has tried capturing RAW monochrome data?

    CamISP is 12 bits wide but we can still capture RGB888 (24 bits deep) data. Say, we capture 1 pixel every 2 clock cycles. So it should also be possible to capture monochrome RAW frame data which is more than 12 bits deep, but it may not be as effcient as capturing RGB data, because all the CamISP hardware seems to be configured for RGB.

    So, I am asking again: is it possible at a reasonable speed to capture monochrome video frames at all?

    Best regards,

  • This is an example of monochrome camera which is connected to the Gumstix Overo (3530)
    https://www.gumstix.com/store/product_info.php?products_id=260 and trust me the output is
    monochrome ! There is a schematic on their website if you need to get inspiration for hardware.

    Brahim  

  • Thank you for your recommendation Brahim,

    I could not find detailed documentation on the web site, it forwards me to OVERO hardware page and I am not sure which document to check; so instead I did a google search and found this link: http://wiki.gumstix.org/index.php?title=Caspa_camera_boards

    On the linked page it says: "The Caspa camera sensor outputs raw 10-bit Bayer images which is transferred to the Image Signal Processor (ISP) via a parallel interface" which tells me MT9V032 outputs color images, if it is the sensor on the Caspa VL board.

    Can you please guide me more in the right direction, which specific sensor do you mention about? Can you also send me the document link for the hardware you mentioned if that is not too much to ask for.

    Thanks a bunch.

  • Sorry i should have put the link 

    http://pubs.gumstix.com/boards/ 

    from there you can browse for of their product, CASPA is one of many !

    Best regards

    Brahim

  • The mt9v032 output bayer format, but using the driver from the linux reference source site at 

    http://lxr.free-electrons.com/source/drivers/media/video/mt9v032.c one can modify and get

    12 bit monochrome image from it ... And example for V4L2 controls.

    Brahim

  • I did something similar on a beagleboard xm for 8 bit monochrome image data coming from an fpga.  My changes were limited to the board-omap3beagle-camera.c and my custom camera driver file, which I was able to base on the fsr172x driver.

    I based my changes on https://github.com/fastr/linux-2.6

    That "fsr172x" project is essentially a 12bit raw capture device.

    In the end, I was able to set things up with media-ctl, and capture with yavta and gstreamer.