Of course. But I didn't say a photo. (it could be video, it could be lidar, etc) And yeah maybe you need the robot to pick up each rock and look at it from different angles.
My source is that I once leafed through a Japanese in a book store book for rural diy homesteader types that had detailed instructions on how to make a retaining wall for terraced rice fields not dissimilar to the one you pictured, and my impression is that there is a lot of engineering behind the surface, and also the arrangement of the sizes of the stones to make it stable and movement resistant (like to settle back into place after a quake), that make this more than just fitting the shapes together like a jigsaw.. I wish i had actually bought that book now.
Yes it is a challenging problem to do it well. But cool to think about!