Matching images of leafs

asked 2016-12-12 10:16:07 -0600

kbarni gravatar image

Hi,

I have a difficulties while trying to match the image of leafs. In fact it's the image of a single leaf taken on different dates, so the angle, size and illumination is a little different on each photo. In the meantime the leaf can deform a little (growing).

I try to match the leafs using keypoints. The SIFT/SURF detector give quite evenly placed keypoints, but the matcher (BF of Flann) can't match them (see image below). The code I'm using is very similar to this tutorial

image description

Do you have any other ideas to detect keypoints on the leafs and match them?

Here are some images I'm working with: IMAGES. I already eliminated most of the background (value 0) except some isolated pixels) and most of the differences of illumination.

I'll appreciate any ideas!!

edit retag flag offensive close merge delete

Comments

may be a threshold first and find gravity center of two leaf G1 G2. Use distance G1 to G2 to build a mask used in matching process

LBerger gravatar imageLBerger ( 2016-12-12 13:46:03 -0600 )edit

That's not all that many key points, try turning up that number a bit. Also, this might be a job for contour matching. You have pretty good edge features.

Tetragramm gravatar imageTetragramm ( 2016-12-12 20:20:33 -0600 )edit

@LBerger Thanks fot the idea; I wasn't aware of the possibility of using a mask during matching. I already tried a matching using the surface, gravity center and gradient histogram, that might affine my mask further. @Tetragramm Unfortunately I can't really rely on edges. As a matter of fact I try to detect diseases and they often "eat" the edges of the leaves....

kbarni gravatar imagekbarni ( 2016-12-13 10:18:27 -0600 )edit

That would make it difficult. I would also suggest using the findHomography method, with the RANSAC parameter set. RANSAC removes outliers, and that might help quite a bit, even after you've used the mask to get rid of the worst.

Tetragramm gravatar imageTetragramm ( 2016-12-13 17:55:20 -0600 )edit