I have to separate canal edge from the background?Can u provide the steps or function like how to code?
    8 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
Separate edge from background
0 Kommentare
Antworten (1)
  Bshara Murr
      
 am 26 Nov. 2017
        Try this i am not sure if this will help you
I = imread(you image gows here);
[rows, columns, numberOfColorChannels] = size(I);
d = 255 * zeros(rows, columns, 3, 'uint8');
grayImage = rgb2gray(I);
imshow(grayImage);
hFH = imfreehand();
binaryImage = hFH.createMask();
bwimage = grayImage;
bwimage(~binaryImage) = 0;
for i = 1:rows
    for j  = 1:columns
        if bwimage(i,j) ~ 0;
            d(i,j,:)=I(i,j,:);
        end
    end
end
imshow(d);
1 Kommentar
  Bshara Murr
      
 am 26 Nov. 2017
				I may have created some unwanted or unused variables while trying. Note that you will have to draw the region that you want to keep using the cursor.
Siehe auch
Kategorien
				Mehr zu Computer Vision with Simulink finden Sie in Help Center und File Exchange
			
	Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

