function f=f_cyc_disparity_neighbor(image,img_l,img_r,dis_l,dis_r,index,weight)
if index==1 
    disparity=dis_l;
else
    disparity=dis_r;
end
win=[0 0.25 0; 0.25 -1 0.25; 0 0.25 0];
disparity=filter2(win,disparity,'same');
disparity=abs(disparity);
w=(1-weight)./weight;
nn=disparity.*w;
f1=mean2(nn);
f2=var(nn(:));
f=[f1 f2];
end