CSC 520
Digital Image Processing

Programming Assignment 02

Programming Instructions:The student will select a programming language of his/her choice. The language selected should be maintained throughout the course. All code will include proper programming structure for the language selected. The code will have copious comments.

Objective: Compute the distances from pixel p(x,y) to pixel q(s,t).

Implement the distance measures discussed in class: euclidean, D4, and D8. The distance calcluation for D4 and D8 occur over a set of intensity values that must be defined.

Interface: float method/function_name(pixel p, pixel q, dist_measure, V)

pixel p - coordinates of the start pixel
pixel q - coordinates of the end pixel
dist_measure - {'euclidean', 'cityblock', 'chessboard'}
V - set of intensity values to navigate over.

Evaluation: Use the starP2.pgm from previous. Find the three distances for p (0,13) and q (8,18) under V = {0...20}. Repeat with V = {0...5}. Discuss your results in detail.