YUY2 to RGB converter
Converts the YUY2 input from my Logitech camera to RGB. Might be same the as YUV to RGB converter.
If you need this file for processing video input from your camera, here's an alternate way (which I haven't tested). Quoting Lautaro Camona (http://www.mathworks.com/matlabcentral/newsreader/view_thread/263490#716245):
"I recently had the same problem, my webcam takes only the YUY2 format...
I solved this problem doing this:
%1st you set the camera to use.
%'camera' is the DeviceID of your camera.
vinfo = imaqhwinfo('winvideo',camera);
%Then you set the video object 'vid', where 'camera' is the DeviceID of your camera.
%'format' is the index which specifies one of the YUY2 formats of your camera.
vid = videoinput('winvideo',camera,vinfo.SupportedFormats{format});
%Finally, you set the ReturnedColorSpace as RGB!
set(vid,'ReturnedColorSpace','rgb'); %<----- This is the command!!!!"
Cite As
Gabi Teodoru (2026). YUY2 to RGB converter (https://uk.mathworks.com/matlabcentral/fileexchange/26249-yuy2-to-rgb-converter), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > Images > Convert Image Type >
Tags
Acknowledgements
Inspired: image effect
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.1.0.0 | Referenced comment from (http://www.mathworks.com/matlabcentral/newsreader/view_thread/263490#716245) about getting in rgb data directly |
||
| 1.0.0.0 |
