<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Hi Johannes<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
However, as I want to automatize the step of rectifying/georeferencing I<br>
am looking for a way to autodetect these six points in the image. I am<br>
thinking of tools like pattern/face recognition that are able to<br>
autodetect objects (e.g. eyes, points etc.) and extract their position<br>
(coordinates) within that image. I assume these coordinates together<br>
with their "true" position could then be used for rectifying the picture<br>
using e.g. i.rectify.<br>
<br>
Has anyone done this or a similar exercise before and can recommend<br>
tools and approaches to auto-detect GCP from an image?<br>
</blockquote>
</span><br></blockquote></div><br></div><div class="gmail_extra">For a similar purpose, to automatize image to image registration, I have used the library OTB toolbox(<a href="https://www.orfeo-toolbox.org/">https://www.orfeo-toolbox.org/</a>) along with GRASS GIS.<br><br></div><div class="gmail_extra">OTB has a module called homologous point extraction which uses algorithms like SIFT and SURF. <br><a href="https://www.orfeo-toolbox.org//Applications/HomologousPointsExtraction.html">https://www.orfeo-toolbox.org//Applications/HomologousPointsExtraction.html</a><br>After getting the gcp's, I used grass plugin m.gcp.filter to filter out the outliers, followed by i.rectify.<br><br></div><div class="gmail_extra">On a GRASS environment, following is what I used - representative code:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:monospace,monospace">#GCP extraction using OTBcli_homologous points</span><br><span style="font-family:monospace,monospace">otbcli_HomologousPointsExtraction -in1 input_b1.tif -band1 1 -in2 reference_b1.tif -band2 1 -algorithm sift -mode full -out OUTB1.txt</span><br><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"># Making the text file GRASS compatible</span><br><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"> awk '{$5="1\t"$5}1' ${MYTMPDIR}/OUTB1.txt > ${MYTMPDIR}/OUTB1.txt</span><br><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"># importing the input TIFF files</span><br><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"> r.in.gdal input=${y}_b1.tif output=${i}_b1 memory=${MEMORY}</span><span style="font-family:monospace,monospace"></span></blockquote><div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:monospace,monospace">#Moving the POINTS file to the GRASS group folder</span><br><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"> mv ${MYTMPDIR}/OUTB1.txt ${GRASSLOC}/group/${i}/POINTS</span><br><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace">#GCP filtering</span><br><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"> m.gcp.filter group=${i} order=1 threshold=500 -b</span><br><span style="font-family:monospace,monospace"></span><div class="gmail_extra"><span style="font-family:monospace,monospace">i.rectify -a group=${i} extension=_rectified order=1 method=nearest --o<br></span></div></blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">In this paper (<a href="http://www.mdpi.com/2072-4292/8/3/169/htm">http://www.mdpi.com/2072-4292/8/3/169/htm</a>) , the steps are explained and main codes are provided in appendix.<br><br></div><div class="gmail_extra">Here is a good link on SIFT, I guess it is more apt for your case with digital photographs. In the above case, we tried on satellite data.<br><a href="http://www.aishack.in/tutorials/sift-scale-invariant-feature-transform-introduction/">http://www.aishack.in/tutorials/sift-scale-invariant-feature-transform-introduction/</a><br><br></div><div class="gmail_extra">Hope this helps!!<br><br></div><div class="gmail_extra">Sajid<br></div><div class="gmail_extra"><br></div></div>