Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Not working for gauge-2.jpg #6

Open
BhimasenPurohit opened this issue Oct 14, 2019 · 5 comments
Open

Not working for gauge-2.jpg #6

BhimasenPurohit opened this issue Oct 14, 2019 · 5 comments

Comments

@BhimasenPurohit
Copy link

Hi,
I executed code on gauge-1.jpg, and got results successfully. But If I run the same code for gauge-2.jpg which is in "images" folder, I am getting this error.

File "analog_gauge_reader.py", line 199, in get_current_value
   x1 = final_line_list[0][0]
IndexError: list index out of range

What I am missing ??

@simoooB
Copy link

simoooB commented Nov 4, 2019

Hi,
I executed code on gauge-1.jpg, and got results successfully. But If I run the same code for gauge-2.jpg which is in "images" folder, I am getting this error.

File "analog_gauge_reader.py", line 199, in get_current_value
   x1 = final_line_list[0][0]
IndexError: list index out of range

What I am missing ??
Hi,
There is some parameters to change to be able to catch/detect lines and compute and print the result. In some cases and under certain conditions, the algo cant find any lines that match the prerequisite that means there is no line founded in final_line_list and the algo detect an IndexError cause there is no element in the list. You can change parameters (UpperTreshold and LowerThreshold to try to have some lines detected and hoping to be the best one that you re looking for)

@alexmyczko
Copy link

would it work for non-linear displays? http://bootes.ethz.ch/gauge.jpg

@mainadwitiya
Copy link

Hi,
I executed code on gauge-1.jpg, and got results successfully. But If I run the same code for gauge-2.jpg which is in "images" folder, I am getting this error.

File "analog_gauge_reader.py", line 199, in get_current_value
   x1 = final_line_list[0][0]
IndexError: list index out of range

What I am missing ??
Hi,
There is some parameters to change to be able to catch/detect lines and compute and print the result. In some cases and under certain conditions, the algo cant find any lines that match the prerequisite that means there is no line founded in final_line_list and the algo detect an IndexError cause there is no element in the list. You can change parameters (UpperTreshold and LowerThreshold to try to have some lines detected and hoping to be the best one that you re looking for)

The lines are not coming under the acceptable range, that's why your final lsit is empty and hence list index out of range, will do a PR soon or upload the modified code on github soon.
@mainadwitiya

@adirsingh96
Copy link

Hi,
I executed code on gauge-1.jpg, and got results successfully. But If I run the same code for gauge-2.jpg which is in "images" folder, I am getting this error.

File "analog_gauge_reader.py", line 199, in get_current_value
   x1 = final_line_list[0][0]
IndexError: list index out of range

What I am missing ??
Hi,
There is some parameters to change to be able to catch/detect lines and compute and print the result. In some cases and under certain conditions, the algo cant find any lines that match the prerequisite that means there is no line founded in final_line_list and the algo detect an IndexError cause there is no element in the list. You can change parameters (UpperTreshold and LowerThreshold to try to have some lines detected and hoping to be the best one that you re looking for)

The lines are not coming under the acceptable range, that's why your final lsit is empty and hence list index out of range, will do a PR soon or upload the modified code on github soon.
@mainadwitiya

Hey , is there any update on this?

@adirsingh96
Copy link

Solved the issue by increasing the threshold

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

No branches or pull requests

5 participants