opencvpattern-matchingedge-detectiontemplate-matchingimage-registration

Edge/structure matching for image registration


I am working on image registration between LWIR & RGB images. I am able to extract the edges from both images. RGB_Edges, LWIR_Edges

Now, I want to match the edges of these images to calculate homography. I tried to match each edge of RGB with LWIR image separately using template matching (OpenCV) but it didn't worked.

Therefore, can anyone please suggest some methods to mach the edges/structures from both images that can be helpful to compute homography?

I will really appreciate any suggestion/help.

Thanks.


Solution

  • These two images are already fairly well aligned.

    Due to the large thickness and irregularity of the edges, I doubt you can do much better.

    enter image description here

    If you have the option of operator supervision, point at corresponding points in the two images (four pairs are enough for an homography).

    For an automated approach, you can try to thin the strokes then to find (approximate) line segments in both images. For a certain number of segments in one image, find the segment which is (approximately) parallel, close and facing with a significant overlap in the other. You can expect that these segments are in correspondence.

    Next, you can you can obtain corresponding points by forming the intersections between some segments in each image (take segments that are close but as perpendicular as possible).

    As this procedure will suffer from outliers, model fitting by RANSAC is probably a good option.

    enter image description here