Open rragundez opened 8 years ago
Hi @ragundez,
I see you are using an Ethernet camera. I've never tested the code myself against it, though I have a report where someone told me it works. Can you connect to the camera via Pylon viewer? If no, is the camera on the same network and pingable?
I don't have the camera now, but it is pingable and I can use the Pylon software and see the video/images.
While it should not matter, you are under Linux, right?
yes, is there a terminal output that it would be helpful to see?
No, at the moment I'm not even sure on how to approach this problem. I'll probably add some debug outputs and ask you to run it.
great, thanks a lot
Hi @mabl I fixed it, I actually cannot point out how. But know I can only read mono images, any idea why?
Because I have not implemented colour cameras yet, I have only one mono camera. Give me one one and I'll implement it :-)
If you are okay having a basic buffer without structure returned, I could to that, too. But somehow I'd love to return proper numpy arrays.
If you like, you can also try your hand implementing a proper scheme here: https://github.com/mabl/PyPylon/blob/master/cython/factory.pyx#L242
@mabl Sound like it should be easy but the GetBuffer just return one channel. There is no difference between img.GetBuffer()[:img.GetImageSize()] and img.GetBuffer() i think the initial change should be elsewhere. What do you think?
Have you changed the Camera property to Color?
no, where do i do this and what do I have to put? I think you mean intest of Mono12 in PixelFormat or not? thanks
Since I do not own a color Camera I cannot help you much. Have a look at the available entries in cam.properties and into the camera documentation. It should be somewhere.
I tried, I set the PixelFormat to YUV422Packed and other options but no success.
Packed is probably tricky to get right. What does no success mean?
still returns mono, one channel. Of course I had to remove the assert
Then I'm out of my depths.... Sorry...
no problem, thanks a lot for your time. If I figure it later I will let you know.
@mabl at the end I made my own wrapper, but just for capturing the image. You can find it in my other repository if you are interested https://github.com/rragundez/pybasler.git
@mabl, I am using acA 1920-48gc gigE color camera and i am getting following error on sample code. please help me to sort out.
for image in cam.grab_images(1): print type(image)
AssertionError Traceback (most recent call last)
@SubinGeorge: The current implementation only supports monochromatic cameras. Please be welcome to contribute code to get color cameras also supported.
I'm using Python2, also all the Key mentioned in the README file return a KeyError