128 if (bCalculateHSVImage)
148 if (bShowSegmentedImage && pResultImage)
173 void CObjectFinder::FindObjects(
const CByteImage *pImage,
CByteImage *pResultImage,
ObjectColor color,
int hue,
int hue_tol,
int min_sat,
int max_sat,
int min_v,
int max_v,
int nMinPointsPerRegion,
bool bShowSegmentedImage)
180 if (bShowSegmentedImage)
194 if (bShowSegmentedImage)
203 const int nRegions = (int) regionList.size();
205 for (
int i = 0; i < nRegions; i++)
207 const MyRegion ®ion = regionList.at(i);
212 objectEntry.
color = color;
213 objectEntry.
region = region;
215 objectEntry.
sName =
"CompactObject";
220 for (
int j = 0; j < (int)
m_ROIList.size(); j++)
226 if (entry.
color == color && fRatio > 0.75f && fDistance < min)
236 objectEntry.
id = best_id;
CRegionFilterInterface * m_pRegionFilter
virtual bool CheckRegion(const CByteImage *pColorImage, const CByteImage *pSegmentedImage, const MyRegion ®ion)=0
void SetColorParameterSet(const CColorParameterSet *pColorParameterSet)
bool FindRegions(const CByteImage *pImage, RegionList ®ionList, int nMinimumPointsPerRegion=0, int nMaximumPointsPerRegion=0, bool bCalculateBoundingBox=true, bool bStorePixels=false)
Performs region growing on a binary CByteImage, segmenting all regions in the image.
void CheckRegionsForObjects(const CByteImage *pColorImage, const CByteImage *pSegmentedImage, CByteImage *pResultImage, RegionList ®ionList, ObjectColor color)
int width
The width of the image in pixels.
void SetColorParameterSet(const CColorParameterSet *pColorParameterSet)
void FindRegionsOfGivenColor(CByteImage *pResultImage, ObjectColor color, RegionList ®ionList, int nMinPointsPerRegion)
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
bool ConvertImage(const CByteImage *pInputImage, CByteImage *pOutputImage, bool bFast=false, const MyRegion *pROI=0)
Converts a grayscale CByteImage to an RGB CByteImage image and vice versa.
Object2DList m_objectList
float Distance(const Vec2d &vector1, const Vec2d &vector2)
std::vector< MyRegion > RegionList
void SetImage(const CByteImage *pImage, const Object2DList *pROIList=0)
int height
The height of the image in pixels.
CByteImage * m_pSegmentedImage
void AddObject(const Object2DEntry &entry)
void FindObjectsInSegmentedImage(const CByteImage *pSegmentedImage, CByteImage *pResultImage, ObjectColor color, int nMinPointsPerRegion, bool bShowSegmentedImage)
CObjectColorSegmenter * m_pObjectColorSegmenter
void FindColoredRegions(CByteImage *pResultImage, RegionList ®ionList, int nMinPointsPerRegion)
void DrawRegion(CByteImage *pImage, const MyRegion ®ion, int r=255, int g=255, int b=255, int thickness=1)
Draws a rectangle into a CByteImage.
void FindObjects(const CByteImage *pImage, CByteImage *pResultImage, ObjectColor color, int nMinPointsPerRegion, bool bShowSegmentedImage)
void PrepareImages(const CByteImage *pImage, float fROIFactor=-1, bool bCalculateHSVImage=true)
GLubyte GLubyte GLubyte GLubyte w