LAB[au] #1 Depending the complexity of your raster image it could require more steps ... but the simpliest/crude method is using first Laplace filter (3x3 or more), followed by edge detection, I was using OpenCV lib to do that.