0

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!

  • 1
    `skimage.measure` is the right tool. There are thousands of examples out there, just do a bit of Googling. – Cris Luengo Jul 12 '20 at 14:58
  • could you tell me more please I want the exact value of matllab wich present in concomp and STATE. I don't even know what should I search at google at least please give me some keyword body – masoud anaraki Jul 12 '20 at 16:34
  • You can use `area`, `centroid` and `coords` for your three properties. – Cris Luengo Jul 12 '20 at 17:14

0 Answers0