EVK3D viewer
This sample allows you to visualize an EVK3D stream as a depth map. It can also be used to record and replay RAW data.
The EVK3D is an embedded 3D camera combining a Gen41 sensor (Technical Sample of the IMX636 sensor) and a modulated Vertical Cavity Self Emitting Laser (VCSEL) allowing to generate point clouds in the context of Structured Light depth measurement. If you want to know more about this kit, please contact us.
The source code of this sample can be found in
<install-prefix>/share/metavision/sdk/stream/cpp_samples/metavision_evk3d_viewer
when installing Metavision SDK from installer or packages. For other deployment methods, check the page
Path of Samples.
How to start
You can directly execute pre-compiled binary installed with Metavision SDK or compile the source code as described in this tutorial.
To start the viewer based on the live stream from your EVK3D, make sure you have the calibration file associated with your device (contact us if you don’t have it) and run the following command (note that it may take a few seconds before the first depth map is displayed):
Linux
metavision_evk3d_viewer -c path/to/calibration_file.json -l 5 --fps 60
Windows
metavision_evk3d_viewer.exe -c path/to/calibration_file.json -l 5 --fps 60
Note
In the commands above, we specified two command line options:
-l 5: sets the line thickness used to visualize the EVK3D projector line to 5 pixels so that the lines are more visible
--fps 60: sets the frame rate to display the depth map in order to enhance the rendering that could otherwise be random due to the absence of timestamp in the point-cloud data.
Data recording and replay
To record data from a live EVK3D stream:
Launch the viewer (optionally, provide an output file using the “-o” command line option; otherwise, the data will be saved to
data.raw)Linux
metavision_evk3d_viewer -o path/to/output.raw -l 5 --fps 60Windows
metavision_evk3d_viewer.exe -o path/to/output.raw -l 5 --fps 60Wait until the depth map is displayed
Press
Spaceto start recordingPress
Spaceagain to stop recordingReplay the recorded RAW file using the
-icommand line option as described below.
To replay a previously recorded RAW file, provide the full path to it.
Here, we use RAW files from the test data mentioned in SDK installation from sources
(download 0101_cm_mtr12_output.raw and 0101_cm_mtru_output.raw directly from
this page).
Linux
metavision_evk3d_viewer -i 0101_cm_mtr12_output.raw -l 5 --fps 60
Windows
metavision_evk3d_viewer.exe -i 0101_cm_mtr12_output.raw -l 5 --fps 60