<< Chapter < Page Chapter >> Page >
H o u t ( y ) H i n ( x ) | f ' ( x ) | x = f - 1 ( y ) .

Since x and y need to be integers in [link] , the evaluation of x = f - 1 ( y ) needs to be rounded to the nearest integer.

The pixel transformation shown in [link] is not a one-to-one function. However, [link] still may be used to give insight into the effect of the transformation. Since theregions [ 0 , T 1 ] and [ T 2 , 255 ] map to the single points 0 and 255, we might expect "spikes" at the points 0 and 255 in theoutput histogram. The region [ 1 , 254 ] of the output histogram will be directly related to the input histogram through [link] .

First, notice from x = f - 1 ( y ) that the region [ 1 , 254 ] of the output is being mapped from the region [ T 1 , T 2 ] of the input. Then notice that f ' ( x ) will be a constant scaling factor throughout the entire region of interest. Therefore, the output histogram shouldapproximately be a stretched and rescaled version of the input histogram, with possible spikes at the endpoints.

Write a Matlab function that will perform the pixel transformation shown in [link] . It should have the syntax

output = pointTrans(input, T1, T2) .

Hints

  • Determine an equation for the graph in [link] , and use this in your function. Notice you have three input regionsto consider. You may want to create a separate function to apply this equation.
  • If your function performs the transformation one pixel at a time, be sure to allocate the space for the output image at the beginningto speed things up.

Download the image file narrow.tif and read it into Matlab.Display the image, and compute its histogram. The reason the image appears "washed out" is that it has a narrow histogram.Print out this picture and its histogram.

Now use your pointTrans function to spread out the histogram using T 1 = 70 and T 2 = 180 . Display the new image and its histogram. (You can open another figure window using the figure command.) Do you notice a difference in the "quality" of the picture?

Inlab report

  1. Hand in your code for pointTrans .
  2. Hand in the original image and its histogram.
  3. Hand in the transformed image and its histogram.
  4. What qualitative effect did the transformation have on the original image? Do you observe any negative effects of the transformation?
  5. Compare the histograms of the original and transformed images. Why are there zeros in the output histogram?

Gamma correction

Download the file dark.tif for the following section.

The light intensity generated by a physical device is usually a nonlinear function of the original signal. For example, a pixel that hasa gray level of 200 will not be twice as bright as a pixel with a level of 100. Almost all computer monitors havea power law response to their applied voltage. For a typical cathode ray tube (CRT),the brightness of the illuminated phosphors is approximately equal to the applied voltage raised to a power of 2.5.The numerical value of this exponent is known as the gamma ( γ ) of the CRT. Therefore the power law is expressed as

I = V γ

where I is the pixel intensity and V is the voltage applied to the device.

If we relate [link] to the pixel values for an 8-bit image, we get the following relationship,

y = 255 x 255 γ

where x is the original pixel value, and y is the pixel intensity as it appears on the display.This relationship is illustrated in [link] .

Questions & Answers

how to create a software using Android phone
Wiseman Reply
how
basra
what is the difference between C and C++.
Yan Reply
what is software
Sami Reply
software is a instructions like programs
Shambhu
what is the difference between C and C++.
Yan
yes, how?
Hayder
what is software engineering
Ahmad
software engineering is a the branch of computer science deals with the design,development, testing and maintenance of software applications.
Hayder
who is best bw software engineering and cyber security
Ahmad
Both software engineering and cybersecurity offer exciting career prospects, but your choice ultimately depends on your interests and skills. If you enjoy problem-solving, programming, and designing software syste
Hayder
what's software processes
Ntege Reply
I haven't started reading yet. by device (hardware) or for improving design Lol? Here. Requirement, Design, Implementation, Verification, Maintenance.
Vernon
I can give you a more valid answer by 5:00 By the way gm.
Vernon
it is all about designing,developing, testing, implementing and maintaining of software systems.
Ehenew
hello assalamualaikum
Sami
My name M Sami I m 2nd year student
Sami
what is the specific IDE for flutter programs?
Mwami Reply
jegudgdtgd my Name my Name is M and I have been talking about iey my papa john's university of washington post I tagged I will be in
Mwaqas Reply
yes
usman
how disign photo
atul Reply
hlo
Navya
hi
Michael
yes
Subhan
Show the necessary steps with description in resource monitoring process (CPU,memory,disk and network)
samuel Reply
What is software engineering
Tafadzwa Reply
Software engineering is a branch of computer science directed to writing programs to develop Softwares that can drive or enable the functionality of some hardwares like phone , automobile and others
kelvin
if any requirement engineer is gathering requirements from client and after getting he/she Analyze them this process is called
Alqa Reply
The following text is encoded in base 64. Ik5ldmVyIHRydXN0IGEgY29tcHV0ZXIgeW91IGNhbid0IHRocm93IG91dCBhIHdpbmRvdyIgLSBTdGV2ZSBXb3puaWFr Decode it, and paste the decoded text here
Julian Reply
what to do you mean
Vincent
hello
ALI
how are you ?
ALI
What is the command to list the contents of a directory in Unix and Unix-like operating systems
George Reply
how can i make my own software free of cost
Faizan Reply
like how
usman
hi
Hayder
The name of the author of our software engineering book is Ian Sommerville.
Doha Reply
what is software
Sampson Reply
the set of intruction given to the computer to perform a task
Noor
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?

Ask