Skip to content

Add warpPointBackward to warpers #18608

@zteffi

Description

@zteffi
System information (version)
  • OpenCV => latest (4.5)
  • Operating System / Platform =>Windows 64 Bit
  • Compiler =>Visual Studio 2017
Detailed description

Current RotationWarper is missing functionality to reproject points from warped space back to rectilinear space, so for instance constructing homography with fisheye lens or for a panoramic video is not possible.

PR with proposed functionality: #18607

Steps to reproduce
Ptr<WarperCreator> creator = makePtr<PlaneWarper>();
Ptr<detail::RotationWarper> warper = creator->create(1);
Point2f pt(.5,1);
Mat I = Mat::eye(3, 3, CV_32FC1);
Point2f projected_pt = warper->warpPoint(pt, I, I);
Point2f reprojected_pt = warper->warpPointBackward(projected_pt, I, I);  
// reprojected_pt should be close to pt
Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    answers.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions