We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
To segment the image based on simple 4-pixel connectivity, we look for connected regions of '1's.
Here's the image with segmented objects marked by different numbers:
public holidays
Copy code
000112233344
556677788944
556799944444
9 4
So, there are 9 4-connected objects in the given binary image.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Image Segmentation #1
You are viewing a single comment's thread. Return to all comments →
To segment the image based on simple 4-pixel connectivity, we look for connected regions of '1's.
Here's the image with segmented objects marked by different numbers: public holidays Copy code 000112233344 556677788944 556799944444 9 4 So, there are 9 4-connected objects in the given binary image.