I know how to use bwconncomp to find out different connected patterns in a image. But dont know how to make boundary around it and map it with other same kind of image.
How to map two different gray pattern in two images?
1 次查看(过去 30 天)
显示 更早的评论
回答(1 个)
KSSV
2020-2-13
You can make boundary as below:
I = imread('temp1.jpg') ;
[nx,ny,nz] = size(I) ;
[X,Y] = meshgrid(1:ny,1:nx) ;
id = I~=255 ;
x = X(id) ; y = Y(id) ;
idx = boundary(x,y) ;
imshow(I)
hold on
plot(x(idx),y(idx),'r')
2 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!