Ask Your Question
0

Shape Distance Logic

asked 2016-07-24 07:19:27 -0600

accqq gravatar image

I would like to ask the logic behind the shape distance provided in opencv 3.1 as I am confused by the results of using shape distance when comparing duplicated images.

I used the shape distance example as the starting point and tested the shape distance between copied bmp images (I just duplicated the bmp file of the sample image). The shape distance calculated is not stable and not equal to zero which makes me confused of the meaning of the magnitude of the calculated shape distance.

Therefore, I would like to ask for the logic behind the shape distance calculation. Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-07-24 08:59:49 -0600

Tetragramm gravatar image

Depending on which method you're using, it's either in HERE, the shape module, or HERE if you're using cv::matchShapes.

matchShapes is pretty simple, the others not so much.

edit flag offensive delete link more

Comments

Thanks a lot! I was using " cv::Ptr <cv::shapecontextdistanceextractor> mysc = cv::createShapeContextDistanceExtractor(); " to calculate the shape distance between the sample picture and the testing picture. Does it belong to the first one?

accqq gravatar imageaccqq ( 2016-07-30 02:12:44 -0600 )edit

That's the sc_dis.cpp file in the first one. I think.

Tetragramm gravatar imageTetragramm ( 2016-07-30 11:27:57 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-07-24 07:19:27 -0600

Seen: 134 times

Last updated: Jul 24 '16