How to Align two images?

asked 2020-09-29 07:43:40 -0600

bluehawk91 gravatar image

updated 2020-09-30 12:40:31 -0600

Hi!

Hope you're all doing well! I am working on a project two fuse two images (RGB + IR). I am using FLIR dataset. RGB image resolution is 1800x1600, whereas IR images are 640x512. Additionally, RGB images have slightly wider angle and has more info, so when the images go through image fusion, it produces shadowy output. I am looking to crop the images, so the details match infrared images. I came across a medium article where the author used feature matching to identify and crop parts. It works great for daylight scenes, however, it produces very wrong results when night scenes images are used. I notice the feature matching is not correct either. I have tried other methods (SURF, SIFT as well, but they don't seem to work well either, unless I am missing something? I am new to CV).

1) Do you know what could be causing this issue to occur? 2) Is there any other straight forward method I can use to crop RGB images? Because the position of rgb camera is fixed, so maybe cropping by certain factor or identifying height, width points can be used to crop the images?

Cropped Image Daylight (1) - https://imgur.com/0r6gQkX

Cropped Image Nightscene (2) - https://imgur.com/PTlFCue

Best Regards

Results Compared (night scene matching is not accurate) image description

Daylight Scene matches and cropped properly. image description

Original Image Night Scene C:\fakepath\apicture.jpg

Original image of day scene image description

edit retag flag offensive close merge delete

Comments

1

can you put your images here, please, noton an external site ?

(imgur is also not visible / blocked from several countries)

berak gravatar imageberak ( 2020-09-29 09:39:24 -0600 )edit
1

added pictures. Thanks!

bluehawk91 gravatar imagebluehawk91 ( 2020-09-29 13:59:58 -0600 )edit

the night scene RGB picture is simply of very poor quality. it's blurry and noisy, and the scene is mostly dark. discard that pair of images. it's not worth spending time on that.

crackwitz gravatar imagecrackwitz ( 2020-09-30 08:24:11 -0600 )edit

maybe... post the original pictures of the night scene. it seems as if you just posted the output of the failed execution.

crackwitz gravatar imagecrackwitz ( 2020-09-30 08:25:00 -0600 )edit

Alright! I updated the original night scene image as an attachment. It wasn't displaying the image with image function in the forum. Thanks!

bluehawk91 gravatar imagebluehawk91 ( 2020-09-30 12:23:24 -0600 )edit

Anyone got any suggestions?

bluehawk91 gravatar imagebluehawk91 ( 2020-10-04 16:43:16 -0600 )edit

For what it's worth, I was able to find fixed coordinates that makes two images align, but it seems they change throughout the dataset, so I don't think I can batch process them.

bluehawk91 gravatar imagebluehawk91 ( 2020-10-06 15:23:17 -0600 )edit