<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.gmail-comment-copy
        {mso-style-name:gmail-comment-copy;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-IE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>



<table style="FONT-SIZE: 9pt; HEIGHT: 321px; FONT-FAMILY: Arial, sans-serif; WIDTH: 500px; LINE-HEIGHT: 15px" cellspacing="0" cellpadding="0">
  <tbody>
  <tr>
    <td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial,sans-serif; WIDTH: 500px; COLOR: #004d44; PADDING-BOTTOM: 6px"><span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44"><br>&#x2014;&#x2014;</span><br><span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44">Richard McDonnell MSc GIS</span><br><span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44"><i>Flood Risk Management - Data Management</i></span><br><br><span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">&#x2014;&#x2014;</span><br><span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44">Oifig na nOibreacha Poibl&#xED;</span><br><span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">Office of Public Works</span><br><br><span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #565148">Sr&#xE1;id Jonathan Swift, Baile &#xC1;tha Troim, Co na M&#xED;, C15 NX36 
      </span><br><span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">Jonathan Swift Street, Trim, Co Meath, C15 NX36</span><br><span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">&#x2014;&#x2014;</span><br><span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">M +353 87 688 5964   T +353 46 942 2409</span><br><a href="https://gov.ie/opw">https://gov.ie/opw</a><br><br><span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">&#x2014;&#x2014;<br>To send me 
      files larger than 30MB, please use the link below 
      https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie<br></span><br><span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">Email Disclaimer: 
      https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/ 
      </span></td></tr></tbody></table>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> celati Laurent <laurent.celati@gmail.com>
<br>
<b>Sent:</b> 03 December 2025 13:48<br>
<b>To:</b> Richard McDonnell <richard.mcdonnell@opw.ie><br>
<b>Cc:</b> qgis-user@lists.osgeo.org<br>
<b>Subject:</b> Re: [Qgis-user] Set new pixel radiometric values ​based on neighborhood?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thanks so much for your reply.<span class="gmail-comment-copy">  r.neighbours :
<a href="https://grass.osgeo.org/grass-stable/manuals/r.neighbors.html">grass.osgeo.org/grass-stable/manuals/r.neighbors.html</a> is probably more appropriate. Even if i notice one limit : the tool handles only raster with one band (input). No multi bands.</span>
<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Le mer. 3 déc. 2025 à 13:22, Richard McDonnell <<a href="mailto:richard.mcdonnell@opw.ie">richard.mcdonnell@opw.ie</a>> a écrit :<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hi,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">(Raster
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">è</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> Analysis
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">è</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> Fill NoData)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Kind Regards,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Richard</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="0" style="width:375.0pt">
<tbody>
<tr>
<td width="500" style="width:375.0pt;padding:0cm 0cm 4.5pt 0cm">
<p class="MsoNormal" style="line-height:11.25pt"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#004D44"><br>
——</span></b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#004D44"><br>
<b>Richard McDonnell MSc GIS</b><br>
<i>Flood Risk Management - Data Management</i><br>
<br>
——<br>
<b>Oifig na nOibreacha Poiblí</b><br>
Office of Public Works<br>
<br>
</span><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#565148">Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
</span></b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#004D44"><br>
</span><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#565148">Jonathan Swift Street, Trim, Co Meath, C15 NX36</span><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#004D44"><br>
</span><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#565148">——</span><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#004D44"><br>
</span><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#565148">M +353 87 688 5964 T +353 46 942 2409</span><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#004D44"><br>
<a href="https://gov.ie/opw" target="_blank">https://gov.ie/opw</a><br>
<br>
——<br>
To send me files larger than 30MB, please use the link below <a href="https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie" target="_blank">
https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie</a><br>
<br>
Email Disclaimer: <a href="https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/" target="_blank">
https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/</a> <o:p>
</o:p></span></p>
</td>
</tr>
</tbody>
</table>
<div style="border:none;border-left:solid windowtext 1.5pt;padding:0cm 0cm 0cm 4.0pt;border-color:currentcolor currentcolor currentcolor blue">
<div>
<div style="border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-color:currentcolor currentcolor">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> QGIS-User
 <<a href="mailto:qgis-user-bounces@lists.osgeo.org" target="_blank">qgis-user-bounces@lists.osgeo.org</a>>
<b>On Behalf Of </b>celati Laurent via QGIS-User<br>
<b>Sent:</b> 03 December 2025 10:11<br>
<b>To:</b> qgis-user <<a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a>><br>
<b>Subject:</b> [Qgis-user] Set new pixel radiometric values ​based on neighborhood?</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Dear all, <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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). <o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><br>
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.<br>
<br>
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.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks so much<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><br>
<img border="0" width="940" height="277" style="width:9.7916in;height:2.8854in" id="m_432389442157252947_x005f_x0000_i1025" src="cid:image001.png@01DC645C.59C5DB20" alt="image.png"><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>