ROI & AprilTags: Trying to improve distance

Discussion related to "under the hood" OpenMV topics.
gcl8a
Posts: 1
Joined: Thu May 24, 2018 3:39 pm

ROI & AprilTags: Trying to improve distance

Postby gcl8a » Thu May 24, 2018 4:04 pm

I'm trying to improve the distance from which I can detect AprilTags. The plan is to make an "indoor GPS" where I detect AprilTags affixed to small UGVs and then send the coordinates to the individual robots. Basically, I want to use it to emulate GPS -- outside looking in -- for some labs for my students. The lab space has a 12' ceiling, and I'd like to mount the camera as high as possible to cover as much ground as possible. The vehicles are not that big, so the obvious solution -- bigger tags -- can only go so far.

I played with two of the example codes, and find_april_tags_w_lens_zoom.py gives plenty of distance, but at reduced FOV, of course, whereas the basic example, find_apriltags.py, gives a good FOV but only about 7' - 8' range in the lighting I have.

The zoom example uses VGA resolution and then set_windowing() to select a 160x120 snapshot. The basic example uses QQVGA resolution, which is 160x120.

Now, I see that image.find_apriltags takes a ROI as a parameter. So, clever me thought that I could capture the snapshot at VGA resolution and then make repeated calls to find_apriltags(), each searching a different region. It would be slower, but probably fast enough for my purposes. Trouble is, find_apriltags() balks whenever I try this -- apparently it won't accept a properly-sized ROI if the underlying snapshot is too big.

So, my question is: Is there any way to get higher resolution out of the system, either by better implementation of my idea above or some other means? Again, I'm aware that larger tags will work, but if there is an easier way in software, I'd love to try it.

(I'm also dabbling with color recognition, but lighting makes that difficult, as well.)
User avatar
kwagyeman
Posts: 2275
Joined: Sun May 24, 2015 2:10 pm

Re: ROI & AprilTags: Trying to improve distance

Postby kwagyeman » Thu May 24, 2018 5:06 pm

Hi, our AprilTag performance is limited by the amount of memory we have. Even when you set the ROI to 160x120 the frame buffer still has to store the image which is large and takes space. If you'd like to do repeated calls then shrink the ROI more. A VGA res sized image uses up almost all memory anyway.

Um, so, larger tags, this is the easiest way. Or, you can do multiple cameras. Or, mount one camera with a zoom lens on some pan and tilt system.

Um, the other thing to do is manipulate set_windowing. I think the method works in software now, but, I will fix any issues with it if there's issues. This allows the frame that's stored in the frame buffer itself to be cut down. Then you can scan without using memory up.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests