-
Notifications
You must be signed in to change notification settings - Fork 34
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
Feat/issue 20 add grab strategies #23
base: master
Are you sure you want to change the base?
Feat/issue 20 add grab strategies #23
Conversation
added function cam.stop_grabbing() added property cam.is_grabbing changed cam.grab_images(int) to infinite grabbing when int<1
changed cam.grab_images(nr_images) so that nr_images<1 -> infinite grabbing added function cam.stop_grabbing() added property cam.is_grabbing
check if camera.IsGrabbing() before calling camera.StopGrabbing()
…nd on any exception being caught stop grabbing before rethrowing
…ith no arguments it grabs continuously
* commit '00ae6ae11e7fddedeb1e4778e4906f15736dff17': Default value for grab_images() nr_images parameter, so when called with no arguments it grabs continuously Wrap image grabbing from underlying c++ object in exception handler and on any exception being caught stop grabbing before rethrowing Update factory.pyx added infinite grabbing and helpers Delete pylon_def.pxd Delete factory.pyx added infinite grabbing and related
…d grab_image/grab_images python wrapper
…sue_20_add_grab_strategies
So this worked OK with python 2.7.12, and I'd be surprised if it wasn't good on recent 3 versions as well, however fell over on a Ubuntu 14 box running 2.7.6. Looks like cython is exporting the C++ EGrabStrategy enum. as a PEP 435 enum, which is a fairly recent python edition, but silently dropping it for earlier versions. will take another look. |
…ython/cython versions that dont handle exporting it properly
OK, put in place a slightly hacky workaround for earlier python versions that don't export the EGrabStrategy enum. properly. |
Seems to work as advertised. EGrabStrategy enum. values end up deeply nested pypylon.cython.factory namespace which is a bit painful... but presume that this is just a consequence of the project structure (I'm not a cython expert...) Could perhaps alias them in top level _init.py, but seems a bit ugly