Im exploring possibility to apply a CA to a portion of a region in an image.
Think that I can process an image to identify a region, as an example, a green area. I would like to confine that area, and apply a cellular automaton to it.
I am trying to help myself with demonstration (E.g. https://demonstrations.wolfram.com/2DCellularAutomatonOnATriangulatedSurface/ )
but instead of a complex manipulation, I would like to understand how could you "confine" the boundary of a region to map the automaton - and stay only in it.
In CellularAutomaton[] Options BoxMatrix[] is mentioned, but there is not an example of how to use BoxMatrix with CellularAutomaton: not clear where to start.
Should "pixelate" a region with a box matrix first?
How would you apply a Rule to the green area in this Satellite image ?
Conceptually, I tried something like:
img =[(* img in attachment*)];
MorphologicalTransform[Binarize[img],184,2]
but I don't want to apply a rule to a 3x3 neighborhood (MorphologicalTransform) - I want to apply a rule to a subregion I can extract from the image.
I thought about:
(* img color distance from the green areas *) cd = ColorDistance[img, RGBColor[1/255 {79, 93, 56}]]
(* binarize the img *) RegionBinarize[img, Binarize[cd, 0.3], 0]
Now that I "isolated" the green areas, how could I apply a CA rule to it?
(Comments about better ways to handle color isolations are welcome, although focus is on applying CA to them).
thank you and have a nice.. Christmas Holidays!
[![enter image description here][1]][1] [1]: https://i.sstatic.net/Jb6um.png