At the white regions of this image I want to add a few random arrows. I would like to realize two different of adding the random arrows:
- The arrows may not leave the white region
- The arrows have to leave the white region
img = Import["ExampleData/spikey2.png"]
How can you do this with Mathematica?
In particular I would like to know how to detect the white regions, and how to store this information. If I give you an arrow can you tell me whether it crosses non-white parts of the image?
There is not much space for the arrows in this picture. It would be good to add a bit of white canvas to create some space for the arrows.