cv.jit.blobs.recon's reference matrix differs from cv.jit.learn's

Jul 8, 2010 at 4:05pm

cv.jit.blobs.recon's reference matrix differs from cv.jit.learn's

hi!

even with basic shapes I end up failing. (in this case I train cv.jit.learn with a simple circle.) all I get when using cv.jit.blobs.recon is some flickering, a hint of my circle (my only success after minutes of responselessness)

cv.jit.learn’s compare mode gives my satisfying results, but when feeding cv.jit.blobs.recon the whole thing turns out quite nerve-wracking. :) (though these initial steps shouldn’t be that difficult)

what I noticed right away – cv.jit.learn’s and cv.jit.blobs.recon’s initial matrix are not congruent:

cv.jit.learn’s help file starts off with:
[cv.jit.grab] -> [jit.rgb2luma] -> [cv.jit.threshold]

whilst cv.jit.blobs.recon works with:
[cv.jit.grab] -> [jit.rgb2luma] -> [jit.op]

the picture both objects work with differs. could that be the reason? otherswise I might just not be a match for cv.jit.learn/cv.jit.blobs.recon. either that or my patience is leading me to a dead end :)

I’ve tried adjusting (beginning with [cv.jit.grab] -> [jit.rgb2luma] -> [jit.op] on both objects), but it just won’t work.

cheers!

-jonas

#51281
Jul 8, 2010 at 4:08pm

overview :)

– Pasted Max Patch, click to expand. –
#183908
Jul 9, 2010 at 12:55pm

Hi,

It looks like the way the help file is written causes some display problems when there is only one blob. The output measurement from cv.jit.blobs.recon is correct, though. You can compare and send the same matrix to both cv.jit.learn and cv.jit.blobs.recon and they will report the same distance.

The problem is with how the map matrix for jit.charmap is built. I’ll make a note to fix it for the next release, but the problem only affect the display, not the actual measurement.

Jean-Marc

#183909
Jul 9, 2010 at 1:36pm

ok. thanks, jean-marc!

as I’m merely dealing with a circle, I thought of manually fooling around with what cv.jit.blobs.moments (respectively cv.jit.moments) gives me on my shape. maybe I get more reliable results feeding cv.jit.blobs.recon directly with moments’ output rather than training cv.jit.learn (which I doubt)

all the best

-jonas

#183910
Jul 9, 2010 at 3:45pm

I figured out quite well in the end, using cv.jit.learn after all.. my combination of impatience & not focussing/reducing/adapting my reference matrix to the shape of desire paid its toll..

after having gotten rid of superfluous background (instead of drawing on my complete webcam feed for training issues) it turned out to work quite reliable.. what a surprise.

have a nice weekend everyone

-jonas

– Pasted Max Patch, click to expand. –
#183911

You must be logged in to reply to this topic.