Starting from:

$25

Image Processing-Exercise 13 A&B Solved

Exercise 13a. Implement the program 'exercise_13a_minimum' that checks whether or not the flat zone (piecewise-constant region) of a pixel (x,y) is a regional minimum.
exercise_13a_minimum exercise_13a_input_01.txt exercise_13a_input_01.pgm exercise_13 a_output_01.pgm

The input file 'exercise_13a_input_01.txt' is an input file with

4 lines
of parameters:
 
 
 
 
-At
line
1:
an
integer
number
'x' that denotes the
column
of the pixel.
-At
line
2:
an
integer
number
'y' that denotes the
row of
the pixel.
-At
line
3:
an
integer
number
'connectivity' that
denotes
the
connectivity number employed (4 or 8, corresponding to 4-connectivity or 8-connectivity, respectively).

The program should write 1 or 0 to an output file called exercise_13a_output_01.txt depending on whether or not the flat zone of pixel (x,y) is a regional minimum.

(Note: regional minimum: flat zone whose neighboring regions all have greater intensity values.)

Note: 8-connectivity can be assumed.

To check this program:

-immed_gray_inv_20051218_frgr4.pgm   (input image)

-For pixel (column=90, row=40), the result should be 1 (the flat zone is a regional minimum).

-For pixel (column=60, row=35), the result should be 0 (the flat zone is not a regional minimum).

(Note: pixel (column=0, row=0) is that at the upper-left corner.)

 Exercise 13b. Similarly, implement the program 'exercise_13a_maximum' that checks whether or not the flat zone (piecewise-constant region) of a pixel (x,y) is a regional maximum.

exercise_13b_maximum exercise_13b_input_01.txt exercise_13b_input_01.pgm exercise_13 b_output_01.pgm

The input file 'exercise_13b_input_01.txt' is described in the previous exercise.

The program should write 1 or 0 to an output file called exercise_13b_output_01.txt depending on whether or not the flat zone of pixel (x,y) is a regional maximum.

(Note: regional maximum: flat zone whose neighboring regions all have lesser intensity values.)

Note: 8-connectivity can be assumed.

To check this program:

-immed_gray_inv_20051218_frgr4.pgm   (input image)

-For pixel (column=35, row=20), the result should be 1 (the flat zone is a regional maximum).

-For pixel (column=20, row=15), the result should be 0 (the flat zone is not a regional maximum).

 (Note: pixel (column=0, row=0) is that at the upper-left corner.)

More products