Ask Your Question

Revision history [back]

namedWindow bug on Ubuntu 16.04

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[]) {
    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...

namedWindow bug on Ubuntu 16.04

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[]) *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);

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.

namedWindow bug on Ubuntu 16.04

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 found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file

-- General configuration for OpenCV 3.2.0-dev =====================================

-- Version control: 3.2.0-148-g976ee44

-- Platform: -- Timestamp: 2017-02-08T16:11:54Z -- Host: Linux 4.4.0-62-generic x86_64 -- CMake: 3.5.1 -- CMake generator: Unix Makefiles -- CMake build tool: /usr/bin/make

-- Configuration: RELEASE

-- C/C++: -- Built as dynamic libs?: YES -- C++ Compiler: /usr/bin/c++ (ver 5.4.0) -- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -- C Compiler: /usr/bin/cc -- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG -- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG -- Linker flags (Release): -- Linker flags (Debug): -- ccache: NO -- Precompiled headers: YES -- Extra dependencies: Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Test Qt5::Concurrent /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libtiff.so /usr/lib/x86_64-linux-gnu/libjasper.so /usr/lib/x86_64-linux-gnu/libjpeg.so avcodec-ffmpeg avformat-ffmpeg avutil-ffmpeg swscale-ffmpeg dl m pthread rt

-- 3rdparty dependencies: libwebp IlmImf

-- OpenCV modules: -- To be built: core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d stitching videostab -- Disabled: world -- Disabled by dependency: -

-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz

-- GUI: -- QT 5.x: YES (ver 5.5.1) -- QT OpenGL support: NO -- OpenGL support: NO

-- VTK support: NO

-- Media I/O: -- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8) -- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver ) -- WEBP: build (ver 0.3.1) -- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.20) -- TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.0.6) -- JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1) -- OpenEXR: build (ver 1.7.1) -- GDAL: NO

-- GDCM: NO

-- Video I/O: -- DC1394 1.x: NO -- DC1394 2.x: NO -- FFMPEG: YES -- avcodec: YES (ver 56.60.100) -- avformat: YES (ver 56.40.101) -- avutil: YES (ver 54.31.100) -- swscale: YES (ver 3.1.101) -- avresample: NO -- GStreamer: NO -- OpenNI: NO -- OpenNI PrimeSensor Modules: NO -- OpenNI2: NO -- PvAPI: NO -- GigEVisionSDK: NO -- Aravis SDK: NO -- UniCap: NO -- UniCap ucil: NO -- V4L/V4L2: NO/YES -- XIMEA: NO -- Xine: NO

-- gPhoto2: NO

-- Parallel framework: pthreads

-- Other third-party libraries: -- Use IPP: 9.0.1 [9.0.1] -- at: /home/simon/opencv/release/3rdparty/ippicv/ippicv_lnx -- Use IPP Async: NO -- Use VA: NO -- Use Intel VA-API/OpenCL: NO -- Use Lapack: NO -- Use Eigen: NO -- Use Cuda: NO -- Use OpenCL: YES -- Use OpenVX: NO

-- Use custom HAL: NO

-- OpenCL: <dynamic loading="" of="" opencl="" library=""> -- Include path: /home/simon/opencv/3rdparty/include/opencl/1.2 -- Use AMDFFT: NO

-- Use AMDBLAS: NO

-- Python 2:

-- Interpreter: /usr/bin/python2.7 (ver 2.7.12)

-- Python 3:

-- Interpreter: /usr/bin/python3 (ver 3.5.2)

-- Python (for build): /usr/bin/python2.7

-- Java: -- ant: NO -- JNI: NO -- Java wrappers: NO

-- Java tests: NO

-- Matlab: -- mex: /usr/local/MATLAB/R2016b/bin/mex

-- Compiler/generator: Not working (bindings will not be generated)

-- Documentation:

-- Doxygen: /usr/bin/doxygen (ver 1.8.11)

-- Tests and samples: -- Tests: YES -- Performance tests: YES

-- C/C++ Examples: NO

-- Install path: /usr/local

-- cvconfig.h is in: /home/simon/opencv/release

-- -----------------------------------------------------------------

-- Configuring done -- Generating done -- Build files have been written to: /home/simon/opencv/release