MATLAB: I am taking image as input to the code.But image are not proper.

image acquisitionImage Acquisition Toolboxvideo modes

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.

Best Answer

Is it color or black and white? What function are you using to display it, imshow(), image(), or imagesc()?