Permalink
Browse files

comments

  • Loading branch information...
1 parent ee10bea commit 5667ecea894e1bea8f005574c4a2017a7b61214b @mattrepl committed May 7, 2008
Showing with 9 additions and 7 deletions.
  1. +7 −5 focus.cxx
  2. +1 −1 satori.cxx
  3. +1 −1 satori_app.cxx
View
@@ -75,11 +75,13 @@ void Focus::update(const CvBox2D* track_box,
}
}
else{
- if ((seg_amt < 0.15f &&
- seg_frame_size_ratio > 0.02f) ||
- (intersect_area > frame_area * 0.01f &&
- cam_frame_size_ratio > 0.2f &&
- cam_amt < 0.55f)) {
+ // the first clause detects when a better region to track exists
+ // the second clause detects camshift drifting
+ if ((seg_amt < 0.15f && // <15% of largest motion segment (LMS) intersects with camshift window
+ seg_frame_size_ratio > 0.02f) || // LMS' area is >2% of the frame area
+ (intersect_area > frame_area * 0.01f && // intersection area is >1% of frame area
+ cam_frame_size_ratio > 0.2f && // camshift window's area is >20% of frame area
+ cam_amt < 0.55f)) { // <55% of camshift window intersects with LMS
changed = true;
if (seg_amt < 0.15f && seg_frame_size_ratio > 0.02f){
}
View
@@ -162,6 +162,6 @@ void display_program_commands(){
cout << " " << "f" << ": Toggle flow processing and feature tracking" << endl;
cout << " " << "t" << ": Toggle motion segmentation and object identificaion" << endl;
cout << " " << "r" << ": Find and track a moving object" << endl;
- cout << " " << "p" << ": Use point density and count in tracking decision" << endl;
+ // cout << " " << "p" << ": Use point density and count in tracking decision" << endl;
cout << endl;
}
View
@@ -179,7 +179,7 @@ int SatoriApp::run_webcam(bool verbose){
case 'r':
track.reset(flow);
break;
- case 'd':
+ case 'p':
points_decide = !points_decide;
break;
default:

0 comments on commit 5667ece

Please sign in to comment.