Code Splitting

Discussion related to "under the hood" OpenMV topics.
Isperia
Posts: 14
Joined: Mon Oct 07, 2019 4:43 pm

Code Splitting

Postby Isperia » Mon Jan 13, 2020 3:01 pm

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?
User avatar
kwagyeman
Posts: 4271
Joined: Sun May 24, 2015 2:10 pm

Re: Code Splitting

Postby kwagyeman » Mon Jan 13, 2020 3:44 pm

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.
Nyamekye,
Isperia
Posts: 14
Joined: Mon Oct 07, 2019 4:43 pm

Re: Code Splitting

Postby Isperia » Sat Feb 08, 2020 12:42 pm

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
User avatar
kwagyeman
Posts: 4271
Joined: Sun May 24, 2015 2:10 pm

Re: Code Splitting

Postby kwagyeman » Sat Feb 08, 2020 2:33 pm

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.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests