<div dir="ltr">Hi Even,<div><br><div>Thanks! it does solve most of the problem!</div><div><br></div><div>The only issue that I think is left is that nearblack scans from the borders till it reaches a valid data point and stops there.</div><div>So in case of diagonal zigzag cutting (or background in holes) there will be still background left inside the zigzags or holes.</div><div><br></div><div>A solution could be to add a parameter for a different scanning mode, instead of 4 scans from the borders till the first data point, do one or two scans (horizontal/vertical) and in each scan cover the whole scanline/row so we won't miss background trapped inside holes.</div><div><br></div><div>What do you think?</div><div><br></div><div>Kind regards,</div></div><div>Idan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 29 Jan 2019 at 14:48, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> I'm looking for an automated/semi-automated way to remove the plain color<br>
> background of some (jpeg compressed) Orthophoto RGB rasters without<br>
> NoDataValue or an Alpha band.<br>
<br>
<a href="https://www.gdal.org/nearblack.html" rel="noreferrer" target="_blank">https://www.gdal.org/nearblack.html</a> ?<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</blockquote></div>