Пример #1
0
int HsvRange::testPoints(Mat *hsvImg, vector<Point> *testPoints)
{
    int matchesFound = 0;
    
    for(int i = 0; i < testPoints->size(); i++) {
        //drawPoint(img, &testPoints[i], &RED);
        if (testPixel(hsvImg, (*testPoints)[i].x, (*testPoints)[i].y)) {
            matchesFound++;
        }
    }
    return matchesFound;
}
Пример #2
0
bool SelMaps::doSelect()
{
	mp_nameCurProcess = GetString(IDS_PROCESS_SELECT);
	int interval = 3*m_imageW;
	for (int mapIndex=0; mapIndex<m_imageSz; mapIndex++)
	{
		mp_radMap[mapIndex] = ( testPixel(mapIndex) ) ? 0.0f : 1.0f;
		if ( ( (mapIndex%interval) == 0 ) && mp_blurMgr->progress(mp_nameCurProcess, mapIndex, m_imageSz) )
			return false;
	}

	return true;
}