From ec95851f68d24e4201d4698a2657d90a174c05fa Mon Sep 17 00:00:00 2001 From: morefigs Date: Sat, 9 Feb 2019 15:57:44 +1100 Subject: refactor to clean up buffer access functions --- examples/camera/opencv_capture_image.py | 2 +- examples/camera/opencv_capture_image_with_callback.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/camera/opencv_capture_image.py b/examples/camera/opencv_capture_image.py index cf5305f..c185f6d 100644 --- a/examples/camera/opencv_capture_image.py +++ b/examples/camera/opencv_capture_image.py @@ -19,7 +19,7 @@ if __name__ == '__main__': camera.run_feature_command('AcquisitionStop') # get the image data as a numpy array - image = frame.image_numpy_array() + image = frame.buffer_data_numpy() # display image cv2.imshow(camera.camera_id, image) diff --git a/examples/camera/opencv_capture_image_with_callback.py b/examples/camera/opencv_capture_image_with_callback.py index b7bc7ff..67cabdf 100644 --- a/examples/camera/opencv_capture_image_with_callback.py +++ b/examples/camera/opencv_capture_image_with_callback.py @@ -8,7 +8,7 @@ def on_callback(completed_frame: Frame): print('Callback called!') # get the image data as a numpy array - image = completed_frame.image_numpy_array() + image = completed_frame.buffer_data_numpy() # display image cv2.imshow(camera.camera_id, image) -- cgit v1.2.3