0% found this document useful (0 votes)
10 views13 pages

Digital Image Unit 4

The document discusses image compression techniques, emphasizing the need to reduce data for efficient transmission and storage. It outlines types of data redundancies, including coding, inter-pixel, and psychovisual redundancies, and introduces compression strategies that can be lossless or lossy. Additionally, it touches on morphological image processing, focusing on the representation of shapes and the application of set theory in binary images.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
10 views13 pages

Digital Image Unit 4

The document discusses image compression techniques, emphasizing the need to reduce data for efficient transmission and storage. It outlines types of data redundancies, including coding, inter-pixel, and psychovisual redundancies, and introduces compression strategies that can be lossless or lossy. Additionally, it touches on morphological image processing, focusing on the representation of shapes and the application of set theory in binary images.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 13
zp miaiw> Tn IMAGE COMPRESSION 6.1 INTRODUCTION on and storage is very expensive. Generally, as we know that for presentation of The data trans we have very large amount of data (in digital data, we use encoding. By the encoding process also, comparison to original data). Thus, the overall consideration is : 1. Tosave the transmission bandwidth for transmission of data (In our case image). 2. To save the space for storage of image/data. For that purpose, we use compression techniques. “By compression, tue mean to compress the datafr easy transmission and easy storage of data. By decompression means, again converting the compressed data into original data again” Now we will start the specific discussion in respect to image processing. 6.2 MATHEMATICAL ANALYSIS The term ‘data compression’ refers to the process of reducing the amount of data required to repre senta given quantity of information. “A data that is not relevant to represent any information is called data redundancy”. Data redundancy is the center issue in digital image compression. If m, and nz denote the number of information carrying units in two data sets that represent the same information, the relative redundancy Ry cf the first data set can be defined as: we (6.1) where y= Compression Ratio = “1 ny (a) Nowif ny=n Cp=1 Rp=0 80 Image Compression 81 that represents that first data has no redundant information, wr Ny << my ” C= So, R My Car So, Rp>1 That represents highly redundant data and high compression can be done. Or ny>>m 50, Cy= ™ 0 So, eee Itmeans now second data is larger in comparison to original one. Now first of all, we will study data redundancy. 6.3 TYPES OF DATA REDUNDANCIES Indigital image processing, we have three basic types of redundancies : (@) Coding redundancies. (0) Inter pixel redundancies (© Psychovisual redundancies. 5 63.1 Coding Redundancy “Ifthe gray levels of an image are coded in a way that uses more cade symbol than absolutely necessary fo present each gray level, the resulting image is said to be code redundancy”. Ifwe draw the histogram of an image, we see that Pe(n)= AE oe n= Number of time of k pixel occurrence n= Number of total pixel. Probability of occurrence of k pixel. Wegeta diagram ; that will show thata particular gray level has P probability of occurrence: r jSeeralty, coves assigned to set of events have not been select the code re s present when the !Otake fuly ad le redundancy is pre ‘Vantage of the probabilities of the event”. By natural 5 «ural coding, we assign the equal number of bit | Fecanbility results in code redundancy. Itis better to assign less (een ce ethan ssign more bits for less probable gray level. That wll provideimags hod is called vari igh probability and less for more probable gray e compression. This 5 for symbols of hi able length coding. 82 Digital Image Processing 6.3.2. Inter-pixel Redundancy “The only disadvantage of coding redundancy is that it would not provide the correlation between the pixels, For correlation of pixels, we need to analysis the structural ‘or’ geometrical analysis of codes, See the Fig. 6.1 given below (@) Figure ‘a’ and ‘b’ shows to identical histogram having three denominating range of gray levels (Now ifwe apply the variable length coding, we get code get similar code pattern. (c) Nowif we draw the autocorrelation function redundancy and for both images, we N=1-an Ww A@=——a LS ey) ey tan) (63) yao 2 © P.x10 A ic od i B ' OW I & 08 4 ' 9 vol ' 04 + i rere \ c 128 225 7 120 225 O\ gorse? (2) histogram of (b) Histogram of A ee irst image secorid image On i © 10 104 1 oo A 9 Cos i Wea 08 ie ei eel 06 onl 04 % nee 02 = ol oo q 50 100 (6) Auto correlation (@) Auto correlation Fig. 6.1 Interpixel redundancy. ae ; Ae E> see a ta is dramatic difference between the shape of functions for image ‘a’ web payphones tip tween pixels of image. “Because the value of any given pixel can be reasonslll priced fom the onl ofits neighbours, the information carried by inva pixel is relatively 3p pixel redundancy”. In order to reduce the interpixel redundancy in an image, pixel array are normally used for human viewi Ss A is ; F nen aenat n viewing and interpretation must be transformed into mo" Image Compression 83 simple example is that to code the difference between the Successive pixels and send. This type of transformation is generally reversible and called mapping. 63.3 Psychovisual Redundancy (@ Weshould note the brightness of a region does not dey pend upon only the reflection made by region. Italso depends upon eye. “Certain informations simply has less relative importance than other information in normal visual processing. This information is said to be psychovisually redundant”. It can be eliminated without significantly impairing the quality of image perception. (0) Unlike coding and interpixel redundancy, psychovisual redundancy is associated with real ‘or’ quantifiable visual information. Its elimination is possible only because the information itself is not essential for normal visual processing. Since the elimination of psychovisually redundant data results in a loss of quantitive informa- tion. Itis commonly referred to as quantization. Quantization results is lossy data compression. n 6.4 IMAGE COMPRESSION MODEL tia Se fay) _,| Source Channel i Channel Source f{xyy | encoder encoder Channg decoder decoder —__ uF Encoder Decoder (a) General compression system model fey) symbol |_Shenne Quantizer | >} ee Mapper encoder (b) Source encoder Symbol || loverseug Stuy) Channel —{ eae | Mapper ¢ (c) Source decoder Fig. 6.2 Image compression model. Figure ‘a’ shows the basic block diagram for image compression system. ) Source &: me ncoder and Decoder: ae ing ‘or’ eliminatii -oding, interp! * The source encoder is responsible for reducing 0” eliminating any coding, Psychovisual redundancy in the input image. * Inthe first stage of the source coding process, a format designed to reduce interpixel redund: * Inthe second stage of source encoding process, we 2 bee psychov Teduce the efficiency of mapper: Butit is required for hat will use the fixed '0” Va * In the third and final stage, we use symbol encoder tha length coding to the quantizer output. the mapper transforms the input data into PP er er ae fancies in the input imags : 3 ntizer. Definitely quantizer will sual reduandcies. riable 84 Digital Image Processing Itshould be clear that all these three stages are present in every model—it is not compulsory, If we want error free coding, then quantizer part will be omitted. In predict compression system, Quantizer + Mapper = Single Block. (b) Channel Encoder and Decoder: Channel encoder increases the noise immunity of the source encoder’s output. Encoder and decoder are designed to reduce the impact of channel noise by inserting a con- trolled form of redundancy in to source encoded data. 6.5 COMPRESSION STRATEGIES The compression methods have been classified as either lossless ‘or’ lossy. “A lossless technique means that the restored data file is identical to the original. This is absolutely necessary for many types of data”. For example : executable code, word processing files, tabulated numbers etc. You can not afford to misplace even a single bit of this type of information. “In comparison, data files that represent images and other acquired signals do not have to be kept in perfect condition for storage ‘or’ transmission. If the changes made to these signals resemble a small amount of additional noise, no harm is done. Compression techniques that allows this type of degradation are called lossy”. The distinction is important because lossy techniques are much more effective at compression than lossless methods. The higher the compression ratio, the more noise added to the data. Following table conclude the classification along with examples : Lossless (Error-free compression) Lossy 1. Run-length 1. Lossy predictive coding techniques. 2. Variable length coding 2. Transform coding. 3. Lempel-Ziv-Welch (LZW) coding. 3. Wavelet coding. 4. Lossless predictive coding. Now we will explain them one-by-one in detail.) S! 5) BD Be (9) MorRPHOLOGICAL IMAGE PROCESSING 7.1. INTRODUCTION basically is a biological word that stands for structure and forms of animals and Morphological 'ys useful for representation and basic information about animals and plants plant that is alwa’ “In the field of image processing mathematical morphology is a tool that is useful for representation and description of region shapes such as boundary, skeletons and the convex hull”. The roots of morphology are in set theory. Here we are concern with binary images only. Then2 set of black pixels (‘or’ only set of white pixels also) in a binary image is a complete morphological description of the image. In binary images, the sets are called the members of 2-D integer space= where each element of a set is a tuple (2-D vector). So before starting the morphological image processing, let us discuss about the basics of set theory. 7.2, BASIC CONCEPT OF SET THEORY 1. Let Abeasetinz*. If a=(a,,2,) isa element of A, then we write ae A wa (71) nN Similarly, ifa is not an element of A, we write agA (7.2) » The set with no elements is called the null ‘or’ empty set and is denoted by the symbol ¢- If we write the expression C= (w | w=-d, forde D} We means that set ‘C’ is the set of elements, w, such that ‘w’ is formed by multiplying e% the two co-ordinates of all elements of set ‘D’ by 1. Ifevery element of set ‘A’ is also an element of another set ‘B’, then A is said to be a subset: Itis denoted by S (73) ch of of BY 9 118 Morphological Image Processing 119 ax (7) ‘The union of two sets ‘A’ and ‘B’ is denoted by C=AUB (75) Itmeans new set ‘C’ will have all the elements of set A and set B. The intersection of two sets ‘A’ and ‘Bis represented by C=ANB (76) Thus set ‘C’ will have all the elements that are common in set ‘A’ and set ‘B’. Twosets ‘A’ and ‘B’ are called mutually exclusive, can be represented by AnB=6 ifboth do not have any common element. It (7.7) The complement of a set ‘A’ is the set of elements that should not be in’ AC= (wl we A} (7.8) A AUB ANB B A-B ae _| (ay 2 Ze 8 We Fig. 7.1 (a) Basic concepts of set theory 120 10. 11 12. Digital Image Processing ned by osets A and Bis denoted by A-B. Itis de! w | we A,we B)=(ANB)" 05 ay have the elements of ‘A’ but can not have th The difference of tw A-B The difference set belongs to A, it means itm elements of ‘B’. The reflection of set B can be represented by B. It is defined by B = {w | w=—b forbe B) 4 The translation of set ‘A’ by point denoted by (A).. It is defined as (A), = {c | c=a+z,forae A} [All the set theory laws discussed till now have been drawn in figure 7.1 also, A NOT (A) nor > = (21/2, (7.1 (A) AND (8) AND OR) OR > (a) XOR (8) ra n- oS [NOT (A)] AND (8) 3 NoT- ‘AND es Fig. 7.1 (b) Basic Logical Function Morphological Image Processing 124 73 LOGIC OPERATIONS INVOLVING BINARY IMAGES gefore applying different logic operations of binary on binary image, we just revise the i jgicoperations in the form of table as given below : } ise the important Table No. 7.1 Logical Operation AB | NotA(A) | AANDB(A.B) | AORB(A+B) ] AX-ORBA@B v0 T 0 0 0 anal 1 0 i 1 Ae 0 0 1 1 ae 0 1 1 0 Here student should remember that by using AND, ‘OR’ and ‘NOT’ we can implement further different logics. For example, AX-NORB(A © B)= NOT[A®B] (7.12) Allthe operations have been shown by figures. Here black indicates that the binary image pixel is ‘1’ and white indicates that the binary image pixel is ‘0’. By figure it should be clear that 1, AANBB(A.B) and AB canbe used interchangeably. 2. AorB(A+B)and A U Bcanbe used interchangeably. Ifstudents remember, these functions have been already been discussed in Chapter 2. 74 DILATION AND EROSION Dilation and Erosion are the fundamentals of mor phological processing. Let us discuss them in detail. 741 Dilation add pire fo dus bourdasia With A and B assets in (means binary image) ;the dilation of A by B denoted by A@B, isdefined A@B= {2\(8) Asa} (7.13) Equation shows that “first of all obtain reflection of B about origin and then shift this reflection by. Then dilation Of A by B is set of all displacements z such that B and A overlap by at least one: element”. Thus __ sed on above interpretation equation can be rewritten in the form aos={2|[ os|ca} (74) ae “Bis referred as structuring element. on ®*®Fig,7.2 (a) shows the simple set, A and the structuring element B. The u Binof the, element. Asthe. “SBitself Jack dot denotes the the reflection of ‘BY issame ‘ Pe refer its origin, structuring element Bis symmetric with reference tits origin Ne ich further The dashed line shows the reference and solid line shows the li disp) ‘ Null (that is not desirable condition). Placements ofthe origin of B by 2 will cause the {(B). > A} =Null (that 122 Digital Image Processing Thus, all points inside the boundary shows the dilation of A by B. Next figure 7.2 (b) shows the ney example of dilation of A by B. or due to poor resolution. Example has been Application of dilation is for bridging gaps of characte shown in Fig. 7.2 (b). J dia { 4 © as | &=8 i H nary. i 4 it a or 8 t {a) First Example a2 a4 eld d -8 ASB 1 d alin ae 38 (b) Second Example Fig. 7.2 Dilation Process. 7.4.2 Erosion Forsets A and Bin =?(means binary image) the erosion of A by B, denoted by A © Bis defined A OB= [= 1 (B).CAI (73) Equation shows that “the erosion of A by B is set ofall points = such that B, of dilation. Again dashes limit beyond whieh fu! desired condition. shifted by zis contained it A nd Line thet Again we can discuss the same examples in Fig. 7.3 (a) as in case Next shows the reference. The boundary of the shaded region shows the displacement of origin of B will cause the condition that will not satisfy the figure 7.3 (¥) shows the next example of erosion. Morphological Image Processing 123 rel 34/4 1 8 8 (b) Second Example Fig. 7.3 Erosion. The main application of erosion is for eliminating irrelevant size detail from an binary image suppose that we have the following example in which we have an binary image that has squares of size1,3,5,7,9 and 15 pixels on the side. Now we want to remove all the squares except the largest one (that is of size 15-pixels). So now for erosion, just choose the structuring element of size bigger than the squares we want to eliminate and smaller than the squares we want to save. Just for our example justified size is 13. Thus, we choose the structuring element of size 13 x 13 pixels After erosion, the result has been shown in Fig. 7-4 (b) Fig. 7.4 Application of Erosion 7.4, . : ‘3 Relation Between Dilation and Erosion cosion are dual with respect to set Byes 'y examples and discussion it should be cleared that “dilation and er pect to {erosion shrinks the image Compleme plementation and reflection to each other. Dilation expands an image aii 124 Digital Image Processing Mathematically we can also prove that starting with (A ©BY=AC@B (28 to prove that start with the expression of erosion that is (A ©B)°= (2 | (B). cAI (21) If (B), is contained inset A, then (B), VAS = 4, then (A ©B)°= fz | (B). NAS = 91" (718) But the complement of the set of z's that satisfy (B.) 0 AC= dis the set of 2’s such that (B), > AC#9, Thus, (A ©B)S= Kz | (B): ASO) =A @B ..(719) That is the proved relation. 7.5 OPENING AND CLOSING ngand closing are two other important morphological operations. open ee by ‘ frm hs the contour of an object. Itremoves the narrow peaks of image. Openir 7.5.1 Opening Opening generally smoot! ‘The opening of set A by structuring element B is denoted by A 0 B. Itis defined by the following equation AoB=(A ©B)@B (720) Thus, the “opening A by Bis the erosion of A by B, followed by a dilation of the result by B". Equation can be written in another form also, according to that AoB=U((B), | (B),cA} Where U |.} denotes the union ofall the sets inside the braces. Equation states that the op* A by Bis obtained by taking the union of all translates of B that fits into A. By this second equation, the geometrical interpretation of opening operation can easily be described. We can view structuring element ‘B’ asa flat ‘rolling ball’. The boundary of A o Bisthen established by the points in B that reaches the farthest into the boundary of A as Bis rolled around the inside of this boundary. The operation has been shown below in Fig. (7.5). Translates of B in A (721) eningof A Boundary of opening @ (0) (a) Structuring element ‘B" inside the inner boundary of ‘A’. (b) Complete opening, Fig. 7.5. Opening Process. Morphological Image Processing 125 7.5.2 Closing Closing also tends to smooth sections of contours. But Opposite to opening, it generally fuses narrow breaks and long thin gulfs. It eliminates small holes and fills gaps in contour. Closing of set ‘A’ by structuring element ‘B’ is denoted by A #B. Itis givenby the following formula: AeB=(A@B) ©B co VL229) So we can say the “closing of A by B is simply dilation of A by B followed by the erosion of the result by B. Again” just like dilation and erosion ; opening and closing are duals of each other with respect to set complementation and reflection. Thus, geometric representation of closing is same as opening. But now the structuring element is rolled outside boundary of A. The process has been drawn below AcB : | J 9 e (a) Structuring element rolling on (b) Complete closing [el the outer boundary of A Fig. 7.6 Closing process cl ( | 753 Relation between Opening and Closing “As stated earlier that opening and closing are duals of each other with respect to set complementation and reflection”. That is Ps (7.23) (Ae B)©= (ACo B)

You might also like