zart
zart copied to clipboard
zart on Mac does not initialize the camera
Since some time I get constantly crashes. I am using the actual git version!
`/Users/karo $ sw/zart/zart.app/Contents/MacOS/zart OpenCV: out device of bound (0-0): 1 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 2 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 3 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 4 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 5 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 6 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 7 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 8 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 9 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 10 OpenCV: camera failed to properly initialize! libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(3.4.13) /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv/opencv/work/opencv-3.4.13/modules/videoio/src/cap.cpp:193: error: (-215:Assertion failed) api != 0 in function 'getBackendName'
zsh: abort sw/zart/zart.app/Contents/MacOS/zart `
Hmm, nobody there to look into this issue?
I have now tried to build zart with opencv4. Unluckily the same error occurs at initialization of the camera:
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(4.5.0) /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.0/modules/videoio/src/cap.cpp:299: error: (-215:Assertion failed) api != 0 in function 'getBackendName'
By the way the camera is correctly driven with the gmic cli and opencv4!
You may try this f939cf381c5871e506aabd066037acf2b55143c1d It should prevent the crash but it does not mean the camera will be detected though.
Hmm, don't know what to do with this!
The last git changes brought some improvement!
zart.app still crashes. However, starting exec zart in terminal repeats the initialization part a second time and finally finds the camera. By the way, using openCV 4 might make sense. Trying gmic cli with opencv4 worked well! I don't know the technique in zart.pro well enough to change it by myself.
$ ./sw/zart/zart.app/Contents/MacOS/zart OpenCV: out device of bound (0-0): 1 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 2 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 3 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 4 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 5 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 6 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 7 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 8 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 9 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 10 OpenCV: camera failed to properly initialize! Error: cannot open camera 0 OpenCV says: OpenCV(3.4.13) /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_opencv/opencv/work/opencv-3.4.13/modules/videoio/src/cap.cpp:193: error: (-215:Assertion failed) api != 0 in function 'getBackendName'
OpenCV: out device of bound (0-0): 1 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 2 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 3 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 4 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 5 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 6 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 7 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 8 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 9 OpenCV: camera failed to properly initialize! OpenCV: out device of bound (0-0): 10 OpenCV: camera failed to properly initialize! [ZArt] Webcam 0 is available (1280x720)
Still no change with latest git build with opencv4

zart.app crashes and start from terminal works with the messages as before
OpenCV says: OpenCV(4.5.0) /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.0/modules/videoio/src/cap.cpp:299: error: (-215:Assertion failed) api != 0 in function 'getBackendName'