seven-segment-ocr icon indicating copy to clipboard operation
seven-segment-ocr copied to clipboard

TypeError: 'float' object cannot be interpreted as an integer

Open HripsimeS opened this issue 1 year ago • 0 comments

@alessandro-gentilini @suyashkumar I tried to test on your video by running the following line on Command Prompt

python seven_segment_ocr.py --video C:/Users/files/sample_files/test.mov --output C:/Users/files/out.csv --period 1

Unfortunately I received the following error when drag rectangular selections around the digits in the video and then pressed "d"

[(366, 231), (448, 349), (470, 231), (556, 353), (464, 363), (561, 485)] Traceback (most recent call last): File "C:\Users\files\seven_segment_ocr.py", line 58, in digitsReadArray = read_video_digits(args.video, args.period) File "C:\Users\files\seven_segment_ocr.py", line 20, in read_video_digits selections=image_selection.getSelectionsFromImage(image) File "C:\Users\files\image_selection.py", line 56, in getSelectionsFromImage for selection in range(0, len(refPts)/2): TypeError: 'float' object cannot be interpreted as an integer

Do you have some ideas how to fix this issue in the code? Thanks in advance!

HripsimeS avatar Apr 09 '23 15:04 HripsimeS