Project

General

Profile

12-bit Pixel Format using Python Harvester

Added by Will Van Hyning 5 months ago

Hello,

I have been trying to interface to the MityCam-C50000 using python and the harvesters library, and have been having trouble getting 12-bit data. When requesting the data from the payload component, I get an Attribute error stating: 'NoneType' object has no attribute 'data'. This happens when the PixelFormat.value is set equal to either 'Mono12p' or 'BayerBG12p'. If the PixelFormat.value is set to either 'Mono8' or 'BayerBG8', the program works as expected. I've attached an HTML document which was generated using pydoc which I have been using to understand the way the harvester module is setup.
Thank you for your support.

-Will


Replies (3)

RE: 12-bit Pixel Format using Python Harvester - Added by Michael Williamson 5 months ago

I was looking at this page, which has an example, but it looks like it was for 8 bit as well....

https://support.criticallink.com/redmine/projects/gentl_apps/wiki/Using_Python_With_Critical_Link_GenTL_Producer

When time permits, we'll look at testing with 12 bit mode here with python + harversters.

It looks like the version of havesters you are using doesn't appear to support the Mono12p and Bayer12p (according to the list of supported formats in the data section on the HTML page).

It might be worth asking the question with the harvester developer, they may not support the "packed" formats. Mono12p and Mono12 are packed differently, according to the Pixel Format Naming Convention documents.

-Mike

RE: 12-bit Pixel Format using Python Harvester - Added by Will Van Hyning 5 months ago

The packed formats don't appear on the HTML page (which I'm unsure why that is) but they are listed in pfnc.py . I have tried including 'from harvesters.util.pfnc import mono_packed_location_formats' at the beginning of the script but it still gives me the same attribute error.

RE: 12-bit Pixel Format using Python Harvester - Added by Michael Williamson 5 months ago

You might post to the chat/gitter room or open a ticket on the github site
for the harverster stuff:

https://github.com/genicam/harvesters

The project owner is very good about supporting this stuff. I suspect this
is likely a problem in the harvester layer.

-Mike

On Tue, Jul 9, 2019 at 4:03 PM <> wrote:

    (1-3/3)
    Add picture from clipboard (Maximum size: 500 MB)