Advertisement
Guest User

Untitled

a guest
Aug 10th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1.  
  2. void runObjDetection(Mat& Input, string name, ObjectDetection& go, int imgIndex){
  3.      
  4.   Input = imread(name);
  5.  
  6.   if (!Input.empty()){
  7.     int start_s = clock();
  8.     go.setVariables(addweight_whites, addweight_blues, addweight_reds, whiteMinArea, whiteErodeArea, blueMinArea, blueErodeArea);
  9.  
  10.     Point test = go.getRobot_XY();
  11.     int stop_s = clock();
  12.     double execTime = (stop_s-start_s)/double(CLOCKS_PER_SEC);
  13.  
  14.     totaltime = totaltime + execTime;
  15.  
  16.     cout << setw(8) << left << imgIndex << " " << execTime << " point returned " << test << " : ";
  17.  
  18.     const string objfound = "objfound";
  19.  
  20.     // namedWindow(objfound, WINDOW_NORMAL);
  21.     imshow(objfound, go.FindStuff(Input));
  22.     // resizeWindow(objfound, 640, 480);
  23.   }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement