Question: Array A ( below left ) is 3 0 by 3 0 and contains only numerical values 0 and 1 . Value 0 corresponds to

Array A (below left) is 30 by 30 and contains only numerical values 0 and 1. Value 0 corresponds to white and value 1 corresponds to black. Pattern P (below right) has 2 rows, 2 columns, and 4 pixels in total. When matching for Pattern P, both the black and the white pixels should be matched. The code of the pattern matcher for Pattern P uses the top left corner of the pattern as the target pixel or origin of the pattern. The row below is row +1 and the column to the right is col +1. The pattern matcher code is to be completed (below right).
A =[000000000000000000000000000000 ;
000011000000000000000100100000 ;
000100100000000000000100100000 ;
001000000000000000000100100000 ;
001001100000010001000011000000 ;
000100100000011011000000000000 ;
000011000000010101000000000000 ;
000000000000010101000000000000 ;
000000000000000000000000000000 ;
000000000000000000000000000000 ;
000000000000000000000000000000 ;
001100000000000000000000000000 ;
010010000000001110000000011000 ;
010000000000001001000000100000 ;
010010000000001001000000011000 ;
001100000000001110000000000100 ;
000000000000000000000000111000 ;
000000000000000000000000000000 ;
000000000000000000000000000000 ;
000000000000000000000000000000 ;
000000000000000000000000000000 ;
000000000000110000000000000000 ;
000000000001001000000001110000 ;
000000100000001000000010001000 ;
000001100000110000000010001000 ;
000000100000001000000010001000 ;
0000001000010010

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!