Just count the number of distinct colors in whatever way you like: put the color values into a hash table, then count the keys, etc.
A simple way is to call "renumber_labels" in iulib to renumber and count them for you; it returns the number of components. RegionExtractor will also count them for you and let you iterate through them. Tom On Mon, Oct 20, 2008 at 12:35, Leo <[EMAIL PROTECTED]> wrote: > > Hi All, > > Just wondering is it possible to tell how many component has been > segmented after I segment an image use either RAST or 1CP > segmentation. > > After I apply the segmentation if I apply simple_recolor() to the > intarray it will apply different color to the segmented components on > the image, therefore I was wondering how can we tell how many > component has been segmented after the segmentation? > > Regards, > Leo > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ocropus" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/ocropus?hl=en -~----------~----~----~----~------~----~------~--~---
