CV_IMPL void cvShowImage( const char* name, const CvArr* arr ) { CV_FUNCNAME( "cvShowImage" ); __BEGIN__; CvWindow* window; if( !name ) CV_ERROR( CV_StsNullPtr, "NULL name" ); CV_LOCK_MUTEX(); window = icvFindWindowByName(name); if(!window) { cvNamedWindow(name, 1); window = icvFindWindowByName(name); } if( window && arr ){ CvImageWidget * image_widget = CV_IMAGE_WIDGET( window->widget ); cvImageWidgetSetImage( image_widget, arr ); } CV_UNLOCK_MUTEX(); __END__; }
CV_IMPL void cvShowImage( const char* name, const CvArr* arr ) { CV_FUNCNAME( "cvShowImage" ); __BEGIN__; CvWindow* window; if( !name ) CV_ERROR( CV_StsNullPtr, "NULL name" ); CV_LOCK_MUTEX(); window = icvFindWindowByName(name); if(!window) { cvNamedWindow(name, 1); window = icvFindWindowByName(name); } if( window && arr ) { #ifdef HAVE_OPENGL if (window->useGl) { CvMat stub; CvMat* mat = cvGetMat(arr, &stub); cv::Mat im(mat); cv::imshow(name, im); return; } #endif CvImageWidget * image_widget = CV_IMAGE_WIDGET( window->widget ); cvImageWidgetSetImage( image_widget, arr ); } CV_UNLOCK_MUTEX(); __END__; }