Good thinking
May be a add-on for my mowrobot later.
I've been thinking about this (border/non-grass detection) for a while, ever since acquiring a Friendly Robotics RL-500 mower for $50.00 USD off a local guy on craigslist; I swear that one day I am going to get it running again...
My thing is that I am a very lazy person - and I don't want to dig and bury a powered "border fence" - so I have been contemplating a ton of alternatives.
One involves magnets and hall-effect sensors. Basically I would mold small rare-earth magnets into plastic golf-ball tees, and spike them along the edges and other no-go areas. Mount hall-effect sensors on the mower platform, and let it detect them. Passive, cheap, easy to replace.
Another option was to detect the presence of grass in some manner. I've thought about the idea of a humidity sensor, maybe coupled with a color sensor (or something) - to detect mowed vs. unmowed (vs non-grass) areas. Such could also improve a "random-walk" algorithm to be a bit more efficient.
A third option (by far the most ambitious) was to add some kind of custom LIDAR unit (for SLAM - so the robot knows where it is and where its been), plus a form of machine-learning via OpenCV to detect vegetation vs non-vegetation. I've seen some papers on how this is done (vegetation detection, that is) - replicating it would be very difficult, but in theory possible at a hobbyist level. Provided I spent the time. Again, laziness. Lol.
Likely, a combination of all of the above methods would be needed to make it work somewhat well. It likely would still need to be baby-sat as it worked (better than doing the work yourself, but still not fun here in Phoenix in the summer!). And, it still wouldn't trim the bushes or trees for you.
I currently pay a maintenance outfit to do my front and back yard every couple of weeks for $60.00; honestly, it's a bargain.