Get RAW stream of webcam
6 views (last 30 days)
Show older comments
We are using a camera that is detected correctly by the Image Acquisition Toolbox as Webcam. But the camera Firmware provides a wrong data format information. The Information it gives is YUY2 as format, but what it actually delivers is a 12bit per Pixel image (2 Bytes with 4 bit unused) in a BGGR Bayer pattern. Now when acquiring images with the Toolbox it misinterprets the image and outputs a 3-channel image. I assume it trys to convert my data from YUY2 to RGB which turns out to be wrong. Is there a way to get the raw byte stream from the webcam with the Toolbox?
6 Comments
mario iobbi
on 1 Dec 2017
Thank you for responding. Glad to know that it is feasible but it is unfortunate that it isn't straightforward. You would not happen to still have the code and be willing to share the the code to aquire the stream someplace?
Answers (1)
Image Analyst
on 21 Dec 2015
What does this say:
fprintf('ReturnedColorspace = %s', vidobj.ReturnedColorspace);
where vidobj is your video object.
2 Comments
Image Analyst
on 22 Dec 2015
Edited: Image Analyst
on 22 Dec 2015
How do you know that the gray scale output is not just raw bytes, which represent your mosaiced values? For example the Mandi "gray scale" demo image that ships with MATLAB?
See Also
Categories
Find more on Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!