From the the previous link:
Working with an specific region generated by BoundingBox
The following code is based on it
se = strel('disk',9);
p_mask=imerode(Ic(BB,1).Image,se);
k_mask=imdilate(p_mask,se);
Ipointer=I2.*repmat( k_mask , [1 1 3]);
figure,imshow(Ipointer)
Mch=Ic(BB,1).Image-k_mask;
Mbch=bwareaopen(Mch,3000);
Ichaplet=I2.*repmat( Mbch , [1 1 3]);
figure,imshow(Ichaplet)
And so, I do not understand it
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…