View Single Post
  #1   Spotlight this post!  
Unread 02-06-2010, 03:03 PM
buddyb's Avatar
buddyb buddyb is offline
Registered User
FRC #1885 (ILITE)
Team Role: Programmer
 
Join Date: Dec 2009
Rookie Year: 2008
Location: Haymarket, VA
Posts: 65
buddyb has a spectacular aura aboutbuddyb has a spectacular aura aboutbuddyb has a spectacular aura about
Camera ROI Usage?

Hello everyone,

In an attempt to speed up our camera code, I've played around a bit with contours and ROIs. Yet, searching for the target takes longer with an ROI than it does searching the whole image. This seems wrong, so I would like to solicit help on ROIs.

At the moment, my code looks like this:
Code:
//Initialization
const Rect areaOfInterest = {0, 0, 100, 100}; //A 100x100 square, within which the target resides.
ROI aoi;
imaqAddRectContour(&aoi, areaOfInterest);
vector<Target> results = luminancePlane->DetectEllipses(&targetEllipseDescriptor, &targetEllipseCurveOptions, &targetEllipseShapeOptions, &aoi);
What I want aoi to do is restrict the search area to the 100x100 square, but when I use &aoi instead of NULL in the search arguments, the searches take 2MS longer each time, which doesn't seem right, because I'm cutting off about 3/8ths of the image with the ROI.

Am I restricting the area correctly, and detectEllipses just taking extra time to check aoi to ensure it's within the area I want to search, or am I forgetting something that I have to add to the ROI to make it work?

All help appreciated.
~Buddy
__________________
FRC - Team 1885 - Programmer.

Last edited by buddyb : 02-06-2010 at 04:08 PM.
Reply With Quote