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

u'YUV422Packed' #7

Open
maxlklaxl opened this issue Feb 13, 2016 · 4 comments
Open

u'YUV422Packed' #7

maxlklaxl opened this issue Feb 13, 2016 · 4 comments

Comments

@maxlklaxl
Copy link

I would have a color camera available now

@mabl
Copy link
Owner

mabl commented Feb 13, 2016

Hi @maxlklaxl,

how do you handle your image data? Up to now, I've tried to return useful numpy arrays.
In case of color or even more complex stuff like YUV + packing, I'm a bit lost. How do you currently do this in Python? Pass it trough opencv?

In any case, I could always return a raw buffer holding the image.

@maxlklaxl
Copy link
Author

Hi
I would use opencv for that and I think a RGB numpy array is the way to go.

In the lab we use fview which is based on motmot (gitrepo)

@maxlklaxl
Copy link
Author

so this specific camera supports:
Mono
BayerBG8, 12 and 12 packed
YUV422Packed
YUV422(YUYV)Packed

raw buffer would also be a nice option in addition

@jeetu7
Copy link

jeetu7 commented Jan 25, 2017

First of all thanks for the pythonic library to interface with pylon cameras.
The support for YUV422Packed and YUV422(YUYV)Packed is highly required by many. I am not so conversed in cython otherwise would have pushed a PR. Hope the following helps.

  1. There seems to be inbuilt pylon image format convertor. May be you can decide on some single format as final output. And use the pylon convertor to convert the incoming image to that final format.
    Is is being used in following c++ code.
    https://github.com/shadow-robot/basler_camera/blob/indigo-devel/include/image_publisher.h#L27
    http://stackoverflow.com/questions/24101877/basler-pylon-4-sdk-and-opencv-2-4-9-cpylonimage-to-mat

  2. If that does not work for some reason, opencv could be used for explicit conversion.
    http://answers.opencv.org/question/56762/opencv-bgr-to-yuv-conversion/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants