Skip to content

highgui: imshow can only show CV_8U images #13216

@berak

Description

@berak
  • OpenCV => master
  • Operating System / Platform => Windows 64 Bit
  • Compiler => mingw64 / 7.2.0
Detailed description

regression after: 11eafca

the cvConvertImage() calls were removed.
while code was added to adapt the colorspace, there is no more depth conversion to CV_8U

Steps to reproduce
//Mat m(400,400,CV_32FC3,Scalar(1.0));
Mat m(400,400,CV_16U,Scalar(255));
imshow("win",m);
waitKey();

leading to:

OpenCV(4.0.0-pre) Error: Assertion failed (dst.data == (uchar*)dst_ptr) in cvShowImage, file C:\p\opencv\modules\highgui\src\window_w32.cpp, line 1230

apart from the windows version (tried here), others will be affected:

  • window_w32.cpp
  • window_cocoa.mm
  • window_gtk.cpp
  • window_QT.cpp

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions