Skip to content

Commit

Permalink
Reg/OpticalFlow: fixed missing pt reprojection for last camera
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe committed Oct 30, 2024
1 parent 8b21c27 commit 6b31325
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion corelib/src/RegistrationVis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,9 @@ Transform RegistrationVis::computeTransformationImpl(
// Start from camera having the reference corner first (in case there is overlap between the cameras)
int startIndex = cornersFrom[i].x/subImageWidth;
UASSERT(startIndex < nCameras);
for(int c=startIndex; (c+1)%nCameras != 0; ++c)
for(int ci=0; ci < nCameras; ++ci)
{
int c = (ci+startIndex) % nCameras;
const CameraModel & model = toSignature.sensorData().cameraModels().size()?toSignature.sensorData().cameraModels()[c]:toSignature.sensorData().stereoCameraModels()[c].left();
cv::Point3f ptsInCamFrame = util3d::transformPoint(kptsFrom3D[i], inverseTransforms[c]);
if(ptsInCamFrame.z > 0)
Expand Down

0 comments on commit 6b31325

Please sign in to comment.