mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
committed by
Alexander Alekhin
parent
4e7b521438
commit
6d34d6b47e
@@ -1270,7 +1270,7 @@ void cvCreateTrainingSamples( const char* filename,
|
||||
if( showsamples )
|
||||
{
|
||||
cvShowImage( "Sample", &sample );
|
||||
if( cvWaitKey( 0 ) == 27 )
|
||||
if( (cvWaitKey( 0 ) & 0xFF) == 27 )
|
||||
{
|
||||
showsamples = 0;
|
||||
}
|
||||
@@ -1402,7 +1402,7 @@ void cvCreateTestSamples( const char* infoname,
|
||||
if( showsamples )
|
||||
{
|
||||
cvShowImage( "Image", &cvbgreader->src );
|
||||
if( cvWaitKey( 0 ) == 27 )
|
||||
if( (cvWaitKey( 0 ) & 0xFF) == 27 )
|
||||
{
|
||||
showsamples = 0;
|
||||
}
|
||||
@@ -1525,7 +1525,7 @@ int cvCreateTrainingSamplesFromInfo( const char* infoname, const char* vecfilena
|
||||
if( showsamples )
|
||||
{
|
||||
cvShowImage( "Sample", sample );
|
||||
if( cvWaitKey( 0 ) == 27 )
|
||||
if( (cvWaitKey( 0 ) & 0xFF) == 27 )
|
||||
{
|
||||
showsamples = 0;
|
||||
}
|
||||
@@ -1672,7 +1672,7 @@ void cvShowVecSamples( const char* filename, int winwidth, int winheight,
|
||||
icvGetTraininDataFromVec( sample, &file );
|
||||
if( scale != 1.0 ) cvResize( sample, scaled_sample, CV_INTER_LINEAR);
|
||||
cvShowImage( "Sample", scaled_sample );
|
||||
if( cvWaitKey( 0 ) == 27 ) break;
|
||||
if( (cvWaitKey( 0 ) & 0xFF) == 27 ) break;
|
||||
}
|
||||
if( scaled_sample && scaled_sample != sample ) cvReleaseMat( &scaled_sample );
|
||||
cvReleaseMat( &sample );
|
||||
@@ -1680,4 +1680,4 @@ void cvShowVecSamples( const char* filename, int winwidth, int winheight,
|
||||
}
|
||||
fclose( file.input );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ PipelineExitStatus CalibPipeline::start(std::vector<cv::Ptr<FrameProcessor> > pr
|
||||
for (std::vector<cv::Ptr<FrameProcessor> >::iterator it = processors.begin(); it != processors.end(); ++it)
|
||||
processedFrame = (*it)->processFrame(processedFrame);
|
||||
cv::imshow(mainWindowName, processedFrame);
|
||||
int key = cv::waitKey(CAP_DELAY);
|
||||
char key = (char)cv::waitKey(CAP_DELAY);
|
||||
|
||||
if(key == 27) // esc
|
||||
return Finished;
|
||||
|
||||
Reference in New Issue
Block a user