OpenCV imshow not displaying image in osx
Thanks to @DanMašek for the lead on this one, and to all the people on this page: http://answers.opencv.org/question/160201/video-window-not-loading-frame/
To repeat what they said, what worked for me was the following:
To resolve this, locate the file window_cocoa.mm; if built from source it'll be in opencv/modules/highgui/src.
Change the following:
@implementation CVView
#if defined(__LP64__)
@synthesize image;
#else // 32-bit Obj-C does not have automatic synthesize
@synthesize image = _image;
#endif
To this:
@implementation CVView
@synthesize image = _image;
Do the same thing for the CVWindow and CVSlider implementations to accommodate videos as well.
Recompile OpenCV and test out your code.
Hope this helps other people struggling with this issue!
cv2.imshow() is not working properly in PyCharm (MacOS)
With Ubuntu 18.04 and Anaconda environment I was getting the error with Pycharm as
process finished with exit code 139 (interrupted by
signal 11 sigsegv)
Solved it by pip install opencv-python-headless
in addition to pip install opencv-python
OpenCV window not working on mac
It was a silly installation problem.
I wholeheartedly apologize.
Related Topics
How to Remove Element Not at Top from Priority_Queue
Initial Value of Reference to Non-Const Must Be an Lvalue
Access to Protected Member Through Member-Pointer: Is It a Hack
What's the Deal with Boost.Asio and File I/O
Static Const Member Value VS. Member Enum:Which Method Is Better & Why
Why Is There No Piecewise Tuple Construction
How to Test Whether Class B Is Derived from Template Family of Classes
C++ Passing an Array Pointer as a Function Argument
Vector Memory Allocation Strategy
Size of the Classes in Case of Virtual Inheritance
Is 'Volatile' Needed in This Multi-Threaded C++ Code
Do I Have to Include All These Qt Dlls with My Application