I have a binary mxn matrix called Image. I have a pxq mask which has a pivot pixel as well. I want to apply this mask to the image in such a way that at each instance I get a pxq sub-image of the Image. I want to first fix the pivot pixel of the mask to some (i,j) location in image and then take out the portion of the image. The only job of mask is to take out the chunk of image and ignore the rest of the image.
Image = [ 1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15; 16 17 18 19 20]
Mask = [1 2 3; 1 2 3]
Pivot element = Mask(2,2)
SubImage_1 = [1 2 3; 6 7 8] (pivot element is locked to Image(2,2))
SubImage_2 = [6 7;11 12;16 17] (pivot element is locked to Image(3,2) Mask is rotated by 90 and subimage_2 is stored)
Foe each (i,j) location in Image the orientation of mask of mask is known to us. How can I fix the pivot element to (i,j) location and do some binary operation to formulate SubImages.
No products are associated with this question.
Play games and win prizes!Learn more