mirror of
https://github.com/opencv/opencv.git
synced 2025-08-05 05:56:36 +08:00
Merge pull request #21528 from sturkmen72:patch-5
This commit is contained in:
commit
1f6444fbea
@ -963,6 +963,8 @@ void cv::imshow( const String& winname, InputArray _img )
|
|||||||
{
|
{
|
||||||
CV_TRACE_FUNCTION();
|
CV_TRACE_FUNCTION();
|
||||||
|
|
||||||
|
const Size size = _img.size();
|
||||||
|
CV_Assert(size.width>0 && size.height>0);
|
||||||
{
|
{
|
||||||
cv::AutoLock lock(cv::getWindowMutex());
|
cv::AutoLock lock(cv::getWindowMutex());
|
||||||
cleanupClosedWindows_();
|
cleanupClosedWindows_();
|
||||||
@ -995,9 +997,7 @@ void cv::imshow( const String& winname, InputArray _img )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const Size size = _img.size();
|
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
CV_Assert(size.width>0 && size.height>0);
|
|
||||||
{
|
{
|
||||||
Mat img = _img.getMat();
|
Mat img = _img.getMat();
|
||||||
CvMat c_img = cvMat(img);
|
CvMat c_img = cvMat(img);
|
||||||
@ -1005,7 +1005,6 @@ void cv::imshow( const String& winname, InputArray _img )
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
const double useGl = getWindowProperty(winname, WND_PROP_OPENGL);
|
const double useGl = getWindowProperty(winname, WND_PROP_OPENGL);
|
||||||
CV_Assert(size.width>0 && size.height>0);
|
|
||||||
|
|
||||||
if (useGl <= 0)
|
if (useGl <= 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user