フィルターのクリア

i got error "Undefined variable "handles" or function "handles.slider1". plz help me

1 回表示 (過去 30 日間)
S .p.aramesh S
S .p.aramesh S 2015 年 10 月 22 日
編集済み: Guillaume 2015 年 10 月 22 日
threshold = get(handles.slider1,'Value');
t = get(handles.slider1,'value');%position of X slider
set(handles.text1,'String', num2str(x)); %read the value of threshold from GUI slider
handles.t=t;
guidata(hObject,handles)
%start a for loop that equal the number of images usually infinity
for l = 1:inf
flag=get(handles.togglebutton1,'value'); %This flag is used to check if stop button was pressed
if (flag==1)
a=a+1;
v= getsnapshot(vobj); %read image from camera and save it in variable v
w= getsnapshot(vobj); %read image from camera and save it in variable w
x= rgb2gray (v); %convert image to gray scale
y= rgb2gray(w); %convert image to gray scale
z = imabsdiff(x,y); %get absolute diffrence between both images
zz= sum(z,1); %calculate SAD
zzz= sum(zz)/ 76800; %scale the value of SAD by dividing by number of pixels
h(a) = zzz; %put values of SAD in array h
hh=[ h(a-1) h(a) ]; %calculate variance value
var_value=var(hh,1);
var_values(a)=var_value; %put values of variance in array var_value

回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by