removing the white border around an image python opencv

Viewed 2100

I want to remove the white color border in the following image:

this is the image that I want to remove the border

I have set an upper and lower boundary and iterate through row by row and column by column to remove the white border but the result is not successful. There are still white areas in the image:

processed image

I have tried contours bounding box method as well but it doesn't work for some number plates and doesn't identify the border correctly.

Can you recommend me a way to remove the white color area in the original image?

1 Answers
Related