Ask Your Question

Filtering binarizing text base image for edge and contour detection on low contrast dark images

asked 2018-09-04 04:37:19 -0500

MikeLemon gravatar image

updated 2018-09-04 04:40:34 -0500


I'm trying to extract bounding boxes of these numbers in this display:


but when I try to run simple and otsu threshold I'm getting some very unclear and distorted results like this:

image description

no matter how much I adjust the simple thresh for the image

Any idea on how to still detect the edges of the digits on these kind of images with a relatively universal way to detect bounding boxes around the digits?

Thanks for helping!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-09-04 05:28:51 -0500

monxarat gravatar image

updated 2018-09-04 05:46:11 -0500

You should using Canny detect edges, this is simple.

You can normal it with HoughLines after detected edges.

Or can using the detect line, look like bellow.


image description

Or you want to recognize digits. you can referent bellow.

edit flag offensive delete link more


Ah yes that makes sense I tried that at first but using the wrong threshold values (100,200) sins I don't realy know how to adjust those and how those work,

Anyway I ran it again with some better lower values: (10, 30)

any idea on how to better use those for the better contour detection of this image and maybe if you knew how to kind of base a simple algorithm to try to auto adjust the canny values to be more universal?

Thanks for the help!

MikeLemon gravatar imageMikeLemon ( 2018-09-05 10:03:26 -0500 )edit

I think, before do Canny, you should adjust brightness and contrast value.

You can do this by way:

Changing the contrast and brightness of an image!

How to make auto-adjustments(brightness and contrast) for image Android Opencv Image Correction

monxarat gravatar imagemonxarat ( 2018-09-07 05:40:38 -0500 )edit

Question Tools

1 follower


Asked: 2018-09-04 04:37:19 -0500

Seen: 521 times

Last updated: Sep 04 '18