How to use a Dalsa Linea Color GigE in RAW mode (bilinear Bayer)?

  • Hello community

    Today I have a question for you. I want to use a Dalsa Linea Color GigE in RAW mode. This is a bilinear linescan camera having the following pattern:

    Sensor layout of a bilinear line scan camera with color pattern Red/BlueFollowedByBlue/Red_GreenFollowedByGreen

    I need to set the camera to the pixel format BiColorRGBG8 but I don't know the exact output format of the camera.

    Here is the camera manual:…eries%202k%20and%204K.pdf

    My questions are:

    1. Is the camera sending an image of Width and Height and the image composing takes place in the camera?

    2. What is the pixel format of the camera? RB line first next GG line or pixel 0 RGBG, next pixel 1 RGBG etc?

    3. What is the line width? The CL version of the Dalsa P4 sends the GG line after the RB line. So the LVAL is 2 x width

    I modified the Silicon Software example…near%20Bayer%20RB_GG.html to the VQ4 but without having an answer to the questions above I cannot finish the implementation. See attached.

    Maybe someone has an idea?



  • Johannes Trein

    Changed the title of the thread from “How to use a Dalsa Linea Color GigE in RAW mode (bilinear Bayer)” to “How to use a Dalsa Linea Color GigE in RAW mode (bilinear Bayer)?”.
  • Hi Johannes,

    The intended PixelFormat(Coding='Raw Bayer') is BiColorRGBG8 and transferred as defined by PFNC GenICam_PFNC_2_2 as BiColor_LMNO location (page 20 & 24) which means RGBGRGBG...RGBG per line. Based on the Image Format Width = N you will receive 2*N pixels. In case of 8bit per pixel component it will be 2*N byte per image line.


    Source of image above: Linea Manual.

    Björn Rudde
    Field Application Engineer
    - Basler AG

  • Now that I have the camera I could do further tests.

    In fact the camera sends data in the following format: RGBG...

    If you set an AOI of 2048 x 1024 the camera will transfer 2048 x 2048 to the frame grabber. So in contrast to the GenICam PFNC the two stages are separated into two lines. The simple solution is to use an AppendLine operator in VisualApplets.

    The test patterns of the camera seem to not output the RGBG data so I used the sensor image and set a digital gain for red, grreen and blue to allocate the color to the correct positions. By acquiring a RAW image I could verify the algorithm with the VisualApplets simulation.


    The HAP runs fine in microDisplay. No parameters need to be changed if you use an ROI of 2048x1024


    Attached you will find the updated VA file and the RAW image file for simulation.