-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
White screen on OpenCV3, but works on OpenCV2 #5404
Comments
I can confirm the problem |
I also have a white screen with opencv 3. |
Solved it. Look in the file
When you get there in debug mode, you see that the fps value is actually 30 (and not 1/30).
Changing this line to be:
solves the problem. It's of course not a complete solution, and probably other places in the code should change as well. |
None of the above 'solutions' work on Ubuntu 18.04 (Beta release) with python 2.7.14 and opencv 3. |
I wanted to preprocess the numpy array data returned by opencv, before displaying it. Unfortunately, kivy’s camera abstraction only offered texture binary data. This gist was useful to access the camera directly: |
FYI: opencv 2.4.13 works with kivy 1.10 on Ubuntu 18.04. |
Can confirm that @yoelk's "fix" works on Arch Linux using Python 3.6.5 and OpenCV 3.3.0 inside a Virtual Env. |
This looks like the same issue as #5146 |
@yoelk my line 121 is
And i'm getting the white screen. I'm not getting to download opencv2 either using pip or conda in my attempt to downgrade |
I can confirm that the webcam, tested with build-in bison and usb logitech, are now working on stable kivy 1.10.1 with the fix from @yoelk . I also have to comment out all the providers except the opencv in kivy/core/camera/init.py to force the use of opencv as the rest just fails and give all kinds of wierd errors. @CurtlyCritchlow the fix is in line 152: self._update_ev = Clock.schedule_interval(self._update, 1/self.fps) |
Versions
Description
I want to use my camera in Kivy using the official example code from here:
https://github.com/kivy/kivy/blob/1.10.0/examples/camera/main.py
However I only get a white screen when using cv2.so from
opencv-3.3.0|. If I compile
opencv-2.4.13.3` it works.It's interesting to note that in both cases the camera seems to get initialised (led turning on), but with opencv-2 the video shows, while the screen stays white with opencv-3.
I also tried with a more minimalist example below:
And I get the same result i.e. works with
opencv-2.4.13.3
not withopencv-3.3.0
.I downloaded both version from https://github.com/opencv/opencv/releases.
And they were both compiled with default flags (simply
cmake
and thenmake -j4
).Also for both the pure OpenCV example below is working.
So it really looks like a problem with its integration in Kivy.
The text was updated successfully, but these errors were encountered: