Your SlideShare is downloading. ×
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Basics of Image processing
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Basics of Image processing

2,135

Published on

Seminar Report, B.Tech 3rd Year, Paras Prateek Bhatnagar, Preeti Kumari, Priyanka Rahi & Ruchita at College of Engineering Roorkee.

Seminar Report, B.Tech 3rd Year, Paras Prateek Bhatnagar, Preeti Kumari, Priyanka Rahi & Ruchita at College of Engineering Roorkee.

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,135
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
151
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. BASICS OF IMAGEPROCESSING Paras Prateek Bhatnagar [ 08 ] Preeti Kumari [ 12 ] Priyanka Rahi[ 13 ] Ruchita [ 24 ] [ EN (H)-III rd year (B-Tech) ]
  • 2. CertificateThis is to certify that the report entitled “ Basics of image processing ” ,submittedbyPreeti Kumari, Paras Prateek Bhatnagar ,Priyanka Rahi &Ruchita , studentsof B.tech,EN(H- III rd year) , is an authentic work of their own carried out under mysupervision and guidance .The students have put a lot of labour and efforts to make the project useful.Mr A. S. Yadav Mr S. Sinha[ Project Guide ] [ HOD (Electrical and Electronics) ] 2
  • 3. AcknowledgementMaking this report would have been impossible task without the co-operation of thefollowing people. Simply thanking them is not enough but that is all they would let usdo.We,sincerely pay thanks toour Project Guide, Mr A.S Yadav, under whose ableguidance and supervision this work has been carried out.We are also grateful and wish to express our sincere thanks to out HOD (Electrical &Electronics), Mr S. Sinhawho providedus with the required resources. Preeti Kumari [ 12 ] Paras Prateek Bhatnagar[ 08 ] Priyanka Rahi[ 13 ] Ruchita[ 24 ] [ EN (H) - 3rd year ] 3
  • 4. Contents 1. Introduction to image processing...............................................................................5 2. Applications of digital image processing....................................................................7 3. Advantages of digital image processing...................................................................... 9 4. Disadvantages of digital image processing..............................................................10 5. Working with the primary colours...........................................................................11 5.1. Additive primaries ................................................................................................. 11 5.2. Subtractive primaries ........................................................................................... 12 5.3. CMYK colour model ............................................................................................ 13 6. Human vision system................................................................................................. 14 6.1. Colour vision ......................................................................................................... 14 6.2. Visual perception ................................................................................................... 15 6.3. Colours in human brain ......................................................................................... 16 6.4. Mathematics of colour perception ......................................................................... 17 7. Computer vision system.............................................................................................19 7.1. RGB image representation .................................................................................... 19 7.2. Monochrome& Greyscale image representation ................................................ 22 7.3. CMYK colour model ........................................................................................... 25 7.4. HSV and HSL colour model................................................................................28 8. Image Parameters......................................................................................................30 9. Image Enhancements................................................................................................. 32 9.1. Histogram Equalization …………………………………………………………. 32 9.2. Gamma adjustment .……………………………………………….……….…… 34 9.3. Noise reduction…………………….…………………………..……………….. 37 9.4. Homomorphic filtering ..……………………………………......……………….. 39 i. List of acronyms………………………………………………………..………….. 41ii. Works Cited..….……..……………...………………………………..…………….. 42 4
  • 5. 1. Introduction to image processingThe sense of Image processing can be understood by splitting the word into two parts –image and processing.An image, derived from a Latin word imago, stands for an artifact, such as a two-dimensional picture, that has a similar appearance to some subject—usually a physical objector a person.Images may be two-dimensional, such as a photograph, screen display, and as well as athree-dimensional, such as a statue. They may be captured by optical devices—such ascameras, mirrors, lenses, telescopes, microscopes, etc. and natural objects and phenomena,such as the human eye or water surfaces.Process or processing typically describes the act of taking something through an establishedand usually routine set of procedures to convert it from one form to another, as amanufacturing or administrative procedure, such as processing milk into cheese, orprocessing paperwork to grant a mortgage loan.Thus, image processing is any form of signal processing for which the input is an image,such as photographs or frames of video; the output of image processing can be either animage or a set of characteristics or parameters related to the image. Most image-processing techniques involve treating the image as a two-dimensional signal and applyingstandard signal-processing techniques to it.Image processing usually refers to digital image processing, but optical and analog imageprocessing are also possible.The acquisition of images is referred to as imaging. The following example represents abasic operation of image processing. 5
  • 6. The composite image (4) has been split into red (1), green (2) and blue (3) channels.
  • 7. 2. Applications of image processingImage processing covers a wide range of operations and their applications, but the followingfew may be considered as the most important among them:  Computer vision: Computer vision is concerned with the theory behind artificial systems that extract information from images. The image data can take many forms, such as video sequences, views from multiple cameras, or multi-dimensional data from a medical scanner.  Optical sorting: Optical Sorting is a process of visually sorting a product though the use of Photo detector, Camera, or the standard Mark 1 Human eye ball.  Augmented Reality:Augmented reality (AR) is a term for a live direct or indirect view of a physical real-world environment whose elements are augmented by virtual computer-generated imagery.  Face detection:Face detection is a computer technology that determines the locations and sizes of human faces in digital images. It detects facial features and ignores anything else, such as buildings, trees and bodies.  Feature detection: In computer vision and image processing the concept of feature detection refers to methods that aim at computing abstractions of image information and making local decisions at every image point whether there is an image feature of a given type at that point or not.  Lane departure warning system: In road-transport terminology, a lane departure warning system is a mechanism designed to warn a driver when the vehicle begins to move out of its lane on freeways and arterial roads.  Non-photorealistic rendering:Non-photorealistic rendering (NPR) is an area of computer graphics that focuses on enabling a wide variety of expressive styles for digital art. In contrast to traditional computer graphics, which has focused on 7
  • 8. photorealism, NPR is inspired by artistic styles such as painting, drawing, technical illustration, and animated cartoons. Medical image processing: Medical imaging is the technique and process used to create images of the human body for clinical purposes or medical. Microscope image processing: Microscope image processing is a broad term that covers the use of digital image processing techniques to process, analyse and present images obtained from a microscope. Remote sensing:Remote sensing is the acquisition of information of a phenomenon, by the use of real-time sensing device(s) that are not in physical or intimate contact with the object. 8
  • 9. 3. Advantages of digital image processingAmong the numerous advantages of digital image processing, the important ones are:  Post - processing of image: Post-processing of the image allows the operator to manipulate the pixel shades to correct image density and contrast, as well as perform other processing functions that could result in improved diagnosis and fewer repeated examinations.  Easy storage and retrieval of image: With the advent of electronic record systems, images can be stored in the computer memory and easily retrieved on the same computer screen and can be saved indefinitely or be printed on paper or film if necessary.  Ease of sharing data: All digital imaging systems can be networked into practice management software programs facilitating integration of data. With networks, the images can be viewed in more than one room and can be used in conjunction with pictures obtained with an optical camera to enhance the patients’ understanding of treatment.  More use ofthe same data: Digital imaging allows the electronic transmission of images to third-party providers, referring dentists, consultants, and insurance carriers via a network.  Environmental friendly: Digital imaging is also environmentally friendly since it does not require chemical processing. It is well known that used film processing chemicals contaminate the water supply system with harmful metals such as the silver found in used fixer solution.  Reduction in radiation: Radiation dose reduction is also a benefit derived from the use of digital systems. Some manufacturers have claimed a 90% decrease in radiation exposure, but the real savings depend on comparisons. 9
  • 10. 4. Disadvantages of digital imageprocessingAlong with the advantages, some disadvantages have also been associated with digital imageprocessing. Important among them are as follows:  High initial cost:The initial cost can be high depending on the system used, the number of detectors purchased, etc.  Need of extra knowledge:Competency using the software can take time to master depending on the level of computer literacy of team members.  Limitation on shape and size of detectors:The detectors, as well as the phosphor plates, cannot be sterilized or autoclaved and in some cases CCD/CMOS detectors pose positioning limitations because of their size and rigidity. This is not the case with phosphor plates; however, if a patient has a small mouth, the plates cannot be bent because they will become permanently damaged.  High maintenance cost:Phosphor plates cost an average of $25 to replace, and CCD/CMOS detectors can cost more than $5,000 per unit. Thus, digital processing system requires more maintenance as compared to traditional systems.  Need for standardization:Since digital imaging in dentistry is not standardized, professionals are unable to exchange information without going through an intermediary process. Hopefully, this will change within the next few years as manufacturers of digital equipment become DICOM compliant. 10
  • 11. 5. Working with the primary coloursPrimary colours are sets of colours that can be combined to make a useful range of colours.For human applications, three primary colours are usually used, since human colour vision istrichromatic. For additive combination of colours, as in overlapping projected lights or inCRT displays, the primary colours normally used are red, green, and blue. For subtractivecombination of colours, as in mixing of pigments or dyes, such as in printing, the primariesnormally used are cyan, magenta, and yellow. 5.1 Additive primaries Media that combine emitted lights to create the sensation of a range of colours are using the additive colour system. Typically, the primary colours used are red, green, and blue.Television and other computer and video displays are a common example of the use of additive primaries and the RGB colour model. The exact colours chosen for the primaries are a technological compromise between the available phosphors and the need for large colour triangle to allow a large gamut of colours. Additive mixing of red and green light produces shades of yellowor orange, or brown. Mixing green and blue produces shades of cyan; and mixing red and blue produces shades of purple, including magenta. Mixing nominally equal proportions of the additive primaries results in shades of grey or white; the colour space that is generated is called an RGB colour space. Additive colour mixing The sRGB colour triangle
  • 12. 5.2 Subtractive primariesMedia that use reflected light and colorants to produce colours are using thesubtractive colour method of colourmixing. RYB make up the primary colour triad ina standard colour wheel; the secondary coloursVOG (violet, orange, and green) makeup another triad. Triads are formed by 3 equidistant colours on a particular colourwheel; neither RYB nor VOG is equidistant on a perceptually uniform colour wheel,but rather have been defined to be equidistant in the RYB wheel. Painters have longused more than three "primary" colours in their palettes—and at one point consideredred, yellow, blue, and green to be the fourprimaries. Red, yellow, blue, and green arestill widely considered the four psychological primary colours, though red, yellow,and blue are sometimes listed as the three psychological primaries, with black andwhite occasionally added as a fourth and fifth.During the 18th century, as theorists became aware of Isaac Newton’s scientificexperiments with light and prisms, red, yellow, and blue became the canonicalprimary colours. This theory became dogma, despite abundant evidence that red,yellow, and blue primaries cannot mix all other colours, and has survived in colourtheory to the present day. Using red, yellow, and blue as primaries yields a relativelysmall gamut, in which, among other problems, colourful green, cyan, and magenta areimpossible to mix, because red, yellow, and blue are not well-spaced around aperceptually uniform colour wheel. For this reason, modern three- or four-colourprinting processes, as well as colour photography, use cyan, yellow, and magenta asprimaries instead. Most painters include colours in their palettes which cannot bemixed from yellow, red, and blue paints, and thus do not fit within the RYB colourmodel. The cyan, magenta, and yellow used in printing are sometimes known as"process blue," "process red," "process yellow". Standard RYB colour wheel
  • 13. 5.3 CMYK Colour ModelIn the printing industry, to produce the varying colours the subtractiveprimariescyan, magenta, and yellow are applied together in varying amounts.Mixing yellow and cyan produces green colours; mixing yellow with magentaproduces reds, and mixing magenta with cyan produces blues. In theory, mixing equalamounts of all three pigments should produce grey, resulting in black when all threeare applied in sufficient density, but in practice they tend to produce muddy browncolours. For this reason, and to save ink and decrease drying times, a fourth pigment,black, is often used in addition to cyan, magenta, and yellow.The resulting model is the so-called CMYK colour model. The abbreviation standsfor cyan, magenta, yellow, and key—black is referred to as the keycolour. In practice,colorant mixtures in actual materials such as paint tend to be more complex. Brighteror more saturated colours can be created using natural pigments instead of mixing,and natural properties of pigments can interfere with the mixing. In the subtractivemodel, adding white to a colour, whether by using less colorant or by mixing in areflective white pigment such as zinc oxide does not change the colour’s hue but doesreduce its saturation. Subtractive colour printing works best when the surface orpaper is white, or close to it.A system of subtractive colour does not have a simple chromaticity gamut analogousto the RGB colour triangle, but a gamut that must be described in three dimensions.There are many ways to visualize such models, using various 2D chromaticity spacesor in 3D colour spaces. Subtractivecolour mixingOpponentprocess demonstration
  • 14. 6. Human Vision System 6.1 Colour vision Fundamentally, light is a continuous spectrum of the wavelengths that can be detected by the human eye, in infinite-dimensional stimulus space. However, the human eye normally contains only three types of colour receptors, called cone cells. Each colour receptor responds to different ranges of the colour spectrum. Humans and other species with three such types of colour receptors are known as trichromats. These species respond to the light stimulus via a three-dimensional sensation, which generally can be modelled as a mixture of three primary colours.Species with different numbers of receptor cell types would have colour vision requiring a different number of primaries. Since humans can only see to 400 nanometres, but tetrachromats can see into the ultraviolet to about 300nanometres, this fourth primary colour might be located in the shorter-wavelength range. The peak response of human colour receptors varies, even among individuals with "normal" colour vision. The cones are conventionally labelled according to the ordering of the wavelengths of the peaks of their spectral sensitivities: short (S), medium (M), and long (L) cone types, also sometimes referred to as blue, green, and red cones. While the L cones are often referred to as the red receptors, micro spectrophotometry has shown that their peak sensitivity is in the greenish-yellow region of the spectrum. Similarly, the S- and M-cones do not directly correspond to blue and green, although they are often depicted as such. Normalized colour response Single colour sensitivity diagram
  • 15. The following table shows the range and peak wavelength that can be detected bydifferent cone cells: Cone type Name Range Peak wavelength S Β 400–500 nm 420–440 nm M γ 450–630 nm 534–545 nm L ρ 500–700 nm 564–580 nmA range of wavelengths of light stimulates each of these receptor types to varyingdegrees. Yellowish-green light, for example, stimulates both L and M cones equallystrongly, but only stimulates S-cones weakly. Red light, on the other hand, stimulatesL cones much more than M cones, and S cones hardly at all; blue-green lightstimulates M cones more than Lcones and S cones a bit more strongly, and is also thepeak stimulant for rod cells; and blue light stimulates almost exclusively S-cones.Violet light appears to stimulate both L and S cones to some extent, but M cones verylittle, producing a sensation that is somewhat similar to magenta. The brain combinesthe information from each type of receptor to give rise to different perceptions ofdifferent wavelengths of light.6.2 Visual PerceptionVisual perception is the ability to interpret information and surroundings fromvisible light reaching the eye. The resulting perception is also known as eyesight,sight or vision. The various physiological components involved in vision are referredto collectively as the visual system, and are the focus of much research in psychology,cognitive science, neuroscience and molecular biology.The visual system in humans allows individuals to assimilate information from theenvironment. The act of seeing starts when the lens of the eye focuses an image of its 15
  • 16. surroundings onto a light-sensitive membrane in the back of the eye, called the retina.The retina is actually part of the brain that is isolated to serve as a transducer for theconversion of patterns of light into neuronal signals. The lens of the eye focuses lighton the photoreceptive cells of the retina, which detect the photons of light and respondby producing neural impulses. These signals are processed in a hierarchical fashion bydifferent parts of the brain, from the retina to the lateral geniculate nucleus, to theprimary and secondary visual cortex of the brain. Signals from the retina can alsotravel directly from the retina to the Superior colliculus.6.3 Colours in human brainColour processing begins at a very early level in the visual system through initialcolouropponent mechanisms. Opponent mechanisms refer to the opposing coloureffect of red-green, blue-yellow, and light-dark. Visual information is then sent backvia the optic nerve to the optic chiasma: a point where the two optic nerves meet andinformation from the temporal visual field crosses to the other side of the brain. Afterthe optic chiasma the visual fibre tracts are referred to as the optic tracts, which enterthe thalamus to synapse at the lateral geniculate nucleus (LGN). The LGN issegregated into six layers: two magnocellular (large cell) achromatic layers (Mcells) and four parvocellular (small cell) chromatic layers (P cells). Within the LGNP-cell layers there are two chromatic opponent types: red vs. green and blue vs.green/red.After synapsing at the LGN, the visual tract continues on back toward the primaryvisual cortex (V1) located at the back of the brain within the occipital lobe. WithinV1 there is a distinct band (striation). This is also referred to as "striate cortex", withother cortical visual regions referred to collectively as "extra striate cortex". It is atthis stage that colour processing becomes much more complicated. In V1 the simplethree-colour segregation begins to break down. Many cells in V1 respond to someparts of the spectrum better than others, but this "colour tuning" is often differentdepending on the adaptation state of the visual system. A given cell that mightrespond best to long wavelength light if the light is relatively bright might thenbecome responsive to all wavelengths if the stimulus is relatively dim. Because thecolour tuning of these cells is not stable, some believe that a different, relativelysmall, population of neurons in V1 is responsible for colour vision. These specialized 16
  • 17. "colour cells" often have receptive fields that can compute local cone ratios. Double opponent cells are clustered within localized regions of V1 called blobs, and are thought to come in two flavours, red-green and blue-yellow. Red-green cells compare the relative amounts of red-green in one part of a scene with the amount of red-green in an adjacent part of the scene, responding best to local colourcontrast. This is the first part of the brain in which colour is processed in terms of the full range of hues found in colour space.Human Eye colour vision chartVisual pathways in the human brain 6.4Mathematics of colour perception A "physical colour" is a combination of pure spectral colours.Since there are, in principle, infinitely many distinct spectral colours, the set of all physical colours may be thought of as an infinite-dimensional vector space, in fact a Hilbert space. We call this space Hcolour. More technically, the space of physical colours may be considered to be the cone over the simplex whose vertices are the spectral colours, with white at the centroid of the simplex, black at the apex of the cone, and the monochromatic colour associated with any given vertex somewhere along the line from that vertex to the apex depending on its brightness. An element C of Hcolour is a function from the range of visible wavelengths—considered as an interval of real numbers [Wmin,W max]—to the real numbers, assigning to each wavelength w in [Wmin,W max] its intensity C(w).
  • 18. A humanly perceived colour may be modelled as three numbers: the extents to whicheach of the 3 types of cones is stimulated. Thus a humanly perceived colour may bethought of as a point in 3-dimensional Euclidean space. We call this spaceR3colour.Since each wavelength w stimulates each of the 3 types of cone cells to aknown extent, these extents may be represented by 3 functions s(w), m(w), l(w)corresponding to the response of the S, M, and L cone cells, respectively.Finally, since a beam of light can be composed of many different wavelengths, todetermine the extent to which a physical colourC in Hcolour stimulates each cone cell,we must calculate the integral, over the interval [Wmin,W max ], of C(w)*s(w), ofC(w)*m(w), and of C(w)*l(w). The triple of resulting numbers associates to eachphysical colourC (which is a region in Hcolour) to a particular perceived colour (whichis a single point in R3colour). This association is easily seen to be linear. It may alsoeasily be seen that many different regions in the "physical" space Hcolour can all resultin the same single perceived colour in R3colour, so a perceived colour is not unique toone physical.Technically, the image of the (mathematical) cone over the simplex whose verticesare the spectral colours, by this linear mapping, is also a (mathematical) cone inR3colour. Moving directly away from the vertex of this cone represents maintaining thesame chromaticitywhile increasing its intensity. Taking a cross-section of this coneyields a 2D chromaticity space. Both the 3D cone and its projection or cross-sectionis convex sets; that is, any mixture of spectral colours is also a colour. The CIE 1931 xy chromaticity diagram.
  • 19. 7. Computer Vision System 7.1 RGB image representation The RGB colour model is the most common way to encode colour in computing, and several different binary digital representations are in use. The main characteristic of all of them is the quantization of the possible values per component by using only integer numbers within some range, usually from 0 to some power of two minus one (2 n – 1) to fit them into some bit groupings. As usual in computing, the values can be represented both in decimal and in hexadecimal notation as well, as is the case of HTML colours text-encoding convention.RGB values encoded in 24 bits per pixel (bpp) are specified using three 8-bit unsigned integers (0 through 255) representing the intensities of red, green, and blue. This representation is the current mainstream standard representation for the so-called truecolour and common colour interchange in image file formats such as JPEG or TIFF. It allows more than 16 million different combinations, many of which are indistinguishable to the human eye. The following image shows the three "fully saturated" faces of a 24-bpp RGB cube, unfolded into a plane: yellow green cyan (255,255,0) (0,255,0) (0,255,255)  (0, 0, 0) is black  (255, 255, 255) is white  (255, 0, 0) is red  (0, 255, 0) is green  (0, 0, 255) is blue red blue  (255, 255, 0) is yellow (255,0,0) (0,0,255)  (0, 255, 255) is cyan  (255, 0, 255) is magenta
  • 20. red(255,0,0) magenta(255,0,255)The above definition uses a convention known as full-range RGB. Colour values arealso often scaled from and to the range 0.0 through 1.0;especially they are mappedfrom/to other colour models and/or encodings. The 256 levels of a primary usually donot represent equally spaced intensities, due to gamma correction. This representationcannot offer the exact mid-point 127.5, or other non-integer values, as bytes do nothold fractional values, so these need to be rounded or truncated to a nearby integervalue. For example, Microsoft considers the colour "medium grey" to be the(128,128,128) RGB triplet in its default palette. The effect of such quantization isusually not noticeable, but may build up in repeated editing operations or colorspaceconversions.Typically, RGB for digital video is not full range. Instead, video RGBuses a convention with scaling and offsets such that (16, 16, 16) is black, (235, 235,235) is white, etc.32-bit graphic modeThe so-called 32 bpp display graphic mode is identical in precision to the 24 bppmode; there are still only eight bits per component, and the eight extra bits are oftennot used at all. The reason for the existence of the 32 bpp mode is the higher speed atwhich most modern 32-bit hardware can access data that is aligned to word addresses,compared to data not so aligned.32-bit RGBAWith the need for compositing images,came a variant of 24-bit RGB which includesan extra 8-bit channel for transparency, thus resulting also in a 32-bit format. Thetransparency channel is commonly known as the alpha channel, so the format isnamed RGBA. This extra channel allows for alpha blending of the image overanother, and is a feature of the PNG format.48-bit RGBHigh precision colour management typically uses up to 16 bits per component,resulting in 48 bpp. This makes it possible to represent 65,536 tones of each colourcomponent instead of 256. This is primarily used in professional image editing, likeAdobe Photoshop for maintaining greater precision when a sequence of more thanone image filtering algorithms is used on the image. 20
  • 21. 16-bit RGBA 16-bit mode known as Highcolor, in which there are either 5 bits per colour, called555 mode (32,768 colours), or the same with an extra bit for green, called 565 mode(65,535 colours). This was the high-end for some display adapters for personalcomputers during the 1990s, but today is considered slightly obsolete. It is still in usein many devices with colour screens as cell phones, digital cameras, personaldigital assistants and videogame consoles.3-bit RGBThe minimum RGB binary representation is 3-bit RGB, one bit per component.Typical for early colour terminals in the 1970s, it is still used today with theTeletext TV retrieval service.16-bit RGB24-bit RGB
  • 22. 3-bit RGB7.2 Monochrome& Greyscale image representationMonochrome paletteshave some shades of grey, from black to white; bothconsidered the most possible darker and lighter "greys", respectively. The general ruleis that those palettes have 2n different shades of grey, where n is the number of bitsneeded to represent a single pixel.1-bitMonochromeMonochrome graphics displays typically have a black background with a white orlight grey image, though green and amber monochrome monitors were also common.Such a palette requires only one bit per pixel, which may be represented as:In some systems, as Hercules and CGA graphic cards for the IBM PC, a bit value of1 represents white pixels and a value of 0 the black ones .Others, like the Atari STand Apple Macintosh with monochrome monitors, a bit value of 0 means a whitepixel and a value of 1 means a black pixel, which it approximates to the printinglogic.2-bit GreyscaleIn a 2-bit colour palette each pixels value is represented by 2 bits resulting in a 4-value palette (2 2 = 4). It has black, white and two intermediate levels of grey asfollows:
  • 23. A monochrome 2-bit palette is used on:  NeXT Computer, NeXTcube and NeXT station monochrome graphic displays.  Original Game Boy system portable videogame console.  Macintosh PowerBook 150 monochrome LCD displays.4-bit GreyscaleIn a 4-bit colour palette each pixels value is represented by 4 bits resulting in a 16-value palette (2 4 = 16) as follows:A monochrome 4-bit palette is used on:  MOS Technology VDC on the Commodore 1288-bit GreyscaleIn an 8-bit colour palette each pixels value is represented by 8 bits resulting in a 256-value palette (2 8 = 256). This is usually the maximum number of greys in ordinarymonochrome systems; each image pixel occupies a single memory byte.Most scanners can capture images in 8-bit greyscale, and image file formats likeTIFF and JPEG natively support this monochrome palette size. Alpha
  • 24. channelsemployed for video overlay also use this palette. The grey level indicates theopacity of the blended image pixel over the background image pixel.Monochrome (1-bit)2-bit Greyscale
  • 25. 4-bit Greyscale8-bit Greyscale7.3 CMYK colour modelThe CMYK colour model is a subtractive colour model, used in colour printing,and is also used to describe the printing process itself. CMYK refers to the four inksused in some colour printing: cyan, magenta, yellow, and key black. Though it variesby print house, press operator, press manufacturer and press run, ink is typically
  • 26. applied in the order of the abbreviation. The “K” in CMYK stands for key since infour-colour printing cyan, magenta, and yellow printing plates are carefully keyed oraligned with the key of the black key plate. Some sources suggest that the “K” inCMYK comes from the last letter in "black" and was chosen because B already meansblue. However, this explanation, though plausible and useful as a mnemonic, isincorrect.The CMYK model works by partially or entirely masking colours on a lighter, usuallywhite, background. The ink reduces the light that would otherwise be reflected. Sucha model is called subtractive because inks “subtract” brightness from white.In the CMYK model, white is the natural colour of the paper or other background,while black results from a full combination of coloured inks. To save money on ink,and to produce deeper black tones, unsaturated and dark colours are produced byusing black ink instead of the combination of cyan, magenta and yellow.Why black ink is used?The “black” generated by mixing cyan, magenta and yellow primaries isunsatisfactory, and so four-colour printing uses black ink in addition to the subtractiveprimaries. Common reasons for using black ink include:  Text is typically printed in black and includes fine detail, so to reproduce text or other finely detailed outlines using three inks without slight blurring would require impractically accurate registration  A combination of 100% cyan, magenta, and yellow inks soaks the paper with ink, making it slower to dry, and sometimes impractically so.  A combination of 100% cyan, magenta, and yellow inks often results in a muddy dark brown colour that does not quite appear black. Adding black ink absorbs more light, and yields much darker blacks.  Using black ink is less expensive than using the corresponding amounts of coloured inks.Comparison with RGB displaysComparisons between RGB displays and CMYK prints can be difficult, since thecolour reproduction technologies and properties are so different. A computer monitormixes shades of red, green, and blue to create colour pictures. A CMYK printer must 26
  • 27. compete with the many shades of RGB with only one shade each of cyan, magentaand yellow, which it will mix using dithering, half toning or some other opticaltechnique.ConversionSince RGB and CMYK spaces are both device-dependent spaces, there is no simpleor general conversion formula that converts between them. Conversions are generallydone through colour management systems, using colour profiles that describe thespaces being converted. Nevertheless, the conversions cannot be exact, particularlywhere these spaces have different gamuts. A general method that has emerged for thecase of halftone printing is to treat each tiny overlap of colour dots as one of 8(combinations of CMY) or of 16 (combinations of CMYK)colours, which in thiscontext are known as Neugebauer primaries. The resultant colour would be an area-weighted colorimetric combination of these primary colours.A colour photograph Image separated with Image separated with and yellow yellow and black
  • 28. 7.4 HSV and HSL colour modelHSL and HSV are the two most common cylindrical-coordinate representations of points inan RGB colour model, which rearrange the geometry of RGB in an attempt to be moreperceptually relevant than the Cartesian representation. HSL stands for hue, saturation, andlightness, and is often also called HLS. HSV stands for hue, saturation, and value, and isalso often called HSB (B for brightness). Unfortunately, while typically consistent, thesedefinitions are not standardized, and any of these abbreviations might be used for any of thesethree or several other related cylindrical models.The purpose of these models is to aid selection, comparison, and modification of colours byorganizing them into a cylindrical geometry which roughly corresponds to human perception.Both models are derived from the Cartesian RGB cube. Both models place greysalong acentral vertical axis, with black at its bottom and white at its top, and push the mostcolourfulcolours to the edge of the cylinder. The angle around the axis corresponds to “hue”,the distance from the axis corresponds to “saturation”, and the distance along the axiscorresponds to “lightness”, “value” or “brightness”. Because HSL and HSV are simpletransformations of device-dependent RGB models, the physical colours they define depend onthe colours of the red, green, and blue primaries of the device or of the particular RGB space,and on the gamma correction used to represent the amounts of those primaries. Each uniqueRGB device therefore has unique HSL and HSV spaces to accompany it, and numerical HSLor HSV values describe a different colour for each basis RGB space. 28
  • 29. 3D and 2D HSL and HSV models Comparison of HSL and HSV models
  • 30. 8. Image Parameters Brightness Brightness is an attribute of visual perception in which a source appears to be radiating or reflecting light. In other words, brightness is the perception elicited by the luminance of a visual target. This is a subjective attribute/property of an object being observed. In the RGB colour space, brightness can be thought of as the arithmetic mean (µ) of the red, green, and blue colour coordinates. Brightness is also a colour coordinate in the HSB or HSV colour space. Contrast Contrast is the difference in visual properties that makes an object distinguishable from other objects and the background. In visual perception of the real world, contrast is determined by the difference in the colour and brightness of the object and other objects within the same field of view. Luminance Luminance is the density of luminous intensity in a given direction. The SI unit for luminance is candela per square metre. In imaging operations, luminosity is the term used incorrectly to refer to the luma component of a colour image signal; that is, a weighted sum of the nonlinear red, green, and blue signals. It seems to be calculated with the Rec. 601 luma co-efficient as: Luma (Y’) = 0.299 R’ + 0.587 G’ + 0.114 B’ The "L" in HSL colour space is sometimes said incorrectly to stand for luminosity. "L" in this case is calculated as 1/2 (MAX + MIN), where MAX and MIN refer to the highest and lowest of the RGB components to be converted into HSL colour space.
  • 31. GammaA gamma value is used to quantify contrast, for example of photographic film. It isthe slope of an input–output curve in log–log space, that is:Gamma values less than 1 are typical of negative film, and values greater than 1 aretypical of slide (reversal) film.
  • 32. 9. Image Enhancements 9.1 Histogram Equalisation Histogram equalization is a method in image processing of contrast adjustment using the images histogram.This method usually increases the global contrast of many images, especially when the usable data of the image is represented by close contrast values. Through this adjustment, the intensities can be better distributed on the histogram. This allows for areas of lower local contrast to gain a higher contrast without affecting the global contrast. Histogram equalization accomplishes this by effectively spreading out the most frequent intensity values. The method is useful in images with backgrounds and foregrounds that are both bright or both dark. In particular, the method can lead to better views of bone structure in x- ray images, and to better detail in photographs that are over or under-exposed. A key advantage of the method is that it is a fairly straightforward technique and an invertible operator. So in theory, if the histogram equalization function is known, then the original histogram can be recovered. The calculation is not computationally intensive. A disadvantage of the method is that it is indiscriminate. It may increase the contrast of background noise, while decreasing the usable signal. Implementation Consider a discrete greyscale image {x} and let ni be the number of occurrences of grey level i. The probability of an occurrence of a pixel of level i in the image is L being the total number of grey levels in the image, n being the total number of pixels in the image, and px(i) being in fact the images histogram for pixel value i, normalized to [0,1].Let us also define the cumulative distribution function corresponding to p x as : ,
  • 33. which is also the images accumulated normalized histogram. We would like to createa transformation of the form y = T(x) to produce a new image {y}, such that its CDFwill be linearized across the value range, i.e.for some constant K. The properties of the CDF allow us to perform such a transform;it is defined asThe T maps the levels into the range [0, 1]. In order to map the values back into theiroriginal range, the following simple transformation needs to be applied on the result:Histogram equalization of colour imagesThe above describes histogram equalization on a greyscale image. However it canalso be used on colour images by applying the same method separately to the Red,Green and Blue components of the RGB colour values of the image. Still, it should benoted that applying the same method on the Red, Green, and Blue components of anRGB image may yield dramatic changes in the images colour balance since therelative distributions of the colour channels change as a result of applying thealgorithm. However, if the image is first converted to another colour space, Labcolour space, or HSL/HSVcolour space in particular, then the algorithm can beapplied to the luminance or value channel without resulting in changes to the hueand saturation of the image.
  • 34. 9.2 Gamma adjustmentGamma correction, gamma nonlinearity, gamma encoding, or often simplygamma, is the name of a nonlinear operation used to code and decode luminance ortristimulus values in video or still image systems. Gamma correction is, in thesimplest cases, defined by the following power-law expression:where the input and output values are non-negative real values, typically in apredetermined range such as 0 to 1. A gamma value is sometimes called anencoding gamma, and the process of encoding with this compressive power-lawnonlinearity is called gamma compression; conversely a gamma value iscalled a decoding gamma and the application of the expansive power-lawnonlinearity is called gamma expansion.A cathode ray tube (CRT) converts a video signal to light in a nonlinear way, becausethe electron guns intensity as a function of applied video voltage is nonlinear. Thelight intensity I is related to the source voltage VS according towhere γ is the Greek letter gamma. For a CRT, the gamma that relates brightness tovoltage is usually in the range 2.35 to 2.55; video look-up tables in computers usuallyadjust the system gamma to the range 1.8 to 2.2, which is in the region that makes auniform encoding difference give approximately uniform perceptual brightnessdifference, as illustrated in the diagram on the top of this section.For simplicity, consider the example of a monochrome CRT. In this case, when avideo signal of 0.5 (representing mid-grey) is fed to the display, the intensity orbrightness is about 0.22 (resulting in a dark grey). Pure black (0.0) and pure white(1.0) are the only shades that are unaffected by gamma.To compensate for this effect, the inverse transfer function (gamma correction) issometimes applied to the video signal so that the end-to-end response is linear. Inother words, the transmitted signal is deliberately distorted so that, after it has been
  • 35. distorted again by the display device, the viewer sees the correct brightness. Theinverse of the function above is:where VC is the corrected voltage and VS is the source voltage, for example in CRT1/γ is 1/2.2 or 0.45.A colour CRT receives three video signals (red, green and blue) and in general eachcolour has its own value of gamma, denoted γR, γG or γB. However, in simple displaysystems, a single value of γ is used for all three colours. The power-law function, orits inverse, has a slope of infinity at zero. This leads to problems in converting fromand to a gamma colorspace.Methods to perform display gamma correction in computingUp to four elements can be manipulated in order to achieve gamma encoding tocorrect the image to be shown on a typical computer display:  The pixels intensity values in a given image file; that is, the binary pixel values are stored in the file in such way that they represent the light intensity via gamma-compressed values instead a linear encoding. This is done systematically with digital video files, in order to save a gamma-decoding step while playing.  The rendering software writes gamma-encoded pixel binary values directly to the video memory or in the CLUT hardware registers of the display adapter. They drive Digital-to-Analog Converterswhich output the proportional voltages to the display. For example, when using 8-bit per channel, 24-bit RGB colour, writing a value of 128 in video memory it outputs the proportional ≈0.5 voltage to the display, which it is shown darker due to the monitor behaviour.  Modern display adapters have dedicated calibrating CLUTs, which can be loaded once with the appropriate gamma-correction look-up tablein order to modify the encoded signals digitally before the DACs that output voltages to
  • 36. the monitor. Setting up these tables to be correct is called hardware calibration.  Some modern monitors allow to the user to manipulate their gamma behaviour, encoding the input signals by themselves before they are displayed on screen.Gamma correction demonstration
  • 37. 9.3 Noise ReductionNoise reduction is the process of removing noise from a signal. Noise reductiontechniques are conceptually very similar regardless of the signal being processed,however a priori knowledge of the characteristics of an expected signal can mean theimplementations of these techniques vary greatly depending on the type of signal.All recording devices, both analogue anddigital, have traits which make themsusceptible to noise. Noise can be random or white noise with no coherence orcoherent noise introduced by the devices mechanism or processing algorithms.In the case of photographic film, noise is introduced due to the grain structure of themedium. In photographic film, the size of the grains in the film determines the filmssensitivity, more sensitive film having larger sized grains. Many further uses of theseimages require that the noise will be (partially) removed - for aesthetic purposes as inartistic work or marketing, or for practical purposes such as computer vision.TypesIn salt and pepper noise, pixels in the image are very different in colour or intensityfrom their surrounding pixels; the defining characteristic is that the value of a noisypixel bears no relation to the colour of surrounding pixels. Generally this type of noisewill only affect a small number of image pixels. When viewed, the image containsdark and white dots, hence the term salt and pepper noise. Typical sources includeflecks of dust inside the camera, or with digital cameras, faulty CCD elements.In Gaussian noise, each pixel in the image will be changed from its original value bya small amount. A histogram, a plot of the amount of distortion of a pixel valueagainst the frequency with which it occurs, shows a normal distribution of noise.While other distributions are possible, the Gaussian distribution is usually a goodmodel, due to the central limit theorem that says that the sum of different noisestends to approach a Gaussian distribution.In selecting a noise reduction algorithm, one must weigh several factors:  the available computer power and time available  whether sacrificing some real detail is acceptable if it allows more noise to be removed 37
  • 38.  the characteristics of the noise and the detail in the image, to better make those decisionsChroma and luminance noise separationIn real-world photographs, the highest spatial-frequency detail consists mostly ofvariations in brightness ("luminance detail") rather than variations in hue ("chromadetail"). Since any noise reduction algorithm should attempt to remove noise withoutsacrificing real detail from the scene photographed, one risks a greater loss of detailfrom luminance noise reduction than chroma noise reduction simply because mostscenes have little high frequency chroma detail to begin with. In addition, most peoplefind chroma noise in images more objectionable than luminance noise; the colouredblobs are considered "digital-looking" and unnatural, compared to the grainyappearance of luminance noise that some compare to film grain. For these tworeasons, most photographic noise reduction algorithms split the image detail intochroma and luminance components and apply more noise reduction to the former.Linear smoothing filtersOne method to remove noise is by convolving the original image with a mask thatrepresents a low-pass filter or smoothing operation. For example, the Gaussianmask comprises elements determined by a Gaussian function. This convolution bringsthe value of each pixel into closer harmony with the values of its neighbours. Ingeneral, a smoothing filter sets each pixel to the average value, or a weighted average,of itself and its nearby neighbours; the Gaussian filter is just one possible set ofweights.Smoothing filters tend to blur an image, because pixel intensity values that aresignificantly higher or lower than the surrounding neighbourhood would "smear"across the area. Because of this blurring, linear filters are seldom used in practice fornoise reduction; they are, however, often used as the basis for nonlinear noisereduction filters.Anisotropic diffusionAnother method for removing noise is to evolve the image under a smoothing partialdifferential equation similar to the heat equation which is called anisotropicdiffusion. With a spatially constant diffusion coefficient, this is equivalent to the 38
  • 39. linear Gaussian filtering, but with a diffusion coefficient designed to detect edges, thenoise can be removed without blurring the edges of the image.Nonlinear filtersA median filter is an example of a non-linear filter and, if properly designed, is verygood at preserving image detail. To run a median filter: 1. consider each pixel in the image 2. sort the neighbouring pixels into order based upon their intensities 3. replace the original value of the pixel with the median value from the listA median filter is a rank-selection (RS) filter, a particularly harsh member of thefamily of rank-conditioned rank-selection (RCRS) filters; a much milder memberof that family, for example one that selects the closest of the neighbouring valueswhen a pixels value is external in its neighbourhood, and leaves it unchangedotherwise, is sometimes preferred, especially in photographic applications.Median and other RCRS filters are good at removing salt and pepper noise from animage, and also cause relatively little blurring of edges, and hence are often used incomputer vision applications.9.4 Homomorphic filteringHomomorphic filtering is a generalized technique for signal and image processing,involving a nonlinear mapping to a different domain in which linear filter techniquesare applied, followed by mapping back to the original domain. This concept wasdeveloped in the 1960s by Thomas Stockham, Alan V. Oppenheim, and Ronald W.Schafer at MIT.Homomorphic filter simultaneously normalizes the brightness across an image andincreases contrast. Homomorphic filtering is also used to remove multiplicativenoise. Illumination and reflectance are not separable, but their approximate locationsin the frequency domain may be located. Since illumination and reflectance combinemultiplicatively, the components are made additive by taking the logarithm of theimage intensity, so that these multiplicative components of the image can be separated 39
  • 40. linearly in the frequency domain. Illumination variations can be thought of as amultiplicative noise, and can be reduced by filtering in the log domain.To make the illumination of an image more even, the high-frequency componentsare increased and low-frequency components are decreased, because the high-frequency components are assumed to represent mostly the reflectance in the scene,whereas the low-frequency components are assumed to represent mostly theillumination in the scene. That is, high-pass filtering is used to suppress lowfrequencies and amplify high frequencies, in the log-intensity domain. 40
  • 41. i. List of acronymsAR Augmented RealityBPP Bits Per PixelCCD Charge Coupled DeviceCGA Colour Graphics AdapterCMOS Complementary Metal Oxide SemiconductorCMYK Cyan Magenta Yellow KeyCRT Cathode Ray TubeDAC Digital to Analog ConverterDICOM Digital Imaging and Communications in MedicineHSB Hue Saturation BrightnessHSL Hue Saturation LightnessHSV Hue Saturation ValueJPEG Joint Photographic Experts GroupLCD Liquid Crystal DisplayLGN Lateral Geniculate NucleusLPF Low Pass FilterMIT Massachusetts Institute of TechnologyNPR Non Photorealistic RenderingPNG Portable Network GraphicsRCRS Rank-Condition Rank-SelectionRGB Red Green BlueRGBA Red Green Blue AlphaRS Rank-SelectionRYB Red Yellow BlueSRGB Standard Red Green BlueTIFF Tagged Image File FormatVOG Violet Orange Green 41
  • 42. ii. Works CitedFarid, H. (n.d.). Fundamentals of image processing. Retrieved from http://www.cs.dartmouth.edu/~faridGirod, B. (n.d.). EEE 368 Point Operaions.Jankowski, M. (n.d.). Mathematica. Retrieved from http://www.wolfram.comKids Health. (n.d.). Retrieved from http://www.cyh.com/SubDefault.aspx?p=255Szepesvari, C. (n.d.). Image Processing : Basics.Wikipedia. (n.d.). Retrieved from http://www.wikipedia.com 42

×