Page 1 of 1

Code Splitting

Posted: Mon Jan 13, 2020 3:01 pm
by Isperia
Hey, it's me again.
A teammate is pestering me, and I don't think it's possible, but is there a way to split code on OpenMV? For instance, could I define subfunctions in separate files from the one I'm running?
Thanks
P.S.
said teammate now thinks it might be useful to integrate an uncertainty factor into blob recognition (for example, standard deviation of the colors within the blob). This is another thing I'm pretty sure doesn't exist, so could I potentially rewrite the OpenMV firmware of my camera to add this?

Re: Code Splitting

Posted: Mon Jan 13, 2020 3:44 pm
by kwagyeman
Oh, just call get_stats() with the ROI set the area of the blob and pass the threshold argument with the colors used to find the blob. This will then give you the color stats of the blob.

Re: Code Splitting

Posted: Sat Feb 08, 2020 12:42 pm
by Isperia
Hi!
My goal detection is working pretty well, but to eliminate random colors that happen to be the same as the goal, I was thinking of combining detection with some kind of shape recognition. Is there any way to do this other than a Haar Cascade?
I'm hesitant to use the Cascade because the size of the goal will vary in the frame of view, due to the motion of the robot (perspective).
Are there any methods that I can use to combine shape and color recognition?
Thanks

Re: Code Splitting

Posted: Sat Feb 08, 2020 2:33 pm
by kwagyeman
Hi, color blobs have a lot of metrics associated with them like the area/pixels/perimeter/orientation/etc. Try using these to filter out other things.