Question: Task You are to write a function count objects in picture(picture) which counts the number of objects that are in picture. picture is a string



Task You are to write a function count objects in picture(picture) which counts the number of objects that are in picture. picture is a string that is the absolute path to a PNG file, which is a black and white picture. For example, in this image: xXX xX xX there are 22 objects. An object is a grouping of one or more contiguous black pixels. Two black pixels are contiguous if they are one pixel distance away from each other in any horizontal, vertical, or diagonal direction. For example, in: Task You are to write a function count objects in picture(picture) which counts the number of objects that are in picture. picture is a string that is the absolute path to a PNG file, which is a black and white picture. For example, in this image: xXX xX xX there are 22 objects. An object is a grouping of one or more contiguous black pixels. Two black pixels are contiguous if they are one pixel distance away from each other in any horizontal, vertical, or diagonal direction. For example, in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
