I have a Pleiades image and multiple rice field boundaries in a shape file. What I want to do is for every feature in the shape file, clip the Pleiades image and detect the lines of the field terraces. I have already managed to detect the lines using the difference of gaussian blurs, but they look quite messy. Is there a way to do this smarter with better results?
This is the part of my script that detects the lines:
from skimage import filters, exposure
# I average all bands to a single band
avgs = [ avg_bands(i) for i in clips]
result_rasters = []
# normalize images between 0 and 255
# using scikit-image library for gauss and median filter
for raster in avgs:
dif_gauss = normalize(filters.difference_of_gaussians(
raster,
low_sigma=0,
high_sigma=3),255)
med_dg = filters.median(dif_gauss)
# I look for values smaller than the mean of the image
med_dg = med_dg < med_dg.mean()
result_rasters.append(med_dg)