I would like to visualize the partitioning of a number of MSER regions by plotting them in different colors, but the MSERRegions.plot()
method from the Computer Vision toolbox doesn't accept a 'Color'
argument. Nor does using hold all
cause subsequent plots to cycle through colors. (All of the region ellipses are drawn in bright green, always.)
Here is an example plot to clarify what I'm trying to do:
I have partitioned the regions below into three separate groups, and I want to plot each group in a different color. Is there a simple way to do this?
A simple but "hackish" way to do this is to get the
Children
objects of anAxes
and then you set the colors on those objects.First you'll need to ensure that the children objects do in fact have a color property, if they are drawn with line then they will. You can figure out the type of children object by calling
handle(child)
.Finally If you want to set a specific color for each group simply set the color after you plot the first group. Get the second group see which handles are new and set the color on only the new handles. Do this again for the third group.