Sie verwenden einen veralteten Browser und können nicht alle Funktionen dieser Webseite nutzen. Hier erfahren Sie, wie Sie Ihren Browser aktualisieren können.

OK
Starten Sie jetzt mit der Konfiguration Ihres Vision Systems Webshop

Bayer to RGB and missed pixel value at last row and line

Camera Bayer filter pixel array information need to be calculated to get the RGB values out of it.

Seaching for Bayer Conversion will discover a variety of ways to perform it.

A very simple way with area color cameras is this:

The example shows a RG Bayer array procedure where the full RGB information of each pixel is derived from the according Bayer array intensity values of itself and the ones to the right and below.

The green intensities are averaged to the result.

As you can see the process will run into some border and corner situations at the end of the frame where no more information from the neighborhood is available. It will be the case with all even more complex Bayer conversions since there are always information from the next pixel essential.

Those situations can be treated diffently in the end user solutions. One example may that the second to last pixels are just copied into the last.

To provide full flexibility on border and corner situations the image will be delivered with value (0) there. That occurs as black pixels within the last row and column.

It can be clipped using the parameter within Pylon C++ API converter function.

CImageFormatConverter converter;

converter.OutputPixelFormat = PixelType_BGR8packed;

converter.InconvertibleEdgeHandling = InconvertibleEdgeHandling_Clip;

Following code demonstrates the method in Pylon .NET C#.

PYLON_IMAGE_FORMAT_CONVERTER_HANDLE hImageCon = Pylon.ImageFormatConverterCreate();

NODEMAP_HANDLE nodemap = Pylon.ImageFormatConverterGetNodeMap(hImageCon);

NODE_HANDLE node = GenApi.NodeMapGetNode(nodemap,"InconvertibleEdgeHandling");

GenApi.NodeFromString(node,"Clip");

Wir helfen Ihnen gerne

Vertriebsanfrage
Basler Support