i am trying to apply SURF algorithm, which is the algo to find the key points and matches corresponding two images, but the problem is that in my case , i want to apply that algo with two images, but they are of different dimension and so it fails to work, could you please tell what shall i do so that both images become equal dimensions.
Share
That depends on your problem. If the images have the same resolution, I suggest you either crop one image or extend one image (with zeros?) to match the number of pixels.
Otherwise I suggest you interpolate the images so that they are defined at the same points, for example with interp2.
Can you give a minimum working code example of what you are trying to do?
Edit:
The code example you gave starts with loading to images.
Here are a few examples of how you can make the images match. You have to decide which one of these makes sense in your case.
Method 1: crop both images
Method 2: Extend the images with zeros until they match
Method 3: Scale the second image to the size of the first one (which destroys the aspect ratio)