Digital image processing gonzalez pdf free download






















Recall from Fig. Thus, the important point to be made in Fig. As you can see, this indeed is the case for the squares in Fig. For the shades of red, green, and blue in Fig.

When the aver- aging mask is fully contained in a square, there is no blurring because the value of each square is constant. When the mask contains portions of two or more squares the value produced at the center of the mask will be between the values of the two squares, and will depend the relative proportions of the squares oc- cupied by the mask.

To see exactly what the values are, consider a point in the center of red mask in Fig. We know from a above that the value of the red point is 0 and the value of the green point is 0. Thus, the values in the blurred band be- tween red and green vary from 0 to 0. The values along the line just discussed are transitions from green to red.

The reason for the diagonal green line in this figure is that the average values along that region are nearly midway between red and blue, which we know from from Fig.

If an RGB point z does not lie on the plane, and its coordinates are substituted in the preceding equation, the equa- tion will give either a positive or a negative value; it will not yield zero.

We say that z lies on the positive or negative side of the plane, depending on whether the result is positive or negative. Suppose that we test the point a given in the problem statement to see whether it is on the positive or negative side each of the six planes composing the box, and change the coefficients of any plane for which the result is negative.

Then, a will lie on the positive side of all planes composing the bounding box. In fact all points inside the bounding box will yield positive values when their coordinates are substituted in the equa- tions of the planes. Points outside the box will give at least one negative or zero if it is on a plane value. Thus, the method consists of substituting an unknown color point in the equations of all six planes.

If all the results are positive, the point is inside the box; otherwise it is outside the box. The intersections of pairs of par- allel planes establish a range of values along each of the RGB axis that must be checked to see if the if an unknown point lies inside the box or not. This can be done on an image per image basis i. These will produce three binary images which, when ANDed, will give all the points inside the box.

In other words, the figure looks like a blimp aligned with the R-axis. To compute the gradient of each component image we take second-order partial derivatives. In this case, only the component of the derivative in the horizontal direction is nonzero.

If we model the edge as a ramp edge then a profile of the derivative image would appear as shown in Fig. The magnified view shows clearly that the derivatives of the two images are mirrors of each other.

Thus, if we computed the gradient vector of each image and added the results as suggested in the problem state- ment, the components of the gradient would cancel out, giving a zero gradient for a color image that has a clearly defined edge between two different color re- gions. This simple example illustrates that the gradient vector of a color image is not equivalent to the result of forming a color gradient vector from the sum of the gradient vectors of the individual component images.

Chapter 7 Problem Solutions Problem 7. Problem 7. Level 0 of the prediction residual pyramid is the lowest resolu- tion approximation, [8. The level 2 prediction residual is obtained by upsam- pling the level 1 approximation and subtracting it from the level 2 approxima- tion original image. If the filters are orthonormal,. Thus, the filters are orthonormal and will also satisfy Eq. In addition, they will satisfy the biorthogonality conditions stated in Eqs.

The filters are both orthonormal and biorthogonal. Using Eq, 7. The last two coefficients are d 1 0 and d 1 1 , which are computed as in the example. When the index is large, the resemblance is strong; else it is weak. Thus, if a function is similar to itself at different scales, the resemblance index will be sim- ilar at different scales. The CWT coefficient values the index will have a char- acteristic pattern. As a result, we can say that the function whose CWT is shown is self-similar—like a fractal signal.

The CWT is often easier to interpret because the built-in redundancy tends to reinforce traits of the function or image. For example, see the self-similarity of Problem 7. To determine C , use Eq. To check the result substitute these values into Eq. To construct the approximation pyramid that corresponds to the transform in Fig. Thus, the approx- imation pyramid would have 4 levels. If the input is shifted, the transform changes. The filter bank of Fig. This is the case in the third transform shown.

The functions are determined using Eqs. To order the wavelet functions in frequency, count the number of transitions that are made by each function.

For example, V0 has the fewest transitions only 2 and lowest frequency content, while W2, AA has the most 9 transitions and correspondingly highest frequency content. From top to bottom in the figure, there are 2, 3, 5, 4, 9, 8, 6, and 7 transitions, respectively.

They are 2. Because the detail entropy is 0, no further decomposition of the detail is war- ranted. Thus, we perform another FWT iteration on the approximation to see if it should be decomposed again. This process is then repeated until no further decompositions are called for. The resulting optimal tree is shown in Fig.

Chapter 8 Problem Solutions Problem 8. That is, all intensities are equally probable. Since all intensities are equally probable, there is no advantage to assigning any particular intensity fewer bits than any other. Thus, we assign each the fewest possible bits required to cover the 2n levels.

Problem 8. The maximum run length would be 2n and thus require n bits for representation. Since a run length of 0 can not occur and the run-length pair 0, 0 is used to signal the start of each new line - an additional 2n bits are required per line. To achieve some level of compression, C must be greater than 1. Note that the quantized intensities must be multiplied by 16 to decode or decompress them for the rms error and signal-to-noise calculations.

Table P8. For instance, compute the differences between adjacent pixels and Huffman code them. Then, using Eq. Therefore, H is always less than, or equal to, log q. The codes are complements of one another. They are constructed by following the Huffman procedure for three symbols of arbitrary probability. The probabilities used in the computation are given in Table P8. Use the procedures described in Section 8. The intensities are first arranged in order of probability from the top to the bottom at the left of the source reduction diagram.

The least probable symbols are them combined to create a reduced source and the process is repeated from left to right in the di- agram. Code words are then assigned to the reduced source symbols from right to left. The codes assigned to each intensity value are read from the left side of the code assignment diagram.

The resulting probabilities are listed in Table P8. The difference between this value and the entropy in a tells us that a mapping can be created to eliminate 1.

The difference image is 21 0 0 74 74 74 0 0 21 0 0 74 74 74 0 0 21 0 0 74 74 74 0 0 21 0 0 74 74 74 0 0 The probabilities of its various elements are given in Table 8. The entropy of the pixel pairs computed in d , which is smaller that the value found in a , reveals that the pixels are not statistically independent.

There is at least 1. The difference image mapping used in e removes most of that spatial redundancy, leaving only 1. It is computed by the procedure out- lined in Section 8. Then: 1. Count the number of 1s in a left-to-right scan of a concatenated G m n bit sequence before reaching the first 0, and multiply the number of 1s by m.

For example, to decode the first G 3 n code in the Golomb coded bit sequence : ; Multiplying the number of 1s by 3 yields 12 the result of step 1. The bit following the 0 identified in step 1 is a 1, whose decimal equivalent is not less than c , i. So add the decimal equivalent of the 2 bits following the 0 identified in step 1 and subtract 1.

Repeat the process for the next code word, which begins with bits It is computed by the procedure outlined in Section 8. Count the number of 1s in a left-to-right scan of a concatenated G ekx p n bit sequence before reaching the first 0, and let i be the number of 1s counted.

Any value in the interval [0. For example, the value 0. Start by dividing the [0, 1 interval according to the symbol probabilities. This is shown in Table P8. The decoder immediately knows the message 0. To further see this, divide the interval [0. The coding proceeds as shown in Table P8. The encoded output is 97 Address Dict. For the encoded output in Example 8. The output is then read from the third column of the table to yield 39 39 39 39 39 39 39 39 where it is assumed that the decoder knows or is given the size of the image that was received.

Note that the dictionary is generated as the decoding is carried out. Entry 39 39 39 39 39 39 Problem 8. In a similar manner, the second two bytes call for a run of 6s with length 5.

The first four bytes of the BMP encoded sequence are encoded mode. Because the 5th byte is 0 and the 6th byte is 3, absolute mode is entered and the next three values are taken as uncompressed data. Because the total number of bytes in absolute mode must be aligned on a bit word boundary, the 0 in the 10th byte of the encoded sequence is padding and should be ignored.

The final two bytes specify an encoded mode run of 47s with length 2. The decoded binary value is thus The coding mode sequence is pass, vertical 1 left , vertical directly below , horizontal distances 3 and 4 , and pass.

It provides a means of predicting uncovered background when an object is moving. It provides a means of predicting pixels on the edges of frames when the camera is panning. Backward and forward prediction can average the noise in two reference frames to yield a more accurate prediction.

Equation 8. Substituting these values into the integrals defined by Eq. The first of these relations does not make sense since both t 1 and t 2 must be pos- itive. The second relationship is a valid one. For example, JPEG com- pression could be used. Because the T1 transfer rate is 1.

The initial approximation of the X-ray must contain no more than this number of bits. At the X-ray en- coder, the X-ray can be JPEG compressed using a normalization array that yields about a compression.

The resulting binary image will contain a 1 in every bit position at which the approximation differs from the original. To achieve an average error- free bit-plane compression of 1. A conceptual block diagram for both the encoder and decoder are given in Fig.

Substituting these values into Eq. Likewise, using Eqs. This is obviously more computationally demanding than the equivalent spatial domain approach [Eq. Compute the DFT of the image to be watermarked. Choose P2 coefficients from each of the four quadrants of the DFT in the middle frequency range.

This is easily accomplished by choosing coeffi- cients in the order shown in Fig. Note that this pro- cess maintains the symmetry of the transform of a real-valued image. Compute the inverse DFT with the watermarked coefficients replacing the unmarked coefficients.

Locate the DFT coefficients containing the watermark by following the in- sertion process in the embedding algorithm. A simple example that has been reported in the literature uses the following watermark insertion technique: 1. Compute the average of the selected approximation coefficients c.

Compute the watermarked image by taking the inverse DWT with the marked approximation coefficients replacing the original unmarked coefficients. Watermark detection is accomplished as follows: 1. Chapter 9 Problem Solutions Problem 9. Because in a rectangular grid there are no pixel values defined at the new locations, a rule must be specified for their creation. A simple approach is to double the image resolution in both dimensions by interpolation see Sec- tion 2. Then, the appropriate 6-connected points are picked out of the ex- panded array.

The resolution of the new image will be the same as the original but the former will be slightly blurred due to interpolation. Figure P9. The black points are the original pixels and the white points are the new points created by interpolation. The squares are the image points picked for the hexagonal grid arrangement. Ambiguities arise when there is more than one path that can be followed from one 6-connected pixel to another.

Problem 9. In one-pixel-thick, fully connected boundaries, these multiple paths manifest themselves in the four ba- sic patterns shown in Fig. The solution to the problem is to use the hit- or-miss transform to detect the patterns and then to change the center pixel to 0, thus eliminating the multiple paths. Application of the hit-or-miss transform using a given B i finds all instances of occurrence of the pattern described by that struc- turing element.

For example, consider the sequence of points in Fig. If B 1 is applied first, point a will be deleted and point b will remain after application of all other structuring elements. If, on the other hand, B 3 is applied first, point b will be deleted and point a will remain. Thus, we would end up with different but ac- ceptable m -paths. Keep in mind that erosion is the set formed from the locations of the origin of the structuring element, such that the structuring element is contained within the set being eroded.

The intersection of two convex sets is convex also. Keep in mind that the digital sets in question are the larger black dots. The lines are shown for convenience in visualizing what the continu- ous sets would be, they are not part of the sets being considered here.

The result of dilation in this case is not convex because the center point is not in the set. Here, we see that the lower right point is not connected to the others. The two inner points are not in the set.

The center of each structuring element is shown as a black dot. This result was then dilated with the circular structuring element. The dilated image was eroded with a disk whose diameter was equal to one-half the diameter of the disk used for dilation. But, as shown in Problem 9. The proof of the other duality property follows a similar approach. If the origin of B is contained in B , then the set of points describing the erosion is simply all the possible locations of the origin of B such that B z is contained in A.

Then it follows from this interpretation and the definition of erosion that erosion of A by B is a subset of A. Let C denote the erosion of A by B. It was already established that C is a subset of A.

From the preceding discussion, we know also that C is a subset of the dilation of C by B. The next to last step in the preceding sequence follows from the fact that the closing of a set by another contains the original set [this is from Problem 9.

From Problem 9. A disk structuring element of radius 11 was used. This structuring element was just large enough to encom- pass each noise element, as given in the problem statement.

The images shown in Fig. We do not consider this an important issue because it is scale-dependent, and nothing is said in the problem statement about this.

The next dilation should eliminate the internal noise components completely and further increase the size of the rectangle. The final erosion bottom right should then decrease the size of the rectangle. The rounded corners in the final answer are an important point that should be rec- ognized by the student.

This also would have been true if the objects and structuring elements were rectangular. However, a complete reconstruction, for instance, by dilating a rectangle that was partially eroded by a circle, would not be possible. The location of the point would be the same as the origin of the structuring element. Assuming that the shapes are processed one at a time, a basic two-step approach for differentiating between the three shapes is as follows: Step 1.

Apply an end-point detector to the object. If no end points are found, the object is a Lake. Otherwise it is a Bay or a Line. Step 2. There are numerous ways to differentiate between a Bay and a Line. One of the simplest is to determine a line joining the two end points of the ob- ject. If the AND of the object and this line contains only two points, the fig- ure is a Bay. Otherwise it is a Line.

For example, square 2,2 in Fig. That value of 1 would carry all the way to the final result in Fig. To do this, we pick a black point on the boundary of the image and determine all black points con- nected to it using a connected component algorithm Section 9.

These con- nected components are labels with a value different from 1 or 0. We can fill all spheres with white by apply- ing the hole filling algorithm in Section 9. The alert student will realize that if the interior points are already known, they can all be turned simply into white points thus filling the spheres without having to do region filling as a separate procedure.

The simplest approach is to separate the spheres by preprocessing. This approach works in this case because the objects are spherical, which implies that they have small areas of contact. To handle the case of spheres touching the border of the image, we simply set all border point to black. We then proceed to find all background points To do this, we pick a point on the boundary of the image which we know is black due to prepro- cessing and find all black points connected to it using a connected component algorithm Section 9.

These connected components are labels with a value different from 1 or 0. The remaining black points are interior to the spheres.

We can fill all spheres with white by applying the hole filling algorithm in Section 9. Note that the erosion of white areas makes the black areas interior to the spheres grow, so the possibility exists that such an area near the border of a sphere could grow into the background.

This issue introduces further complications that the student may not have the tools to solve yet. We recommend making the assumption that the interior black ar- eas are small and near the center. Recognition of the potential problem by the student should be sufficient in the context of this problem. Choose an arbitrary point labeled 1 in A, call it p 1 , and apply the connected component algorithm.

When the algorithm converges, a connected component has been detected. Label and copy into B the set of all points in A belonging to the connected components just found, set those points to 0 in A and call the modified image A 1.

Choose an arbitrary point labeled 1 in A 1 , call it p 2 , and repeat the procedure just given. Image B will contain K labeled connected components. The only difference between this expression and the original image f is that the holes have been filled. Therefore, the intersection of f c and H is an image con- taining only the filled holes. The complement of that result is an image con- taining only the holes.

Keep in mind that the holes in the original image are black. The dilation of F by B will also be all 0s, and the intersection of this result with f c will be all 0s also. Then H , which is the complement, will be all 1s. That is, the entire image should be filled with 1s. This algorithm is not capable of detecting holes within holes, so the result is as expected. If B is a single point, this definition will be satisfied only by the points comprising A, so erosion of A by B is simply A. Because B is a single point, the only set of points that satisfy this definition is the set of points comprising A, so the dilation of A by B is A.

The next step, E G F , would involve the geodesic erosion of the above result. But that result is simply a set, so we could obtain it in terms of dilation. That is, we would complement the result just men- tioned, complement G , compute the geodesic dilation of size 1 of the two, and complement the result. The other duality property is proved in a similar manner.

The other duality property can be proved in a similar manner. The second step follows from the definition of the complement of a gray-scale function; that is, the minimum of a set of numbers is equal to the negative of the maximum of the negative of those numbers. The third step follows from the definition of the complement.

The last gray-scale dilation in Eq. The other property in the problem statement is proved in a similar manner. The second step follows from the definition of geodesic dilation. The third step follows from the fact that the point-wise minimum of two sets of numbers is the negative of the point-wise maximum of the two numbers. The fourth and fifth steps follow from the definition of the complement. The last step follows from the definition of geodesic erosion. But that result is simply a set, so we could obtain it in terms of erosion.

That is, we would complement the result just mentioned, complement g , compute the geodesic erosion of the two, and complement the result. The other property is proved in a similar way.

The other property is proved in a similar manner. Because the blobs do not touch, there is no difference between the fundamental arrangement in Fig. The steps to the solution will be the same. The one thing to watch is that the SE used to remove the small blobs do not remove or severely attenuate large blobs and thus open a potential path to the boundary of the image larger than the diameter of the large blobs.

In this case, disks of radius 30 and 60 the same those used in Fig. The solution images are shown in Fig. The explanation is the same as Fig.

The amplitude is irrelevant in this case; only the shape of the noise spikes is of interest. To remove these spikes we perform an opening with a cylindrical structuring element of radius greater than R max , as shown in Fig. Note that the shape of the structuring element is matched to the known shape of the noise spikes. A structur- ing element like the one used in a but with radius slightly larger than 4R max will do the job.

Note in a and b that other parts of the image would be affected by this approach. The bigger R max , the bigger the structuring element that would be needed and, consequently, the greater the effect on the image as a whole. Call the resulting set of border pixels B. All connected components that contain elements from B are particles that have merged with the border of the image.

Determine the area number of pixels of a single particle; denote the area by A. Eliminate from the image the particles that were merged with the border of the image. Apply the connected component algorithm. Count the number of pixels in each com- ponent. It is stated also that we can ig- nore errors due to digitizing and positioning.

This means that the imaging sys- tem has enough resolution so that objectionable artifacts will not be introduced as a result of digitization. The mechanical accuracy similarly tells us that no ap- preciable errors will be introduced as a result of positioning. This is important if we want to do matching without having to register the images. The first step in the solution is the specification of an illumination approach.

Because we are interested in boundary defects, the method of choice is a back- lighting system that will produce a binary image. We are assured from the prob- lem statement that the illumination system has enough resolution so that we can ignore defects due to digitizing. The next step is to specify a comparison scheme. The simplest way to match binary images is to AND one image with the complement of the other.

Here, we match the input binary image with the complement of the golden image this is more efficient than computing the complement of each input image and com- paring it to the golden image. If the images are identical and perfectly regis- tered the result of the AND operation will be all 0s. Otherwise, there will be 1s in the areas where the two images do not match.

Note that this requires that the images be of the same size and be registered, thus the assumption of the mechanical accuracy given in the problem statement. As noted, differences in the images will appear as regions of 1s in the AND image. These we group into regions connected components by using the al- gorithm given in Section 9. The simplest criterion is to set a limit on the number and size number of pixels of connected components.

The most stringent crite- rion is 0 connected components. This means a perfect match. More sophisticated criteria might involve measures like the shape of connected com- ponents and the relative locations with respect to each other.

These types of descriptors are studied in Chapter Chapter 10 Problem Solutions Problem The increment in the spatial variable x is defined in Section 2. Problem Each mask would yield a value of 0 when centered on a pixel of an unbroken 3-pixel segment ori- ented in the direction favored by that mask. Once all end points have been found, the D 8 distance between all pairs of such end points gives the lengths of the various gaps. This is a rudimentary solution, and numerous embellishments can be added to build intelligence into the process.

For example, it is possible for end points of different, but closely adjacent, lines to be less than K pixels apart, and heuristic tests that attempt to sort out things like this are quite useful.

Although the problem statement does not call for any such tests, they normally are needed in practice and it is worthwhile to bring this up in class if this problem is assigned as homework. Similarly, the second row shows the correspond- ing gradient images and horizontal profiles through their centers. The thin dark borders in the images are included for clarity in defining the borders of the im- ages; they are not part of the image data.

All images were scaled for display, so only the shapes are of interest. In partic- ular, the profile of the angle image of the roof edge has zero, negative, and pos- itive values. The gray in the scaled angle image denotes zero, and the the light and dark areas correspond to positive and equally negative values, respectively.

The black in all other images denotes 0 and the pure white is the maximum value because these are 8-bit images. Grays are values in between. Therefore, it follows in this case that,? The objective is to show that the responses of the Sobel masks are indistinguishable for these four edges.

That this is the case is evident from Table P The sign difference is not significant because the gradient is computed by either squaring or taking the absolute value of the mask responses. The same line of reasoning applies to the Prewitt masks. Table P The idea with the one-dimensional mask is the same: We replace the value of a pixel by the response of the mask when it is centered on that pixel.

Next we apply the smoothing mask [1 2 1] to these results. The process to show equivalence for g y is basically the same.

Note, however, that the directions of the one-dimensional masks would be reversed in the sense that the differencing mask would be a column mask and the smoothing mask would be a row mask. The numbers in brackets are values of [g x , g y ]. Figure P The histogram follows directly from this table. From Chapter 4, we know that the average value of a function in the frequency domain is proportional to the value of its transform at the origin of the frequency domain.

From Problem 3. The result is digital, so if its average is zero, this means that all the elements sum to zero. Thus, con- volving this result with any image also gives a result whose average value is zero. The important thing about this image is that it consists of connected components. In other words, all zero-crossing points are adjacent to the boundaris of the con- nected components just described.

But, boundaries of connected components form a closed path a path exists between any two points of a connected compo- nent, and the points forming the boundary of a connected components are part of the connected component, so the boundary of a connected a component is a closed path.

Compare these closed paths and the binary regions in Fig. Torre and T. Pattern Analysis and Machine Intell. Looking up this paper and becoming familiar with the mathematical underpinnings of edge detection is an excellent reading assignment for graduate students.

Another way of explaining the difference is that working with r is basically working with a radial slice of a 2-D function, which is the same as working with a 1-D Gaussian. The 2-D nature of the problem is thus lost.

As it turns out, the difference of only 2 in the numerator multiplying sigma makes a significant difference in the filtered result. Using the definitions in Section De- composing a 2-D convolution into 1-D passes requires 2nM N multiplications, as indicated in the solution to Problem The 1-D convolution for step 1 requires 2nM N multiplications see the solution to Problem, This will require 2M N multiplications.

He also founded Perceptics Corporation in and was its president until The last three years of this period were spent under a full-time employment contract with Westinghouse Corporation, who acquired the company in Under his direction, Perceptics became highly successful in image processing, computer vision, and laser disk storage technology.

Navy at six different manufacturing sites throughout the country to inspect the rocket motors of missiles in the Trident II Submarine Program; the market leading family of imaging boards for advanced Macintosh computers; and a line of trillion-byte laserdisc products.

He is a frequent consultant to industry and government in the areas of pattern recognition, image processing, and machine learning. Brooks Distinguished Professor Award. Dougherty Award for Excellence in Engineering in Gonzalez is author or co-author of over technical articles, two edited books, and four textbooks in the fields of pattern recognition, image processing and robotics.

His books are used in over universities and research institutions throughout the world. He ii is the co-holder of two U. Software Images icon An illustration of two photographs. Images Donate icon An illustration of a heart shape Donate Ellipses icon An illustration of text ellipses. Digital image processing Item Preview. EMBED for wordpress. Want more? Advanced embedding details, examples, and help!

The leading textbook in its field for more than twenty years, it continues its cutting-edge focus on contemporary developments in all mainstream areas of image processing-e.



0コメント

  • 1000 / 1000