Undistortion Sample using C++

The Computer Vision API allows to undistort and distort coordinates of events.

The sample metavision_undistortion.cpp shows how to use the Metavision SDK CV with its Metavision::CameraGeometry class to undistort and distort coordinates of events. More specifically, this sample shows how to undistort the coordinates represented by Eigen types and also undistort events represented by other types.

The source code of this sample can be found in <install-prefix>/share/metavision/sdk/cv/cpp_samples/metavision_undistortion when installing Metavision SDK from installer or packages. For other deployment methods, check the page Path of Samples.

Expected Output

The sample visualizes:

  • input (distorted) image on the left

  • undistorted image on the right

Expected Output from Metavision Undistortion Sample

It also outputs the coordinates of undistorted events.

How to start

First, compile the sample as described in this tutorial. It will use the image dist.jpg provided in the sample directory.

To start the sample, run the following command:

Linux

./metavision_undistortion

Windows

metavision_undistortion.exe