.

Friday, October 11, 2019

Histogram

Aim: To study histogram, its processing and thresholding using histogram Theory: The histogram of an image with intensity levels in the range O to L-1, where L-1 is the last intensity value in an image(e. g. 255 in gray scale image) is a discrete function h(rk)=nk where rk is the kth intensity value and nk is the number of pixels in the image with intensity rk. It is common practice to normalize a histogram by dividing each of its components by the total number of pixels in the image, denoted by the product MN, where M and N are the row and column dimensions of the image. Thus normalized histogram is given by p(rk)=nk/M*N, for .P(rk) is nothing but probability of occurrence of intensity level rk in the image. The sum of all components of a normalized histogram is equal to 1 . Histogram processing: Global Processing: Histogram Equalization: Image enhancement techniques are used to improve an image, where â€Å"improve† is sometimes defined objectively (e. g. , increase the sign al-to-noise ratio), and sometimes subjectively (e. g. , make certain features easier to see by modifying the colors or intensities). Intensity adjustment is an image enhancement technique hat maps an image's intensity values to a new range.You can adjust the intensity values in an image using the imadJust function, where you specify the range of intensity values in the output image. this code increases the contrast in a low- contrast grayscale image by remapping the data values to fill the entire intensity range [0255 in case of grayscale image]. The process of adjusting intensity values can be done automatically by the histeq function. histeq performs histogram equalization, which involves transforming the intensity values so that the histogram of the output image approximately matches a specified histogram.By default, histeq tries to match a flat histogram with 64 bins, but you can specify a different histogram instead. In, general if r is original variable and s is transformed va riable, Let pr(r) and PS(s) denote PDFS of r and s and subscripts on p indictes that pr and ps are different functions in general. A fundamental result from basic probability theory is that if pr(r) and T(r) is known and T(r) is continuous and differential over the range of values of interest, then the PDF of the transformed variable s can be obtained using the simple formula Ps(s)=pr(r)mod(dr/ds).Local Processing: There are cases in which it is necessary to enhance details over small areas in an image. The solution is to devise transformation functions based on the intensity distributions in a neighborhood of every pixel in the image. The procedure is to define a neighborhood and move its center from pixel to pixel. At each location, the histogram of the points in the neighborhood is computed and either a histogram equalization or histogram specification transformation is obtained. This function is then used to map the intensity of the pixel centered in the neighborhood.The center ot the neighborh egion is procedure is repeated. Histogram Thresholding: then m to an ad Jacent pixel location and t Image segmentation can be done using histogram thresholding. It involves partitioning an image into regions that are similar according to a predefined criterion. Suppose that the gray-level histogram corresponds to an image, f(x,y), composed of dark objects in a light background, in such a way that object and background pixels have gray levels grouped into two dominant modes. One obvious way to extract the objects from the background is to select a threshold T that separates these modes.Then any point (x,y) for which ; T is called an object point, otherwise, the point is called a background point. If two dominant modes characterize the image histogram, it is called a bimodal histogram. Only one threshold is enough for partitioning the image. If an image is composed of two types of light objects on a dark background, three or more dominant modes characterize the image histogram. In such a case the histogram has to be partitioned by multiple thresholds. Multilevel thresholding classifies a point (x,y) as belonging to one object class and to the background if T and G2 consisting of pixels with values

No comments:

Post a Comment