Question: In image - processing applications, such as for optical character recognition, it is often useful to group together contiguous sets of similarly colored pixels in
In imageprocessing applications, such as for optical character recognition, it is often useful to group together contiguous sets of similarly colored pixels in an image. See figure below For instance, in a blackandwhite image, we might say that a black pixel, is adjacent with another black pixel, if shares a boundary with s North, East, South, or West boundary. Typically, the way an image is represented imposes constraints on an algorithm for finding the contiguous parts of similarly colored pixels, and, as an imageprocessing algorithm designer, we often don't get to dictate the order in which pixels are presented. Design an efficient algorithm that can take a sequence of black or white pixels, given in an arbitrary order, taken from some image, and output all the contiguous shapes in that image. You may assume that each time a pixel is given, you are told its coordinates and the colors of its North, East, South, and West neighbors.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
