cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Tanee
Visitor
Visitor
251 Views
Registered: ‎04-11-2021

There was an error in calling xfopencv in HLS to complete camera calibration and lens correction. Ask the seniors for guidance.THX

Jump to solution

When doing stereo vision on FPGA, there was an error in calling xfopencv in HLS to complete camera calibration and lens correction. Ask the seniors for guidance.

An error occurred in calling xfopencv in HLS to complete camera calibration and lens correction. Did not get the correct image,but got ALL BLACK img.

I have repeatedly read UG902 and UG1233 about the definition of the following functions:

xf::InitUndistortRectifyMapInverse();

xf::remap();

The program flow is to first call the xf::InitUndistortRectifyMapInverse() method to get mapx and mapy, and then use mapx and mapy as the parameters of xf::remap().

But for the xf::InitUndistortRectifyMapInverse() method, you need to pass in 7 parameters:

cameraMatrix, distCoeffs, ir, mapxLMat, mapyLMat, 9, 5

Among them, ir is the matrix obtained by multiplying the new coordinate system matrix and the rotation matrix and then taking the inverse according to the definition in the document. But in a xilinx post, the reply is to directly invert the rotation matrix.

I have tried both of the above solutions, but the image is still completely black.

And how to set the WIN_ROWS parameter in the report method? The default is 2. Is it okay to keep the default?

Attached is my program code.

Hope someone can point out my mistake, thank you very much! ! !

0 Kudos
1 Solution

Accepted Solutions
Tanee
Visitor
Visitor
220 Views
Registered: ‎04-11-2021

I fixed!!!finally !

ir is invert(newCameraMartix * R);

View solution in original post

0 Kudos
1 Reply
Tanee
Visitor
Visitor
221 Views
Registered: ‎04-11-2021

I fixed!!!finally !

ir is invert(newCameraMartix * R);

View solution in original post

0 Kudos