Challenge: counting stars in image with RGB color | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 12

Challenge: counting stars in image with RGB color

could you write a code that do so? or at least guide through a function? // stars are white like (255,255,255) OR near to white color (255,253,254). // recognizing every tiny star not needed.

11th Feb 2018, 7:43 AM
Alfred
3 Answers
+ 5
Try using opencv, convert rgb image to grayscale, set threshold such that any near white blob becomes white and rest will tend to darker shade and then simply detect the white blob. I could provide only basic logic here, Google on how to do these thing in opencv.
26th Feb 2018, 12:01 PM
Rugved Modak
Rugved Modak - avatar
+ 12
thank you @Rugved Modak yup it's working & I'm learning ... I post back here if it was any other question.
1st Mar 2018, 12:47 PM
Alfred
+ 4
I'm glad it worked 👍
1st Mar 2018, 3:51 AM
Rugved Modak
Rugved Modak - avatar