Ask Your Question

How can detect leds

asked 2014-05-20 03:53:35 -0500

robyf1 gravatar image

Hi sorry for my english, 1) I need to detect from an image how many leds are on and how many are off. 2) how can know, for each leds on, its Luminance, Lux, Cri so so

can someone help me! thanks in advance!


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-21 00:49:23 -0500

Hi @robyf1!

The easiest way to detect & segment the LED's is by using Color Based method. You can achieve this by the following steps

  1. Load BGR Image from File
  2. Convert that into HSV format by using cvtcolor()
  3. Create an Gray image Mask Mat
  4. Find the HSV Range of LED in ON State & in OFF State [Note]Opencv uses Hue Range from 0-180.
  5. Find the LED ON State Color Mask of the image by using the function cvInRange()
  6. Find Contours & count the number of contours present in the Mask image. Filter the contours with respect to area if needed. You can refer this link for reference.
edit flag offensive delete link more

Question Tools


Asked: 2014-05-20 03:53:35 -0500

Seen: 3,243 times

Last updated: May 21 '14