필터 지우기
필터 지우기

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 CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by