Open BhimasenPurohit opened 5 years ago
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)
would it work for non-linear displays? http://bootes.ethz.ch/gauge.jpg
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
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?
Solved the issue by increasing the threshold
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.
What I am missing ??