Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thank you for sharing! #2

Open
esutton opened this issue Mar 1, 2021 · 3 comments
Open

Thank you for sharing! #2

esutton opened this issue Mar 1, 2021 · 3 comments

Comments

@esutton
Copy link

esutton commented Mar 1, 2021

I am amazed that a little over 100 lines of python can do this.

I am trying to figure out a couple of issues:

  • The left-most dial 0 read as zero, expected 4
  • Next dial, dial 1 seems like it should read 4 rather than 3 since dial to right is past zero.
    • Dial 4 also seems to be hair past 4
    • Glass meter covering hazy?
    • Photo not perfectly horizontal? ( tilted slightly to right)

ToDo:

  1. Do need to add rules if very close to number, for example 3.9 and next right-dial is past 0, then round-up to 4.0 ?
  2. Do need to clean glass on outside and inside? The glass unscrews I think?

Analyze output images

2020-feb-01
hand-edge-0
intersection-0
hand-edge-1
intersection-1
hand-edge-2
intersection-2

@pastacolsugo
Copy link

Not the author nor an expert, but I've taken a look at the code and I don't think the haze on your glass is that relevant, the image gets blurred as one of the first steps in the processing.
I believe the inaccuracies you are experiencing are because the program is calibrated for his gauge, which has a simpler shape of the arm (needle?).
If you want to experiment I believe you could look at line 30 and play around with the threshold, minLineLength and maxLineGap.
If you can I suggest you to try out the values with a old images and see if it gets better.
Good luck!

@esutton
Copy link
Author

esutton commented Mar 8, 2021

@pastacolsugo thank you for the suggestion!

Is the purpose of blurred to remove noise from image? To remove small artifacts such as dirt or reflections?

The dial hand edge detection is hard to understand on the first left-most dial image.

Intersection is about 1 when expected 4.
intersection-0

Hand Edge shows a short vertical line at 1 when expected radial line at 4.
hand-edge-0

Blurred
blurred-0

Edges
edges-0

Dial
dial-0

I will look at line 30 and Hough Line Transform:

@pastacolsugo
Copy link

Yes usually you apply a blur to reduce noise. Maybe you can look into working with only one of the three RGB channels, you can try a binary filter or just increasing contrast.
If it's a simple operation you could try to clean out the haze, wouldn't hurt for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants