How do i downsample an 8 bit bitmap array of size 20×30 to 10×15
original_bitmap_array[20][30] to downsample_array[10][15]
this is the original array which is 1 and 0 representation of character ‘A’
00000000111100000000
00000001111100000000
00000001111100000000
00000001111110000000
00000011100110000000
00000011000110000000
00000011000111000000
00000011000011000000
00000111000011000000
00000110000011000000
00000110000011000000
00000110000011000000
00001110000001100000
00001110000001100000
00001100000001100000
00001100000000110000
00001100000000110000
00011111111111110000
00011111111111111000
00011111111111111000
00011111111111111000
00111111111111111000
00110000000000011000
00110000000000011100
01110000000000011100
01110000000000001100
01110000000000001110
01100000000000001110
11100000000000000110
11100000000000000111
Now can somebody tell how to downsample into 10×15 array, without losing the char ‘A’?
It all depends on how you want to sample the image.
One easy sampling for your example is to take every second pixel from the 20×30 and put in 10×15.
You probably want to expand this and sample at the cross-section of 2×2 pixels and use bi-linear interpolation.
Because i don’t exactly now how you want to sample the image it is hard for me to give you more information on this.
Update: