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.
Is it color or black and white? What function are you using to display it, imshow(), image(), or imagesc()?
It appears to me that you are getting something that is not in RGB colorspace. Use
to see the available formats. See http://www.mathworks.com/help/imaq/examples/managing-image-acquisition-objects.html
Play games and win prizes!Learn more