Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

How to transform new points after the matches were found? #32

@thiagoribeirodamotta

Description

@thiagoribeirodamotta

Hi there,

First of all, I'd like to thanks for the great contribution! I'm looking forward to keep on trying this out!

The scenario I'm currently working on requires the transformation matrix that takes points placed on Image1 and correctly place them on Image2.

Since I couldn't find where in the code this transformation happens, I just followed the demo.py script and added the following at the end of it:

  src_pts = np.float32(match_kp0).reshape(-1,1,2)
  dst_pts = np.float32(match_kp1).reshape(-1,1,2)
  M, _ = cv.findHomography(src_pts, dst_pts, cv.RANSAC,3.0)

  transformed_points_to_image_2= cv.perspectiveTransform(np.float32(new_points_image_1).reshape(-1,1,2), M)

Would you say this is the correct approach to transform new points from image 1 coordinate space to image 2 coordinate space?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions