Python Forum
Python equivalent of Matlab code - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python equivalent of Matlab code (/thread-25268.html)



Python equivalent of Matlab code - kwokmaster - Mar-25-2020

I am converting a section of Matlab code from others as my project and I have no idea what it is doing.

CC_horiz=bwconncomp(horiz_erode,8);
CC_vert=bwconncomp(vert_erode,8);
stats_horiz=regionprops(CC_horiz,'Area','PixelIdxList');
stats_vert=regionprops(CC_vert,'Area','PixelIdxList');

Documentation of the two functions:
bwconncomp
regionprops

The outputs are all structural arrays and I wantregionprops to separate the Area and PixelIdxList field into two different variables. I have no idea what the functions are doing. It would be great to have some help.

Thanks in advance!


RE: Python equivalent of Matlab code - j.crater - Mar-25-2020

I believe that as it is your project, you will need to research it on your own.
Of course if you have specific questions or run into some errors/obstacles, feel free to post your attempt and someone might be able to help you.
Also let us know if it is a homework/coursework, so the thread is moved to Homework section.