Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bayer RG 8 supported? #1

Closed
petergerten opened this issue Jul 30, 2018 · 9 comments
Closed

Bayer RG 8 supported? #1

petergerten opened this issue Jul 30, 2018 · 9 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@petergerten
Copy link

Hi,

I have a acA720-520uc camera using Pylon 5 and can select "Bayer RG 8" in the PylonViewerApp.
When trying to use it with gst-pylonsrc, I get:
start:<pylonsrc0> error: Camera doesn't support Bayer8.
The pipeline works with rgb8 without issues.

I wonder if the "Bayer RG 8" format listed in the PylonViewerApp is somehow different from "bayer8" here?

Peter

@zingmars
Copy link
Owner

Could you please prepend your pipeline with GST_DEBUG=pylonsrc:5, pipe all output to a file, and upload the file here? Also, what version of the Pylon API are you using?

I wonder if the "Bayer RG 8" format listed in the PylonViewerApp is somehow different from "bayer8" here?

It shouldn't be (though it is possible that they changed the pixel format strings, it's been a while). PylonViewerApp is (or used to be) a 1:1 GUI implementation of the API. Bayer was a weird one though, because it would default to Bayer8 BG by default, and the way to change this in the API (at least for our cameras) was by using the Reverse X and Reverse Y functionality. To do this with this plugin for RG you would need to set the flipx and flipy settings to true, i.e.
GST_DEBUG=pylonsrc:5 gst-launch-1.0 pylonsrc imageformat=bayer8 flipx=true flipy=true ! bayer2rgb ! videoconvert ! xvimagesink

@zingmars zingmars added the question Further information is requested label Jul 30, 2018
@petergerten
Copy link
Author

petergerten commented Jul 30, 2018

@zingmars this is the output of your suggested pipeline:

GST_DEBUG=pylonsrc:5 gst-launch-1.0 pylonsrc imageformat=bayer8 flipx=true flipy=true ! bayer2rgb ! videoconvert ! xvimagesink
0:00:00.018893463  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:397:gst_pylonsrc_init:<GstPylonsrc@0x56435986f0e0> Initialising defaults
0:00:00.018921307  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:477:gst_pylonsrc_set_property:<pylonsrc0> Setting a property.
0:00:00.018928656  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:477:gst_pylonsrc_set_property:<pylonsrc0> Setting a property.
0:00:00.018933579  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:477:gst_pylonsrc_set_property:<pylonsrc0> Setting a property.
0:00:00.020569572  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:871:gst_pylonsrc_get_caps:<pylonsrc0> Received a request for caps.
0:00:00.020579683  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:873:gst_pylonsrc_get_caps:<pylonsrc0> Could not send caps - no camera connected.
0:00:00.020606727  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:871:gst_pylonsrc_get_caps:<pylonsrc0> Received a request for caps.
0:00:00.020613394  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:873:gst_pylonsrc_get_caps:<pylonsrc0> Could not send caps - no camera connected.
0:00:00.020638518  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:871:gst_pylonsrc_get_caps:<pylonsrc0> Received a request for caps.
0:00:00.020643675  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:873:gst_pylonsrc_get_caps:<pylonsrc0> Could not send caps - no camera connected.
0:00:00.021247766  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:871:gst_pylonsrc_get_caps:<pylonsrc0> Received a request for caps.
0:00:00.021253332  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:873:gst_pylonsrc_get_caps:<pylonsrc0> Could not send caps - no camera connected.
0:00:00.021862017  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:871:gst_pylonsrc_get_caps:<pylonsrc0> Received a request for caps.
0:00:00.021867541  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:873:gst_pylonsrc_get_caps:<pylonsrc0> Could not send caps - no camera connected.
0:00:00.021995838  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:871:gst_pylonsrc_get_caps:<pylonsrc0> Received a request for caps.
0:00:00.022000961  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:873:gst_pylonsrc_get_caps:<pylonsrc0> Could not send caps - no camera connected.
Setting pipeline to PAUSED ...
0:00:00.289150459  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:953:gst_pylonsrc_start:<pylonsrc0> pylonsrc: found 1 Basler device(s).
0:00:00.289197589  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:2188:pylonc_connect_camera:<pylonsrc0> Connecting to the camera...
0:00:00.408600177  7638 0x564359843500              pylonsrc gstpylonsrc.c:2233:pylonc_print_camera_info:<pylonsrc0> Status: Using camera "acA720-520uc" (serial number: 40012364, id: 0). Custom ID: None
0:00:00.410888586  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:1064:gst_pylonsrc_start:<pylonsrc0> Max resolution is 728x544.
0:00:00.412804538  7638 0x564359843500              pylonsrc gstpylonsrc.c:1093:gst_pylonsrc_start:<pylonsrc0> Setting resolution to 720x540.
0:00:00.414537991  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:1111:gst_pylonsrc_start:<pylonsrc0> Centering X: False, Centering Y: False.
0:00:00.420946400  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:1157:gst_pylonsrc_start:<pylonsrc0> Flipping X: True, Flipping Y: True.
0:00:00.421680359  7638 0x564359843500 WARN                pylonsrc gstpylonsrc.c:1181:gst_pylonsrc_start:<pylonsrc0> error: Failed to initialise the camera
0:00:00.421687505  7638 0x564359843500 WARN                pylonsrc gstpylonsrc.c:1181:gst_pylonsrc_start:<pylonsrc0> error: Camera doesn't support Bayer8.
0:00:00.423673259  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:2164:pylonc_disconnect_camera:<pylonsrc0> Camera disconnected.
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstPylonsrc:pylonsrc0: Failed to initialise the camera
Additional debug info:
gstpylonsrc.c(1181): gst_pylonsrc_start (): /GstPipeline:pipeline0/GstPylonsrc:pylonsrc0:
Camera doesn't support Bayer8.
Setting pipeline to NULL ...
Freeing pipeline ...
0:00:00.424485124  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:2129:gst_pylonsrc_dispose:<pylonsrc0> dispose
0:00:00.424491429  7638 0x564359843500 DEBUG               pylonsrc gstpylonsrc.c:2137:gst_pylonsrc_finalize:<pylonsrc0> finalize

I am using "pylon 5.0.12 Camera Software Suite Linux x86 (64 bit)".

@zingmars
Copy link
Owner

Weird. I'll look into it, but I can't promise much since I don't have access to Basler cameras at the moment.

@zingmars zingmars added the bug Something isn't working label Jul 30, 2018
@petergerten
Copy link
Author

@zingmars How would I go about to check the supported formats of my camera? PylonViewerApp only gives me "human readable" versions of it.

@zingmars
Copy link
Owner

zingmars commented Aug 3, 2018

The human readable versions correspond with API's pixel format enum (C++/namespace_basler___usb_camera_params.html#a27cff072eee1c5a313f4169e488da874 in the documentation that came with pylon) -

image

Sadly the plugin doesn't offer a way to list all of the formats available. To do this, you would probably make your own tester. If you have some programming background, the C++/sample_code.html in API docs has examples for a simple camera grab program, You could repurpose it to test all of the pixel formats with something like this (this is a rough adaption from the code samples, I haven't actually tested whether it works or not) -

bool getFormats(Camera_t& camera)
{
    GenApi::NodeList_t Entries;
    camera.PixelFormat.GetEntries(Entries);
    for (size_t i = 0; i < Entries.size(); i++)
    {
        GenApi::INode *pNode = Entries[i];
        if (IsAvailable(pNode->GetAccessMode()))
        {
            GenApi::IEnumEntry *pEnum = dynamic_cast<GenApi::IEnumEntry *>(pNode);
            std::cout << pEnum->ToString();
        }
    }
}

@devykrishna
Copy link

devykrishna commented Jun 1, 2019

Is there any solution available for Bayer RG 8. I am facing the same problem with acA4112 -8gc camera. I tried flipx=true and flipy= true but still facing the same.
with Bayer GR 8 format, I was able to stream video with flipy=true option.

Kindly help

@zingmars zingmars added help wanted Extra attention is needed and removed question Further information is requested labels Jul 30, 2019
@faerics
Copy link

faerics commented Aug 19, 2019

@zingmars
This plugin is currently not supporting any Bayer format due to incorrect choosing of a filter.

Used it several months, with RGB imageformat until I get the old camera which support Bayer only.
Successfully patched your plugin, ready to make a PR. Should I fork your repo or I can create new branch in this one?

@zingmars
Copy link
Owner

zingmars commented Aug 19, 2019 via email

@zingmars
Copy link
Owner

zingmars commented Aug 20, 2019

@petergerten if this is still relevant, could you try it again with the latest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants