homework6 - Programming Using C Homework 6 1. In this...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Programming Using C Homework 6 1. In this problem we will extend the histogram introduced in previous home- works to a three dimensional histogram and apply it to compute the his- togram of a color image. An image is represented on a computer essentially as a matrix in which each element has three values representing the intensity of three compo- nent colors whose combination makes the color of the pixel: red, green and blue. Each value is between 0 and 255, in other words, a byte or an unsigned character. Since in computers quantities are preferred if they are powers of 2, another value, called the alpha channel, is stored next to the three color components and it is sometimes used for image blending, but we will not use it in computing the histogram. A histogram of a color image is a three dimensional array H , in which H [ i ][ j ][ k ] is a bin which counts the number of pixels whose red component has value i , the green component has value j and the blue component has value k . In the same way as we did with the unidimensional histogram, we can make the 3D histogram more general by assigning a range of values to one bin, instead of having just one value per bin. For example, if the number of bins per each component color is 4, the range for each component color has 64 values, so that H [0][0][0] is a counter of how...
View Full Document

This note was uploaded on 01/14/2012 for the course CGS 3460 taught by Professor Staff during the Summer '08 term at University of Florida.

Page1 / 3

homework6 - Programming Using C Homework 6 1. In this...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online