Given an image and two points $A$ and $B$ on that image, how could we find a path from $A$ to $B$?
Let's say I have a white image, a green blob in the middle, and points $A$ and $B$ at either side of the blob, I need to get from $A$ to $B$. I don't have points to traverse. I just have this image.

If your image is as &quot;simple&quot; as you describe here, with very easily distinguishable colours, the easiest solution would likely be to construct a graph as expected by algorithms such as A* as follows:

Every pixel becomes a node in the graph, with connections to all adjacent pixels
Green pixels (the green blob in the middle) are marked as non-traversable (or simply don't have connections to adjacent pixels) (I assume this thing is your obstacle).
Pixels belonging to the points on either side of the obstacle are marked as starting and goal vertices.

Then, you have the graph that a traditional pathfinding algorithm like A* would expect, and can simply run the algorithm there.

If you get less &quot;clear&quot; images (i.e. not brightly coloured, easily distinguishable things, but more like real-life top-down images of an area), then the above won't really work anymore. In such cases, you'd likely want to look into Reinforcement Learning approaches, where you give an agent a reward when it successfully manages to find a connection between start and goal. In particular, you'd need Deep Reinforcement Learning approaches, because otherwise you're not going to be able to handle complex images.
Note that these approaches are not going to be simple to implement or immediately understand for 100% if you're a beginner. There won't be any &quot;beginner-friendly&quot; approaches for the problem you describe, it simply is quite a complex problem (requiring a mix of &quot;decision-making&quot; and &quot;understanding&quot; images).