Ask Your Question
0

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

Hello,

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

original_Image

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
0

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. https://docs.opencv.org/3.4.3/d6/d56/...

You can normal it with HoughLines after detected edges.

Or can using the detect line, look like bellow.

Result

image description

Or you want to recognize digits. you can referent bellow. https://www.pyimagesearch.com/2017/02...

edit flag offensive delete link more

Comments

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
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 116 times

Last updated: Sep 04 '18