Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7521

Automation, sensing and robotics • Re: Question about methods to detect multiple LED status

$
0
0
Sorry gordon77's example code gives me errors - I must have done it wrong, copied OP's LED jpg to panel.jpg:

Code:

/usr/lib/python3/dist-packages/numpy/lib/function_base.py:518: RuntimeWarning: Mean of empty slice.  avg = a.mean(axis, **keepdims_kw)/usr/lib/python3/dist-packages/numpy/core/_methods.py:192: RuntimeWarning: invalid value encountered in scalar divide  ret = ret.dtype.type(ret / rcount)Traceback (most recent call last):  File "/home/pi/my_project/g77-opencv.txt", line 182, in <module>    cv2.putText(img,str(int(average)), (points[box+1] + 130, points[box] + 10 ), cv2.FONT_HERSHEY_SIMPLEX, 0.4, (100, 100, 100),1)ValueError: cannot convert float NaN to integer
What if you use my panel.jpg, it's 640x480

I found the panel uses red, amber and green leds so working on an updated version...

Statistics: Posted by gordon77 — Mon Mar 17, 2025 4:51 pm



Viewing all articles
Browse latest Browse all 7521

Trending Articles