hybridgroup / gocv

Go package for computer vision using OpenCV 4 and beyond. Includes support for DNN, CUDA, OpenCV Contrib, and OpenVINO.
https://gocv.io
Other
6.75k stars 869 forks source link

"ERROR: 0] VIDEOIO (AVFOUNDATION): raised unknown C++ exception!" appears on macos. #446

Open adorablely opened 5 years ago

adorablely commented 5 years ago

Run go run cmd\version\main.go "gocv version: 0.19.0" Opencv lib version: 4.0.1" but running face detection appears"[ERROR:0] VIDEOIO(AVFOUNDATION): raised unknown C++ exception!"

15652768278 commented 5 years ago

I also encountered this problem and looking for some help

deadprogram commented 5 years ago

Looks like you have a bad path to the video file you are using as input, or the DNN file you are using.

Hope that helps!

Zernach commented 4 years ago

I was having the same error, but finally fixed it on my own! Please see image below. In my errors, I found a line that said "Name CamTwist" —— CamTwist was an application/plug-in that I installed months ago, which was clogging the main access to my webcam. I had already uninstalled the application a few weeks ago, but there were some leftover files on my hard-drive, so I went to my Finder > Home > Search: CamTwist, and behold! There were two files with CamTwist included, so I threw them in the trash can, emptied that thing REAL quick, re-ran my code, and WALLAH! I was so happy.

I'd recommend searching for that "Name" line. Perhaps you, too, have installed some silly webcam app that's clogging access!

[Click to view screenshot of my terminal code and where I found the core issue for my bug][1] https://i.stack.imgur.com/WL7O2.png

DinithiSarithma commented 4 years ago

I was having the same error, but fixed it on my own. My in-built webcam was working fine but the external (usb) gave this error. I have a macbook air so I did an SMC reset. After that the project worked fine. A way to see if your webcam is identified by the machine is to open photobooth and see if the external webcam is given as an option on the camera tab above. If it doesn't show, then the problem is the same as mine. Or if the other webcam is shown as an option but cannot use, the same issue, so the SMC reset works for this.