i am taking image as input to the code.But image are not proper.
Show older comments
This is my code
clc;
close all;
clear all;
obj = videoinput('winvideo', 1);
set(obj, 'SelectedSourceName', 'input1');
src_obj = getselectedsource(obj);
get(src_obj);
preview(obj);
frame = getsnapshot(obj);
image(frame);
delete(obj);
Its simple image from videoinput.....But i am attaching picture that matlab shows me....Is there any kind of setting need while using this code....Code is correct at has been taking from library file of videoinput() function.I have changed two camera. Check out attachment of image.
Accepted Answer
More Answers (1)
Walter Roberson
on 27 Dec 2013
It appears to me that you are getting something that is not in RGB colorspace. Use
imaqfind
to see the available formats. See http://www.mathworks.com/help/imaq/examples/managing-image-acquisition-objects.html
3 Comments
jay
on 28 Dec 2013
Walter Roberson
on 28 Dec 2013
imaqfind() does not change the image format, it shows you the available image formats. You then have to pick an appropriate one and add it to the videoinput() call.
ravi
on 20 Feb 2014
use obj.ReturnedColorSpace='rgb'; just after obj = videoinput('winvideo', 1);
Categories
Find more on Matrox Hardware 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!