1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
void coriolus::vertoffset_callback(int position){
vertoffset = position;
}
void coriolus::oddoffset_callback(int position){
oddoffset = position;
}
void coriolus::offsetAdjust(){
IplImage * logo = cvLoadImage(LOGO_IMG,0);
int maxvertoffset = 100*numja*numjets/inputimage->height/3; ///check numbers
vertoffset = maxvertoffset-verticaloffsetbuffer;
cout <<"Maximum Vertical Offset Adjusted to " << maxvertoffset << "%"<<endl;
cvNamedWindow(PANEL,1);
cvMoveWindow(PANEL,0,0);
cvCreateTrackbar(H_SPC_TBARNAME,PANEL,&h_spc,3000,h_spc_callback);
cvCreateTrackbar(VERTOFFSET_TBARNAME,PANEL,&vertoffset,maxvertoffset-verticaloffsetbuffer,vertoffset_callback);
cvCreateTrackbar(ODDOFFSET_TBARNAME,PANEL,&oddoffset,100-oddoffsetbuffer,oddoffset_callback);
if(prev_mode==0){
cvNamedWindow( H_SPC_PREVIEW_WINDOW_NAME,1);
}
if(prev_mode==1){
cvNamedWindow( H_SPC_PREVIEW_WINDOW_NAME,0);
cvResizeWindow(H_SPC_PREVIEW_WINDOW_NAME,PREV_RES,PRIEVIEW_WINDOW_HEIGHT);
}
|