Find Bounding Box For B/W Image
Posted: 2010-04-26T08:58:48-07:00
I would like to find the bounding box for a B/W image. Example:

What I want is the most left. right, top and bottom black pixel location. I plan to crop the image to that size or 1 or 2 pixels larger.
I am doing an image compare and I want to make it as fast as possible. I read the docs and examples and did not see anything obvious.
The site I used converted it to jpg. It is actually a bmp file.

What I want is the most left. right, top and bottom black pixel location. I plan to crop the image to that size or 1 or 2 pixels larger.
I am doing an image compare and I want to make it as fast as possible. I read the docs and examples and did not see anything obvious.
The site I used converted it to jpg. It is actually a bmp file.