fangfufu / Linux-Fake-Background-Webcam

Faking your webcam background under GNU/Linux, now supports background blurring, animated background, colour map effect, hologram effect and on-demand processing.
GNU General Public License v3.0
1.6k stars 161 forks source link

Not working with OpenCV 4.5.4 #169

Closed X-dark closed 2 years ago

X-dark commented 2 years ago

I get the following error when running with OpenCV 4.5.4 (works fine with OpenCV 4.5.3):

INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
 terminate called after throwing an instance of 'cv::Exception'
   what():  OpenCV(4.5.4) /build/opencv/src/opencv-4.5.4/modules/core/src/matrix_wrap.cpp:1476: error: (-27:Null pointer) create() called for the missing output array in function 'create'

This happens as soon as I try to access the virtual webcam.

This is on ArchLinux with Fake-Background-Webcam built from latest git commit.

fangfufu commented 2 years ago

I guess you could try and use a virtualenv? Let me know if that fixes it.

X-dark commented 2 years ago

As I said if I downgrade to opencv and python-opencv 4.5.3 it works fine. I am not sure I could do the same in a virtualenv as I would need anyway to downgrade opencv to have it on the same version of python-opencv of the virtualenv.

Anyway, I can keep using opencv and python-opencv 4.5.3 for the time being.

I had a quicklook on opencv release notes and I cannot see an item that I could directly link to this error. So I guess deeper investigation will be needed.

renyuneyun commented 2 years ago

I have exactly the same issue after a recent upgrade to my system (I'm using archlinux).

Except for issues with opencv or python-opencv, I would also guess if that is related to the compilation of the package (or its dependencies) -- they were compiled against opencv 4.5.3. But I recompiled fake-background-webcam-git, and got no luck. Haven't had time to figure out its dependencies yet.

renyuneyun commented 2 years ago

OK, I found a fix (for me at least): recompile and install python-mediapipe-git .

X-dark commented 2 years ago

This is now fixed for me as well. Not sure what changed. Maybe latest mediapipe commit.