Image processing

6 ビュー (過去 30 日間)
Amit Bedi
Amit Bedi 2011 年 9 月 5 日
回答済み: BHAVIN JOISAR 2020 年 1 月 3 日
when i write a code in matlab, it shows my camera's default as YUY2 format instead of rgb format. This is troubling me a lot. How can i change it to rgb?...... I am also unable to save image. and import image from stored location on my laptop

回答 (2 件)

Walter Roberson
Walter Roberson 2011 年 9 月 5 日
Please see http://www.mathworks.com/matlabcentral/fileexchange/26249-yuy2-to-rgb-converter -- and be sure to read the description there, as it reports an alternate approach that might happen to work for you.

BHAVIN JOISAR
BHAVIN JOISAR 2020 年 1 月 3 日
Use ReturnedColorSpace function to retain your camera to RGB format
You can use it in following way
myCam = imaq.VideoDevice('winvideo');
myCam.VideoFormat = 'YUY2_640x480';
myCam.ReturnedColorSpace = 'rgb';
vidPlayer = vision.DeployableVideoPlayer;
for idx = 1: 100
videoFrame = step(myCam);
step(vidPlayer,videoFrame);
end
release(myCam);
release(vidPlayer);

製品


リリース

R2011a

Community Treasure Hunt

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

Start Hunting!

Translated by