Python openCV find image in folder of images(road sign recognition)
<p>I'm doing road sign recognition program. I've successfuly done with image preprocesing. I have extracted image of road sign. </p>

<p>Now I don't know what algorithem or template matching should I use to find matching image of my extracted image.</p>

<p>Solution must be simple and effective, because I'm still learning Python.</p>

<p>1.image: extracted image     2. image: matched image</p>

<p><a href="http://i.stack.imgur.com/yTi1N.jpg" rel="nofollow"><img src="http://i.stack.imgur.com/yTi1N.jpg" alt="Extracted image"></a><a href="http://i.stack.imgur.com/lkOqT.png" rel="nofollow"><img src="http://i.stack.imgur.com/lkOqT.png" alt="That image sould find algorithm in folder of images"></a></p>

<p>Template matching doesn't work in your case. Template matching works only with nearly the same template in your source. 
I propose to use <code>dlib</code>
<a href="http://dlib.net/ml.html" rel="nofollow">http://dlib.net/ml.html</a> for deep learning.
It's easy to learn and you don't need write a lot of code. If you still want to use template matching you could try following:</p>

<pre><code>import cv2

source = cv2.imread("/source/of/your_stop_sign")
template = cv2.imread("our/template")
(tempH, tempW) = template.shape[:2]
</code></pre>

<p>try to find the template:</p>

<pre><code>result = cv2.matchTemplate(source, template, cv2.TM_CCOEFF)
(minVal, maxVal, minLoc, (x, y)) = cv2.minMaxLoc(result)
</code></pre>

<p>draw the bounding box</p>

<pre><code>cv2.rectangle(source, (x, y), (x + tempW, y + tempH), (0, 255, 0), 2)
</code></pre>

<p>show the result</p>

<pre><code>cv2.imshow("source", source)
cv2.imshow("template", template)
cv2.waitKey(0)
</code></pre>

<p><img src="http://i.stack.imgur.com/uU4dI.jpg" alt="Template">
<img src="http://i.stack.imgur.com/AWeF4.jpg" alt="Source">
<img src="http://i.stack.imgur.com/BfFPJ.png" alt="Result"></p>

python algorithm opencv template-matching