Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can't get Canny Edge Treshold right

I'm trying to extract digits from an analog electricity meter.

I have for example following picture: image description

I know that the lightning on this picture isn't equal everywhere, but it's really hard to get this equal due to reflection and etc.

When I'm performing Grayscale, Gaussian Blur & Canny Edge on this image, I can't get a decent result. The issue is that I either have to put the Canny Edge treshold too high which causes some digits unreadable or either have to put the Canny Edge treshold too low which causes too much details to be included in the image.

Example of too high treshold: image description

Code: Imgproc.Canny(image, imgCanny, 60, 60/3);

Example of too low treshold: image description

Code: Imgproc.Canny(image, imgCanny, 35, 50/3);

Is there any way to perform some kind of 'Adaptive Treshold Canny Edge' on this? Thanks!

Can't get Canny Edge Treshold right

I'm trying to extract digits from an analog electricity meter.

I have for example following picture: image description

I know that the lightning on this picture isn't equal everywhere, but it's really hard to get this equal due to reflection and etc.

When I'm performing Grayscale, Gaussian Blur & Canny Edge on this image, I can't get a decent result. The issue is that I either have to put the Canny Edge treshold too high which causes some digits unreadable or either have to put the Canny Edge treshold too low which causes too much details to be included in the image.

Example of too high treshold: image description

Code: Imgproc.Canny(image, imgCanny, 60, 60/3);

Example of too low treshold: image description

Code: Imgproc.Canny(image, imgCanny, 35, 50/3);35/3);

Is there any way to perform some kind of 'Adaptive Treshold Canny Edge' on this? Thanks!

Can't get Canny Edge Treshold right

I'm trying to extract digits from an analog electricity meter.

I have for example following picture: image description

I know that the lightning on this picture isn't equal everywhere, but it's really hard to get this equal due to reflection and etc.

When I'm performing Grayscale, Gaussian Blur & Canny Edge on this image, I can't get a decent result. The issue is that I either have to put the Canny Edge treshold too high which causes some digits unreadable or either have to put the Canny Edge treshold too low which causes too much details to be included in the image.

Example of too high treshold: image description

Code: Imgproc.Canny(image, imgCanny, 60, 60/3);

Example of too low treshold: image description

Code: Imgproc.Canny(image, imgCanny, 35, 35/3);

Is there any way to perform some kind of 'Adaptive Treshold Canny Edge' on this? Thanks!