[Qgis-user] Set new pixel radiometric values ​based on neighborhood?

celati Laurent laurent.celati at gmail.com
Wed Dec 3 02:10:33 PST 2025


Dear all,

I work with Qgis (especially with processing tools allowing to use qgis,
orfeotoolbox, grass, saga tools). I'm performing segmentations on infrared
aerial images (3 bands : NIR, R, G).

One of the problems comes from shadow (especially from trees) which affects
the segmentation results. Based on an analysis of the spectral signatures
of the shadow pixels, I managed to generate a mask of these pixels.I paste
below a screenshot showing the aerial data + the aerial data with this
cloud mask.

The idea (which might be bad) would be to generate a new aerial data by
modifying the radiometric values of the three NIR, R, and V bands of the
aerial data only for these shadow pixels. I thought one approach would be
to define a new radiometric value for these pixels based on the values of
neighboring pixels not affected by the shadow mask? In other words, the new
radiometric values of the shadow pixels in aerial data would correspond to
neighboring radiometric values (tree vegetation, agricultural plot, etc.).
This is intended to mitigate the impact of shadow pixels on subsequent
segmentation a posteriori.

Is there a QGIS tool or another (OTB, GRASS, Saga) that would allow
defining new radiometric values only for certain pixels of a multiband
raster, based on neighboring radiometric values? (A kind of nearest
neighborhood averaging, using a sliding window? or other).

Thanks so much

[image: image.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20251203/14eeb87e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 944376 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20251203/14eeb87e/attachment-0001.png>


More information about the QGIS-User mailing list