241 <<
static_cast<int>(hsv.
s) <<
" "
242 << static_cast<int>(hsv.
v);
247 cout <<
"size: " << img->width <<
"x" << img->height << endl;
248 cout <<
"channels: " << img->nChannels << endl;
249 cout <<
"depth: " << img->depth << endl;
253 vector<CvPoint> result;
255 for (
int x=0;x<img->width;x++) {
256 for (
int y=0;y<img->height;y++) {
257 if (cvGetReal2D(img, y, x)>threshold) {
258 result.push_back(cvPoint(x,y));
267 if (points.size()==0)
return cvPoint(0,0);
269 return points[rand()%points.size()];
276 for (
unsigned int i=0;i<points.size();i++) {
277 cout << points[i] << endl;
282 #define MAX_FRAME_COUNT -1
287 <<
"Usage: " << endl;
289 for (
unsigned int i=0;i<options->size();i++) {
307 >> bmfi.
pos[0] >> bmfi.
pos[1]
312 int main(
int argc,
char** argv) {
313 MHDBGMSG(__FILE__,__LINE__,__PRETTY_FUNCTION__);
314 srand((
unsigned) time(
nullptr));
316 cout <<
"number of threads: " << cvGetNumThreads() << endl;
326 options.push_back(&srcOpt);
327 options.push_back(&algOpt);
328 options.push_back(&fpsOpt);
329 options.push_back(&servOpt);
331 for (
int i=1; i<argc; i++) {
332 options.
Parse(argv[i]);
339 IceServer* iceServer = IceServer::GetInstance();
340 cout <<
"IceServer started" << endl;
341 visionObserver = IceServer::GetInstance()->GetVisionObserver();
346 cerr <<
"IceServer is not available. Please recompile" << endl;
367 if (visionObserver) flow->
AddObserver(visionObserver);
393 cout <<
"Press any key to exit" << endl;
458 MHDBGMSG(__FILE__,__LINE__,
"Success - Bye");