<< Chapter < Page Chapter >> Page >

We note how aliasing can be produced by down-sampling (or decimating) a sampled image. Starting from a discrete-spaceimage, we can select only a subset of samples arranged in a regular grid. This will determine the periodic repetition ofthe spectral images, that will end up overlapping.

In order to explore the concepts of sampling, down-sampling, and aliasing, run the applet drawing ellipses . With the keyboard arrow you can double or halve the horizontal and vertical sampling steps.

A simple introduction to the first elements of image processing is found in Digital Image Processing Basics .

Quantization

With the adjective "digital" we indicate those systems that work on signals that are represented by numbers, with the(finite) precision that computing systems allow. Up to now we have considered discrete-time and discrete-space signals as ifthey were collections of infinite-precision numbers, or real numbers. Unfortunately, computers only allow to representfinite subsets of rational numbers. This means that our signals are subject to quantization.

For our purposes, the most interesting quantization is the linear one, which is usually occurring in the process ofconversion of an analog signal into the digital domain. If the memory word dedicated to storing a number is made of b bits, then the range of such number is discretized into 2 b quantization levels. Any value that is found between two quantization levels can be approximated by truncation orrounding to the closest value. The [link] shows an example of quantization with representation on 3 bits in two's complement .

Sampling and quantization of an analog signal

The approximation introduced by quantization manifests itself as a noise, called quantization noise . Often, for the analysis of sound-processing circuits, such noise isassumed to be white and de-correlated with the signal, but in reality it is perceptually tied to the signal itself, in such anextent that quantization can be perceived as an effect.

To have a visual and intuitive exploration of the phenomenon of quantization, consider the applet that allows to vary between 1 and 8 the number of bits dedicated to the representation of each of the RGB channels representing color. The same number of bitsis dedicated to the representation of an audio signal coupled to the image. The visual effect that is obtained by reducingthe number of bits is similar to a solarization .

Extend the code of the applet [link] to add some interaction features:

  • Make the fundamental frequency of the automatically-generated sound changing randomly at eachframe (see random() ).
  • Make the framerate (and the metronome for generating notes) dependent on the horizontal position of the mouse( mouseX ).
  • Make the number of harmonics of the sound (i.e., its brightness) dependent on the vertical position of themouse ( mouseY ).
  • Paint the window background in such a way that moving from left to right the tint changes from blue tored. In this way, a blue color will correspond to a slow tempo, and a red color to a fast tempo.
  • Make the color saturation of the background dependent on the vertical position of the mouse. In thisway a sound with a few harmonics (low brightness) will correspond to a grayish color, while a sound rich ofharmonics (high brightness) will correspond to a saturated color.
  • Add a control to stop the computation and display of the spectrum and create an effect of image freezing, whilesound continues to be generated (for instance by keeping the mouse button pressed).
  • Add a control to cancel the dependence of tempo, brightness, and color saturation on mouse position (forinstance by pressing a key).
  • Add a control that, in case of image freezing (mouse button pressed), will stop the generation of new noteswhile "freezing" the current note.
  • Finally, add a control that, in case of image freezing, will stop the sound generation and make theapplication silent.

The proposed extensions are implemented in the Processing code .

Got questions? Get instant answers now!

Questions & Answers

what is oxidation
Chidiebube Reply
calculate molarity of NaOH solution when 25.0ml of NaOH titrated with 27.2ml of 0.2m H2SO4
Gasin Reply
what's Thermochemistry
rhoda Reply
the study of the heat energy which is associated with chemical reactions
Kaddija
How was CH4 and o2 was able to produce (Co2)and (H2o
Edafe Reply
explain please
Victory
First twenty elements with their valences
Martine Reply
what is chemistry
asue Reply
what is atom
asue
what is the best way to define periodic table for jamb
Damilola Reply
what is the change of matter from one state to another
Elijah Reply
what is isolation of organic compounds
IKyernum Reply
what is atomic radius
ThankGod Reply
Read Chapter 6, section 5
Dr
Read Chapter 6, section 5
Kareem
Atomic radius is the radius of the atom and is also called the orbital radius
Kareem
atomic radius is the distance between the nucleus of an atom and its valence shell
Amos
Read Chapter 6, section 5
paulino
Bohr's model of the theory atom
Ayom Reply
is there a question?
Dr
when a gas is compressed why it becomes hot?
ATOMIC
It has no oxygen then
Goldyei
read the chapter on thermochemistry...the sections on "PV" work and the First Law of Thermodynamics should help..
Dr
Which element react with water
Mukthar Reply
Mgo
Ibeh
an increase in the pressure of a gas results in the decrease of its
Valentina Reply
definition of the periodic table
Cosmos Reply
What is the lkenes
Da Reply
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, Media processing in processing. OpenStax CNX. Nov 10, 2010 Download for free at http://cnx.org/content/col10268/1.14
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Media processing in processing' conversation and receive update notifications?

Ask