Skip to content

Conversation

@RichardLangFromNZ
Copy link

  • Expose capability to specify different grab strategies in grab_image()/grab_images() calls
  • Expose a couple of related camera configuration fields

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

ZacDiggum and others added 12 commits October 10, 2016 14:08
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
* 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
@RichardLangFromNZ
Copy link
Author

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
@RichardLangFromNZ
Copy link
Author

OK, put in place a slightly hacky workaround for earlier python versions that don't export the EGrabStrategy enum. properly.

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

Successfully merging this pull request may close these issues.

2 participants