Im going to impliemnt a matlab code in python but there is some problem here is a pat of my matlab code which works perfect, here is my matlab code :
mask=imerode(mask,strel('disk',3));
I_enh=I_enh.*mask;
BW = imregionalmax(I_enh);
concomp = bwconncomp(BW);
STATS = regionprops(concomp,'Centroid','PixelIdxList','Area');
[R,C]=size(I_enh);
w=100;
feature=zeros(length(STATS),2);
I don't know how to convert bwconncomp
and regionprops
to python could anybody help me with this?
also regionprops
has some method like 'Centroid','PixelIdxList','Area'
inside that I have no idea for implementation either!
there must be something similar in python I found skimage.measure
in python but I don't know how to use it. help me, please!