YUY2 to RGB converter

Converts the YUY2 input from my Logitech camera to RGB. Might be same the as YUV to RGB converter.
3.7K Downloads
Updated 12 Feb 2010

View License

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 (2024). YUY2 to RGB converter (https://www.mathworks.com/matlabcentral/fileexchange/26249-yuy2-to-rgb-converter), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Convert Image Type in Help Center and MATLAB Answers
Acknowledgements

Inspired: image effect

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
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