how to change each segments?

2 次查看(过去 30 天)
rikki
rikki 2018-4-13
suppose i have given this image how to change each and every segment...
for r=1:64
w(r)=abs(std2(double(E{r}))); % computes the standard deviation of the values in E
% figure
% plot(w);
ceil(w);
q(r)=abs(std2(double(F{r}))); % computes the standard deviation of the values in F
% figure
% plot(q);
ceil(q);
diff=w-q;
% new_diff=ceil(diff)
level(r) = graythresh(E{r}) ; % determine Otsu Threshold value
level1(r) = graythresh(F{r}); % determine Otsu Threshold value
% Comparison based on Otsu's Threshold Value
if diff(r)>level(r)
T=imbinarize(E{r});
subplot(rows,columns,r);
T=1;
imshow(T)
elseif diff(r)>level1(r)
P=imbinarize(F{r});
subplot(rows,columns,r)
T=0;
imshow(P)
end
end
here is the part of the code

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by