Tuesday, September 30, 2008

Activity17: Basic Video Processing

For this activity, we asked to perform an experiment where video processing can be applied to determine the desired kinematic variables. Marge, angel, and I therefore decided to determine the coefficient of restitution of a bouncing object initially dropped at a certain height.

The Coefficient of Restitution for an object that bounces off a stationary object is given by the equation below, where h is the bounce height, and H is the drop height.

C = sqrt (h/H)

To start, the grayscale images of the desired frames acquired from the video using VirtualDub are shown below.

Figures: drop image and bounce image respectively


Due to the inconsistency in the background color and error at the direction at which the video was taken, which were not considered while filming the video, a manual technique was used to determine the coefficient of restitution.

The required heights were measured using Paint. The calculated drop and bounce heights are 60.54 and 54.71 pixels respectively. Therefore, the coefficient of restitution was determined to be 0.95.

rating: 5 bec. image processing was not used

Wednesday, September 3, 2008

Activity 16: Color Image Segmentation

For this activity, we are asked to perform image segmentation to locate a certain region of interest (ROI) in the image based on colors.

To start with the activity, the RGB colors of an image was represented as normalized chromaticity coordinates (NCC), by dividing each color (R,G,B) with I, as shown by the equations below. Note that it is enough to represent chromaticity by 2 coordinates, ie. r and g.


Segmentation can be done using two methods: probability distribution estimation and histogram backprojection.

In
Probability Distribution Estimation, part of the region of interest is cropped and its probability distribution function was determined. The probability that a pixel with chromaticity r, p(r), belongs to the ROI is expressed in the equation below. The mean and the standard deviation are calculated from the cropped part of the region of interest. From the chromaticity coordinates r and g, the joint probability p(r) p(g) function determines if a pixel is part of the region of interest.



Below is the image used for this activity and the cropped part of the ROI.

The gaussian PDF is:

The resulting segmented image is shown below. It can be observed that the part of the mug where the patch was cropped appears white whereas the other parts appear black. Since the mug was of different shades of pink, the resulting image was not able to reconstruct the whole image of the mug.

For histogram backprojection, a pixel location is given a value equal to its histogram value in
chromaticity space. The figure below shows the superimposed histogram of the cropped portion of the ROI to the chromaticity coordinates, and the resulting image after the backprojection respectively.




Comparing the resulting segmented images using the two methods, it can be observed that the results for the probability distribution function method is much better than that for the histogram backprojection method.

Another image applied with the two methods is shown below, with the results for PDF method and HB method respectively. The first method shows a very good resulting image, whereas the second method has a very faint resulting image.


rating-10, bec the two methods were implemented well. I really enjoyed implementing the methods to different images.