-
Notifications
You must be signed in to change notification settings - Fork 53
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
RAW-16 Not Working on OS X #7
Comments
Unfortunately this is the problem - 16 bit video support is not great on OS X unfortunately. You might have some luck with a generic UVC driver, but you can't use OpenCV. Take a look at https://github.com/groupgets/libuvc for example. It should support Y16. Maybe also you could try gstreamer? That may be a good route actually, I'll have a look into that (though it would require compiling everything from scratch). I added 16 bit video support to OpenCV for Linux and Windows some time ago; I looked into doing the same for OS X but I think AVFoundation is quite limited in terms of supported codecs. In theory there should be no problem, because the most recent builds of iOS can deal with the disparity map streams from newer iPhones, and that's almost certainly 16-bit data. I'd be interested if you can get gstreamer to work, using eg |
That is right, it seems the problem is OSX. I tested it on Linux and the 16-bit works correctly. |
On macOS before macOS 12 (macOS 11.6.2 or earlier to be exact), libuvc works. However, on macOS 12, libuvc does not work at all. When trying to open the camera device, uvc_open() results in "uvc err: Access denied (-3)". more details in this Issue: |
Hi,
First let me thank you for creating this repository. It is very useful and the code is very clean. I am trying to get the RAW pre AGC 16-bit data, but using the provided instructions I am only getting uint8:
camera = Boson()
camera.setup_video(device_id=2)
image = camera.grab()
print(image.dtype)
uint8
I did check that the following lines return 0 so I am not sure why this is happening:
The order of these calls matters!
self.cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc(*"Y16 "))
self.cap.set(cv2.CAP_PROP_CONVERT_RGB, False)
P.S: I am running this on MAC
The text was updated successfully, but these errors were encountered: