[Qgis-user] Set new pixel radiometric values based on neighborhood?
Richard McDonnell
richard.mcdonnell at opw.ie
Wed Dec 3 05:54:34 PST 2025
Glad you found a tool. Might be better approach, anyway, to split out the bands and process separately. I was thinking about it in relation to the Fill NoDATA tool, that it too is best used on single bands.
——
Richard McDonnell MSc GIS
Flood Risk Management - Data Management
——
Oifig na nOibreacha Poiblí
Office of Public Works
Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
——
M +353 87 688 5964 T +353 46 942 2409
https://gov.ie/opw
——
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie
Email Disclaimer: https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/
From: celati Laurent <laurent.celati at gmail.com>
Sent: 03 December 2025 13:48
To: Richard McDonnell <richard.mcdonnell at opw.ie>
Cc: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] Set new pixel radiometric values based on neighborhood?
Thanks so much for your reply. r.neighbours : grass.osgeo.org/grass-stable/manuals/r.neighbors.html<https://grass.osgeo.org/grass-stable/manuals/r.neighbors.html> is probably more appropriate. Even if i notice one limit : the tool handles only raster with one band (input). No multi bands.
Le mer. 3 déc. 2025 à 13:22, Richard McDonnell <richard.mcdonnell at opw.ie<mailto:richard.mcdonnell at opw.ie>> a écrit :
Hi,
The Fill NoData tool would seem to be the tool you should look at. But you would have to use the mask to set all pixels in the shadowed regions to NoData, then run the Fill NoData tool
(Raster ==> Analysis ==> Fill NoData)
Kind Regards,
Richard
——
Richard McDonnell MSc GIS
Flood Risk Management - Data Management
——
Oifig na nOibreacha Poiblí
Office of Public Works
Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
——
M +353 87 688 5964 T +353 46 942 2409
https://gov.ie/opw
——
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie
Email Disclaimer: https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/
From: QGIS-User <qgis-user-bounces at lists.osgeo.org<mailto:qgis-user-bounces at lists.osgeo.org>> On Behalf Of celati Laurent via QGIS-User
Sent: 03 December 2025 10:11
To: qgis-user <qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>>
Subject: [Qgis-user] Set new pixel radiometric values based on neighborhood?
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
[cid:image001.png at 01DC645C.59C5DB20]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20251203/47b25f98/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 392827 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20251203/47b25f98/attachment-0001.png>
More information about the QGIS-User
mailing list