Ask Your Question

Revision history [back]

Hi @Rob! Since your Background color is Different.

  1. Convert the Image into HSV Color Space.
  2. Filter the Background Image Color by using InRange()
  3. Apply Eroding & Dilate to the Binary Image.
  4. Find Contours & Filter them by Area and find the Bounding Box Center.
  5. Now You Know the Co-Ordinates of LED in Image ,the width and Height of each LED.
  6. Set ROI to this Region to decide whether it is ON or OFF by using HSV Values.

Share your work so that we can find were you struck.