diff --git a/bindings/python/examples/first_frame/readme.md b/bindings/python/examples/first_frame/readme.md deleted file mode 100644 index a2b31b6ce..000000000 --- a/bindings/python/examples/first_frame/readme.md +++ /dev/null @@ -1,87 +0,0 @@ -# First frame Example - -### Overview -This example shows how to capture a frame using the SDK and Python. - -NumPy library is needed for scientific computations. -If NumPy library is not found you should install it using pip (a package manager for Python) - -```python -pip install numpy -``` - -Matplotlib library is needed for displaying the received frame. -If Matplotlib library is not found you should install it using pip. -```python -pip install matplotlib -``` - -Importing necessary modules -```python -import aditofpython as tof -import numpy as np -import matplotlib.pyplot as plt -``` - -For creating the system object -```python -system = tof.System() -``` - -Getting a camera from the system, configuring the mode and the frame type and initializing it -```python -cameras = [] -status = system.getCameraList(cameras) -print("system.getCameraList()", status) - -camera1 = cameras[0] - -modes = [] -status = camera1.getAvailableModes(modes) -print("system.getAvailableModes()", status) -print(modes) - -modes = [] -status = camera1.getAvailableModes(modes) -print("system.getAvailableModes()", status) -print(modes) - -status = camera1.initialize() -print("camera1.initialize()", status) - -camDetails = tof.CameraDetails() -status = camera1.getDetails(camDetails) -print("system.getDetails()", status) -print("camera1 details:", "id:", camDetails.cameraId, "connection:", camDetails.connection) - -status = camera1.setModeDetail(types[0]) -print("camera1.setModeDetail()", status) - -status = camera1.setMode(modes[0]) -print("camera1.setMode()", status) -``` - -Getting a frame from the camera -```python -frame = tof.Frame() -status = camera1.requestFrame(frame) -print("camera1.requestFrame()", status) -``` - -Printing the frame details -```python -frameDataDetails = tof.FrameDataDetails() -status = frame.getDataDetails("depth", frameDataDetails) -print("frame.getDataDetails()", status) -print("depth frame details:", "width:", frameDataDetails.width, "height:", frameDataDetails.height, "type:", frameDataDetails.type) -``` - -Displaying the received frame -```python -image = np.array(frame.getData("depth"), copy=False) - -plt.figure() -plt.imshow(image, cmap = 'gray') -plt.colorbar() -plt.show() -``` diff --git a/bindings/python/examples/readme.md b/bindings/python/examples/readme.md index 783e536ab..177aaede3 100644 --- a/bindings/python/examples/readme.md +++ b/bindings/python/examples/readme.md @@ -1,14 +1,3 @@ # 3D Time of Flight : Python examples -### Overview -The examples in this directory provide sample Python applications to demonstrate how 3D TOF camera can be used. - - -#### Directory Structure - -| Directory/File | Description | -| --------- | ----------- | -| data_collect | Python version of data collect | -| first_frame | Python example to capture a frame | -| streaming | Use PyGame to show depth frames in real-time | -| dual_cameras | A Python example showing how to use a two camea setup | \ No newline at end of file +Refer to the eval kit [documentation](../../../doc/user-guide/ADTF3175D-EvalKit-610.md#python-tools) for more details.