Ask Your Question
0

namedWindow bug on Ubuntu 16.04 [closed]

asked 2017-02-08 08:51:32 -0600

Sutil gravatar image

updated 2017-02-08 10:30:33 -0600

Hi,

I have just installed OpenCV from GitHub on Ubuntu 16.04 (Unity 7) and tried this basic program:

int main(int argc, char *argv[])
{
    if( argc != 2 ) {
        std::cerr << "Expecting 1 argument: /path/to/img" << std::endl;
        std::exit(EXIT_FAILURE);
    }

cv::Mat src { cv::imread(argv[1], CV_LOAD_IMAGE_COLOR) };
if( src.empty() ){
    std::cerr << "Error loading image: no data found" << std::endl;
    std::exit(EXIT_FAILURE);
}

cv::namedWindow("Example 1", CV_WINDOW_AUTOSIZE);
cv::imshow("Example 1", src);

cv::waitKey(0);
cv::destroyWindow("Example 1");

When I run the program, the window is "locked" on the upper left corner. I'm unable to grab it or do anything with it. There isn't even a close button. Sometime, I also get the toolbar with the zoom/save/... options. I get a similar result with CV_WINDOW_FULLSCREEN (the window is actually not in full screen mode). The other parameters are fine.

I haven't found any report of this behavior but I suppose this is a bug. Has anyone encounter this issue too?

I can't post a screenshot because I'm new and my karma is too low for this... : ( Sorry...

EDIT: something went wrong with my post layout but I'm unable to fix it. Sorry again.

EDIT: here is the cmake output


-- Detected version of GNU GCC: 54 (504) -- FP16: Feature disabled -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.2.8", minimum required is "1.2.3") -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") -- Checking for module 'gstreamer-base-1.0' -- No package 'gstreamer-base-1.0' found -- Checking for module 'gstreamer-video-1.0' -- No package 'gstreamer-video-1.0' found -- Checking for module 'gstreamer-app-1.0' -- No package 'gstreamer-app-1.0' found -- Checking for module 'gstreamer-riff-1.0' -- No package 'gstreamer-riff-1.0' found -- Checking for module 'gstreamer-pbutils-1.0' -- No package 'gstreamer-pbutils-1.0' found -- Checking for module 'gstreamer-base-0.10' -- No package 'gstreamer-base-0.10' found -- Checking for module 'gstreamer-video-0.10' -- No package 'gstreamer-video-0.10' found -- Checking for module 'gstreamer-app-0.10' -- No package 'gstreamer-app-0.10' found -- Checking for module 'gstreamer-riff-0.10' -- No package 'gstreamer-riff-0.10' found -- Checking for module 'gstreamer-pbutils-0.10' -- No package 'gstreamer-pbutils-0.10' found -- Checking for module 'libdc1394-2' -- No package 'libdc1394-2' found -- Checking for module 'libdc1394' -- No package 'libdc1394' found -- Looking for linux/videodev.h -- Looking for linux/videodev.h - not found -- Looking for linux/videodev2.h -- Looking for linux/videodev2.h - found -- Looking for sys/videoio.h -- Looking for sys/videoio.h - not found -- Checking for module 'libavresample' -- No package 'libavresample' found -- Checking for module 'libgphoto2' -- No package 'libgphoto2' found -- found IPP (ICV version): 9.0.1 [9.0.1] -- at: /home/simon/opencv/release/3rdparty/ippicv/ippicv_lnx -- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off -- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off -- Could NOT find Atlas (missing: Atlas_CBLAS_INCLUDE_DIR Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY) -- A library with BLAS API not found. Please specify library location. -- LAPACK requires BLAS -- A library with LAPACK API not found. Please specify library location. -- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)

-- VTK is not ...

(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by LBerger
close date 2017-02-28 08:20:44.173762

Comments

we need details, how you built it, e.g. cmake output

berak gravatar imageberak ( 2017-02-08 09:27:22 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-02-28 06:03:58 -0600

Sutil gravatar image

Problem mysteriously solved. I installed xfce4 because it's was annoying not to use CV_WINDOW_AUTOSIZE and now it works on Unity!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-02-08 08:51:32 -0600

Seen: 358 times

Last updated: Feb 28 '17