Question: The student is to implement a connected components program so that it will report on all objects found in a gray-level input image. The figure
The student is to implement a connected components program so that it will report on all objects found in a gray-level input image. The figure below shows an image of two overlapping playing cards. The program should be able to detect all 11 objects. Moreover, the features reported should indicate which objects are similar to others.
The requirements below intend to specify what is to be done, but not how it should be done. The student should consider various design decisions for constructing a correct program within a short time.
Figure 1: Cards image with black objects
1.The program should give a brief greeting and announce its purpose
- The program should prompt the user for its input. The input is as follows.
- The name of the .pgm file that contains the image to process
- It is the option of the programmer to allow input of a binary (.pbm format) image as well as a color (.ppm) image; if this option is chosen.
- The program performs thresholding and cleaning using morphological filters.
- The program should give clean output of all objects detected and their features.
- At some points of the process, the program will detect object pixels and perform connected-components labeling of connected pixels.
- All object pixels will be surrounded by white background pixels, which will be taken to be 0 if the image is made binary.
- The program will identify each 8-connected object region and measure certain features. It must report at least the features circularity (C1 or C2), bounding box, area, and second moments for each object. You may assume that every significant object has an area of at least 20 pixels in order to get rid of the noise. Important: The use of libraries to perform connected components analysis or features extraction is forbidden.
- Important program steps must be clearly described. Program code or tools used, developed by others, should be documented.
- A document/ report must be submitted that shows the use of the program, the results, and some discussion of the results.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
