Page 349 - AI Ver 3.0 class 10_Flipbook
P. 349

In the process of doing it, along the edges of the input image, the top left corner has only three neighbours so the
                 output image becomes smaller. If we want the output image to be of exact size of the input image then during the
                 process of overlapping the centers of the input image and the kernel, extend the edge values out by one in the
                 input image. The pixel value is 0 when edges are extended.
                 For example, if 3X3 kernel is used to calculate each pixel, the Kernel filter is multiplied with the current overlapping
                 pixel value and the other 8 surrounding pixels. Then the result of the multiplication is added up to generate the
                 value of the current pixel.


                                                                                   34
                             12  11  81  57  86  87  45  68
                             23  22  90  56  35  54  12  22
                             45  37  91  54  85  25  23  79      1   0   –1

                             40  78  69  58  34  74  90  97  ×   0   1   0    =
                             12  89  68  90  78  24  68  42      –1  0   1
                             34  92  61  43  66  96  23  24
                             18  56  41  24  56  45  44  66
                             19  67  61  77  23  99  77  23

                                   Image Matrix                  Kernel Matrix       Convoluted Matrix/Desired image
                                        A                            B                           C

                               Task                                                       21 st  Century   #Critical Thinking
                                                                                              Skills


                   Use the given input image matrix and kernel matrix of 3×3 to generate the desired image output matrix:
                                             150  0  255 240 190  25  89  255
                                             100  79  25  0  200 255  67  100
                                             155 145  13  20  0  12  45  0         –1  0  –1
                                             100 175  0  25  25  15  0   0    ×    0   –1  0

                                             120 156 255  0  78  56  23  0         –1  0  –1
                                             115 113  25  90  0  80  56  155
                                             135 190 115 116 178  0  145 165
                                             123 255 255  0  255 255 255  0

                   Fill in the blanks in the output matrix by using the above two-image and kernel matrix.





















                                                                                    Computer Vision (Practical)  347
   344   345   346   347   348   349   350   351   352   353   354