Serialising Shapely objects to JSON

Lately I’ve been using Shapely to perform geometry operations, and I’ve come across the need to serialise a number of objects in a Python data structure to JSON. I’ve chosen to use a custom JSONEncoder and JSONDecoder class.

image_processing_edge

OpenCV – Mown grass detection

Over lunch today, a few friends and I were discussing the possibility of an autonomous grass mowing robot. We decided that the major problem was navigation – following the edge of the lawn that has been previously mown. I present a (relatively) simple method using Python and OpenCV to estimate the border between areas of cut and uncut grass. Continue reading