के साथ सेगमेंटेशन का उपयोग करके प्लैंकटन का निष्कर्षण मैं स्कैन की गई छवि से प्लैंकटन निकालने का प्रयास कर रहा हूं। मैटलैब
मैं तकनीक मैं यहां पाया, http://www.mathworks.com/help/images/examples/detecting-a-cell-using-image-segmentation.html
रूपरेखा बुरा नहीं है, तथापि, अब मैं नहीं यकीन है कि इसलिए प्रत्येक व्यक्ति को व्यक्तिगत रूप से प्लवक बचाया जा सकता है कि कैसे छवियों को निकालने के लिए कर रहा हूँ का उपयोग कर प्लवक खंडित किया। मैंने लेबल का उपयोग करने की कोशिश की लेकिन बहुत शोर है और यह हर एक नमूना लेबल करता है। मैं सोच रहा हूं कि ऐसा करने का एक बेहतर तरीका है या नहीं।
I = imread('plankton_2.jpg');
figure, imshow(I), title('original image');
[~, threshold] = edge(I, 'sobel');
fudgeFactor = .5;
BWs = edge(I,'sobel', threshold * fudgeFactor);
figure, imshow(BWs), title('binary gradient mask');
se90 = strel('line', 3, 90);
se0 = strel('line', 3, 0);
BWsdil = imdilate(BWs, [se90 se0]);
figure, imshow(BWsdil), title('dilated gradient mask');
BWdfill = imfill(BWsdil, 'holes');
figure, imshow(BWdfill);
title('binary image with filled holes');
BWnobord = imclearborder(BWdfill,1);
figure, imshow(BWnobord), title('cleared border image');
seD = strel('diamond',1);
BWfinal = imerode(BWnobord,seD);
BWfinal = imerode(BWfinal,seD);
figure, imshow(BWfinal), title('segmented image');
BWoutline = bwperim(BWfinal);
Segout = I;
Segout(BWoutline) = 0;
figure, imshow(Segout), title('outlined original image');
label = bwlabel(BWfinal);
max(max(label))
for j = 1:max(max(label))
[row, col] = find(label == j);
len = max(row) - min(row)+2;
breadth = max(col)-min(col) +2;
target = uint8(zeros([len breadth]));
sy = min(col)-1;
sx = min(row)-1;
for i = 1:size(row,1)
x = row(i,1)-sx;
y = col(i,1) - sy;
target(x,y)=I(row(i,1),col(i,1));
end
mytitle =strcat('Object Number:',num2str(j));
figure, imshow(target);mytitle;
end
for j = 1:max(max(label))
[row, col] = find(label == j);
len = max(row) - min(row)+2;
breadth = max(col)-min(col) +2;
target = uint8(zeros([len breadth]));
sy = min(col)-1;
sx = min(row)-1;
for i = 1:size(row,1)
x = row(i,1)-sx;
y = col(i,1) - sy;
target(x,y)=I(row(i,1),col(i,1));
end
mytitle =strcat('Object Number:',num2str(j));
figure, imshow(target);mytitle;
end
मुझे यह क्षेत्रप्रॉप के साथ मिल गया। सलाह के लिये धन्यवाद। –