hello friends........


i need a program which counts the total number of galaxy stars of an image.........i think if the RGB value is less than 50.....then is wont be a star otherwise it will be detected as a star......all the clusters of the stars joined together should be considered as a single star.

its my assignment n i need to submitt it very soon...............

can any 1 help me.........

The basic algorithm I would use to start with goes something like this. As the code gets more mature I would look to refine and optimize it.

Loop through each pixel in the image:
    if the pixel's calculated luminance is more than a set constant:
         record pixel's location
         if none of the eight neighboring pixels are recorded:
             increment the star count

Note that I haven't looked at this algorithm for design flaws or potential problems, but its simplicity makes it good as a starting point.

This article has been dead for over six months. Start a new discussion instead.