Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Maybe you can manually set the region on the corner& border in the resulting image to black.

e.g.

image[0:r, 0:w] = 0

Do it 4x for upper ,lower, right, and left borders. That way you kind of eliminate things at the border, and focus on the middle.

Maybe you can manually set the region on the corner& border in the resulting image to black.

e.g.

image[0:r, 0:w] = 0

Do it 4x 4 times: for upper ,lower, right, and left borders. That way way, you kind of eliminate things at the border, and focus on the middle.

Maybe you can manually set the region on the corner& border in the resulting image to black.

e.g.

image[0:r, 0:w] = 0

Do it 4 times: for upper ,lower, right, and left borders. That way, you kind of eliminate things at the border, and focus on the middle.

The setting region depends on the size of your picture. e.g. your picture has 300 rows and 500 columns.

Now , you want to eliminate the upper border. e.g.

image[0:20,0:500]=0

It will set all pixels from (row 0 to row 20, and col 0 to col 500 into black) -> which is the upper border to black, hence "eliminates" the upper border.

Note that the 20 is again depend on your picture's size, till where you want to eliminate.

BEFORE AFTER

Do this for the left, right, bottom border too! And at the end , you will have eliminate all the white colors except the number itself.

Maybe you can manually set the region on the corner& border in the resulting image to black.

e.g.

image[0:r, 0:w] = 0

Do it 4 times: for upper ,lower, right, and left borders. That way, you kind of eliminate things at the border, and focus on the middle.

The setting region depends on the size of your picture. e.g. your picture has 300 rows and 500 columns.

Now , you want to eliminate the upper border. e.g.

image[0:20,0:500]=0

It will set all pixels from (row 0 to row 20, and col 0 to col 500 into black) -> which is the upper border to black, hence "eliminates" the upper border.

Note that the 20 is again depend on your picture's size, till where you want to eliminate.eliminate. Be careful on this number, so that you do not eliminate the number too.

BEFORE AFTER

Do this for the left, right, bottom border too! And at the end , you will have eliminate all the white colors except the number itself.

Maybe you can manually set the region on the corner& border in the resulting image to black.

e.g.

image[0:r, 0:w] = 0

Do it 4 times: for upper ,lower, right, and left borders. That way, you kind of eliminate things at the border, and focus on the middle.

EDIT :

Set the region to black = Turn the pixels to black..... using image[0:r, 0:w] = 0

The setting region depends on the size of your picture. e.g. your picture has 300 rows and 500 columns.

Now , you want to eliminate the upper border. e.g.

image[0:20,0:500]=0

It will set all pixels from (row 0 to row 20, and col 0 to col 500 into black) -> which is the upper border to black, hence "eliminates" the upper border.

Note that the 20 is again depend on your picture's size, till where you want to eliminate. Be careful on this number, so that you do not eliminate the number too.

BEFORE AFTER

Do this for the left, right, bottom border too! And at the end , you will have eliminate all the white colors except the number itself.