Python Forum

Full Version: Python equivalent of Matlab code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
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.