How to get a closed boundary of image recognition?

1 Ansicht (letzte 30 Tage)
Yongjun Wang
Yongjun Wang am 9 Aug. 2017
Kommentiert: Yongjun Wang am 31 Aug. 2017
The boundaries of the graphics are identified. Now I need to get a closed boundary with a gray scale greater than 200, and the x, y coordinates of each boundary are known.
%plot code
% code
clear all;
clear;
clc;
load('imagdata.mat');
load('imgx.mat');
load('imgy.mat');
load('org_dataisld.mat');
imagesc(imgx,imgy,imagdata);
colormap(flipud(gray));
colorbar('northoutside');
set(gca,'YDir','reverse')
caxis(gca,[0.5 256])
len = length(org_dataisld);
hold on;
for i = 1:len
self_data = org_dataisld{i}(:,:);
plot(imgx(self_data(:,1)),imgy(self_data(:,2)),'-g');
end
hold off

Akzeptierte Antwort

Yongjun Wang
Yongjun Wang am 9 Aug. 2017
Starting from the data body org_dataisld.mat

Weitere Antworten (2)

Yongjun Wang
Yongjun Wang am 10 Aug. 2017
The funciton bwboundaries can solve this problem.

Yongjun Wang
Yongjun Wang am 25 Aug. 2017
Bearbeitet: Yongjun Wang am 25 Aug. 2017
This problem has been solved which takes me a month.
  2 Kommentare
Image Analyst
Image Analyst am 25 Aug. 2017
I could have done it in a few minutes if I had just understood what you wanted. I still don't, actually.
Yongjun Wang
Yongjun Wang am 31 Aug. 2017
Still want to thank you.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!