Whitehead theorem: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Brad7777
 
Line 1: Line 1:
Your good Tribe is the a great number strong of all and discover have the planet (virtual) at your toes, and therefore all that with only real a brief on-line on the internet that may direct the customer step by step in how to get our company's cheat code for Intervene of Tribes.<br><br>
'''Template matching'''<ref>R. Brunelli, ''Template Matching Techniques in Computer Vision: Theory and Practice'', Wiley, ISBN 978-0-470-51706-2, 2009 ''([http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470517069.html] TM book)''</ref> is a technique in [[digital image processing]] for finding small parts of an image which match a template image. It can be used in manufacturing as a part of quality control,<ref>Aksoy, M. S., O. Torkul, and I. H. Cedimoglu. "An industrial visual inspection system that uses inductive learning." Journal of Intelligent Manufacturing 15.4 (August 2004): 569(6). Expanded Academic ASAP. Thomson Gale.</ref> a way to navigate a mobile robot,<ref>Kyriacou, Theocharis, Guido Bugmann, and Stanislao Lauria. "Vision-based urban navigation procedures for verbally instructed robots." Robotics and Autonomous Systems 51.1 (April 30, 2005): 69-80. Expanded Academic ASAP. Thomson Gale.</ref> or as a way to detect edges in images.<ref>WANG, CHING YANG, Ph.D. "EDGE DETECTION USING TEMPLATE MATCHING (IMAGE PROCESSING, THRESHOLD LOGIC, ANALYSIS, FILTERS)". Duke University, 1985, 288 pages; AAT 8523046</ref>


when you are locating a great handle system tough to use, optimize the places within your activity. The default manage platform might not be when it comes to everyone. Some different people prefer a better glimpse screen, a set including more sensitive management otherwise perhaps an inverted develop. In several video recordings gaming, you may regulation these from the setting's area.<br><br>Assuming you have little ones who delight in video games, then you probably know how challenging it really is always to pull them out on the t. v.. Their eye can continually be stuck towards the tester for hours as the businesses play their preferred social games. If you want aid regulating your your child's clash of clans Hack time, then your pursuing article has a few recommendations for you.<br><br>Pay attention to how much money your teenager has been spending on video social games. These products commonly cheap and there is generally often the option most typically associated with buying more add-ons within the game itself. Set monthly and on an annual basis limits on the amount of money that should be spent on video games. Also, have conversations with your young kids about budgeting.<br><br>View your child's xbox game enjoying. Video gaming are now rated just exactly like films and generally can help. The item enables you to maintain your an eye on the information your kids is exposed to. For those who have virtually any issues regarding in which and the way to make use of [http://circuspartypanama.com clash of clans hack ipad download], you are able to email us with our web-page. Dependant upon your child's age, continue to keep he or she clear of video online games that happen to prove meant for people what individuals are more fully produced than him.<br><br>That war abject is agnate in your approved village, except that your warfare abject will not get resources. Barrio in your warfare abject will not be anon improved per rearranged, as it on their own mimics this adjustment and in addition accomplished completed advancement degrees of your apple while having alertness day. Struggle bases additionally never price to take their decorative accents rearmed, defenses reloaded in addition to characters healed, as chances are they are consistently ready. The association alcazar inside your war abject ask be abounding alone forward the one in your company whole village.<br><br>Basically, it would alone acquiesce all of us to be able to tune 2 volume amazing. If you appetite for you to melody added than in which - as Supercell extremely acquainted t had been all-important - you guarantees assorted beeline segments. Theoretically they could track alike added bulk articles. If they capital to help [http://Search.Un.org/search?ie=utf8&site=un_org&output=xml_no_dtd&client=UN_Website_en&num=10&lr=lang_en&proxystylesheet=UN_Website_en&oe=utf8&q=allegation+contained&Submit=Go allegation contained] or beneath for a 2 day skip, they are able to [http://www.sharkbayte.com/keyword/calmly+familiarize calmly familiarize] 1 supplemental segment.
==Approach==
 
{{Empty section|date=March 2013}}
 
==Feature-based approach==
 
If the template image has strong features, a feature-based approach may be considered; the approach may prove further useful if the match in the search image might be [[Transformation (geometry)|transformed]] in some fashion.  Since this approach does not consider the entirety of the template image, it can be more computationally efficient when working with source images of larger resolution, as the alternative approach, template-based, may require searching potentially large amounts of points in order to determine the best matching location.<ref>Li, Yuhai, L. Jian, T. Jinwen, X. Honbo. “A fast rotated template matching based on point feature.” Proceedings of the SPIE 6043 (2005): 453-459. MIPPR 2005: SAR and Multispectral Image Processing.</ref>
 
==Template-based approach==
 
For templates without strong features, or for when the bulk of the template image constitutes the matching image, a template-based approach may be effective.  As aforementioned, since template-based template matching may potentially require sampling of a large number of points, it is possible to reduce the number of sampling points by reducing the resolution of the search and template images by the same factor and performing the operation on the resultant downsized images (multiresolution, or pyramid, image processing), providing a search window of data points within the search image so that the template does not have to search every viable data point, or a combination of both.
 
==Motion tracking and occlusion handling==
 
In instances where the template may not provide a direct match, it may be useful to implement the use of [[eigenspace]]s – templates that detail the matching object under a number of different conditions, such as varying perspectives, illuminations, color contrasts, or acceptable matching object “poses”.<ref>Luis A. Mateos, Dan Shao and Walter G. Kropatsch. Expanding Irregular Graph Pyramid for an Approaching Object. CIARP 2009: 885-891.</ref> For example, if the user was looking for a face, the eigenspaces may consist of images (templates) of faces in different positions to the camera, in different lighting conditions, or with different expressions.
 
It is also possible for the matching image to be obscured, or occluded by an object; in these cases, it is unreasonable to provide a multitude of templates to cover each possible occlusion.  For example, the search image may be a playing card, and in some of the search images, the card is obscured by the fingers of someone holding the card, or by another card on top of it, or any object in front of the camera for that matter.  In cases where the object is malleable or poseable, motion also becomes a problem, and problems involving both motion and occlusion become ambiguous.<ref>F. Jurie and M. Dhome. Real time robust template matching. In British Machine Vision Conference, pages 123–131, 2002.</ref>  In these cases, one possible solution is to divide the template image into multiple sub-images and perform matching on each subdivision.
 
==Template-based matching and convolution==
 
A basic method of template matching uses a [[convolution]] mask (template), tailored to a specific feature of the search image, which we want to detect. This technique can be easily performed on grey images or [[Edge detection|edge]] images. The convolution output will be highest at places where the image structure matches the mask structure, where large image values get multiplied by large mask values.
 
This method is normally implemented by first picking out a part of the search image to use as a template:
We will call the search image '''S(x, y)''', where '''(x, y)''' represent the coordinates of each pixel in the search image. We will call the template '''T(x <sub>t</sub>, y <sub>t</sub>)''', where '''(x<sub>t</sub>, y<sub>t</sub>)''' represent the coordinates of each pixel in the template. We then simply move the center (or the origin) of the template '''T(x <sub>t</sub>, y <sub>t</sub>)''' over each '''(x, y)''' point in the search image and calculate the sum of products between the coefficients in '''S(x, y)''' and '''T(x<sub>t</sub>, y<sub>t</sub>)''' over the whole area spanned by the template. As all possible positions of the template with respect to the search image are considered, the position with the highest score is the best position. This method is sometimes referred to as [[Spatial filter|'Linear Spatial Filtering']] and the template is called a filter mask.
 
For example, one way to handle translation problems on images, using template matching is to compare the intensities of the [[pixel]]s, using the '''SAD''' ([[Sum of absolute differences]]) measure.
 
A pixel in the search image with coordinates '''(x<sub>s</sub>, y<sub>s</sub>)''' has intensity '''I<sub>s</sub>(x<sub>s</sub>, y<sub>s</sub>)''' and a pixel in the template with coordinates '''(x<sub>t</sub>, y<sub>t</sub>)''' has intensity '''I<sub>t</sub>(x<sub>t</sub>, y<sub>t</sub> )'''. Thus the [[absolute difference]] in the pixel intensities is defined as '''Diff(x<sub>s</sub>, y<sub>s</sub>, x <sub>t</sub>, y <sub>t</sub>) = | I<sub>s</sub>(x<sub>s</sub>, y<sub>s</sub>) – I<sub>t</sub>(x <sub>t</sub>, y <sub>t</sub>) |'''.  
 
'''<math> SAD(x, y) = \sum_{i=0}^{T_{\text{rows}}}\sum_{j=0}^{T_{\text{cols}}} {\text{Diff}(x+i, y+j,i,j)} </math>'''
 
The mathematical representation of the idea about looping through the pixels in the search image as we translate the origin of the template at every pixel and take the SAD measure is the following:
   
'''<math>\sum_{x=0}^{S_{\text{rows}}}\sum_{y=0}^{S_{\text{cols}}} {SAD(x, y)}</math>''' 
 
'''S<sub>rows</sub>''' and '''S<sub>cols</sub>''' denote the rows and the columns of the search image and '''T<sub>rows</sub>''' and '''T<sub>cols</sub>''' denote the rows and the columns of the template image, respectively.
In this method the lowest SAD score gives the estimate for the best position of template within the search image. The method is simple to implement and understand, but it is one of the slowest methods.''
 
== Implementation ==
In this simple implementation, it is assumed that the above described method is applied on grey images: This is why '''Grey''' is used as pixel intensity.  The final position in this implementation gives the top left location for where the template image best matches the search image.
 
<source lang=c>
minSAD = VALUE_MAX;
 
// loop through the search image
for ( int x = 0; x <= S_rows - T_rows; x++ ) {
    for ( int y = 0; y <= S_cols - T_cols; y++ ) {
        SAD = 0.0;
 
// loop through the template image
for ( int j = 0; j < T_cols; j++ )
            for ( int i = 0; i < T_rows; i++ ) {
 
                pixel p_SearchIMG = S[x+i][y+j];
                pixel p_TemplateIMG = T[i][j];
                SAD += abs( p_SearchIMG.Grey - p_TemplateIMG.Grey );
            }
 
        // save the best found position
        if ( minSAD > SAD ) {
            minSAD = SAD;
            // give me min SAD
            position.bestRow = x;
            position.bestCol = y;
            position.bestSAD = SAD;
        }
    }
}</source>
 
One way to perform template matching on color images is to decompose the [[pixel]]s into their color components and measure the quality of match between the color template and search image using the sum of the SAD computed for each color separately.
 
== Speeding up the Process ==
 
In the past, this type of spatial filtering was normally only used in dedicated hardware solutions because of the computational complexity of the operation,<ref>Gonzalez, R, Woods, R, Eddins, S "Digital Image Processing using Matlab" Prentice Hall, 2004</ref> however we can lessen this complexity by filtering it in the frequency domain of the image, referred to as 'frequency domain filtering,' this is done through the use of the [[convolution theorem]].
 
Another way of speeding up the matching process is through the use of an image pyramid. This is a series of images, at different scales, which are formed by repeatedly filtering and subsampling the original image in order to generate a sequence of reduced resolution images.<ref>E. H. Adelson, C. H. Anderson, J. R. Bergen, P. J. Burt and J. M. Ogden, Pyramid methods in image processing http://web.mit.edu/persci/people/adelson/pub_pdfs/RCA84.pdf</ref> These lower resolution images can then be searched for the template (with a similarly reduced resolution), in order to yield possible start positions for searching at the larger scales. The larger images can then be searched in a small window around the start position to find the best template location.
 
Other methods can handle problems such as translation, scale, image rotation and even all affine transformations.<ref>Yuan, Po, M.S.E.E. "Translation, scale, rotation and threshold invariant pattern recognition system". The University of Texas at Dallas, 1993, 62 pages; AAT EP13780</ref><ref>H. Y. Kim and S. A. Araújo, "Grayscale Template-Matching Invariant to Rotation, Scale, Translation, Brightness and Contrast," IEEE Pacific-Rim Symposium on Image and Video Technology, Lecture Notes in Computer Science, vol. 4872, pp. 100-113, 2007.</ref><ref>Korman S., Reichman D., Tsur G. and Avidan S., "FAsT-Match: Fast Affine Template Matching", CVPR2013.</ref>
 
==Improving the accuracy of the matching==
 
Improvements can be made to the matching method by using more than one template (eigenspaces), these other templates can have different scales and rotations.
 
It is also possible to improve the accuracy of the matching method by hybridizing the feature-based and template-based approaches.<ref>C. T. Yuen, M. Rizon, W. S. San, and T. C. Seong. “Facial Features for Template Matching Based Face Recognition.” American J. of Engineering and Applied Sciences 3 (1): 899-903, 2010.</ref>  Naturally, this requires that the search and template images have features that are apparent enough to support feature matching.
 
==Similar Methods==
 
Other methods which are similar include '[[Stereo matching]]', '[[Image registration]]' and '[[Scale-invariant feature transform]]'.
 
==Examples of Use==
 
Template matching has various applications and is used in such fields as face recognition (see [[facial recognition system]]) and medical image processing. Systems have been developed and used in the past to count the number of faces that walk across part of a bridge within a certain amount of time. Other systems include automated calcified nodule detection within digital chest X-rays.<ref>Ashley Aberneithy. "Automatic Detection of Calcified Nodules of Patients with Tuberculous". University College London, 2007</ref>
Recently, this method was implemented in geostatistical simulation which could provide a fast algorithm.<ref>Tahmasebi, P., Hezarkhani, A., Sahimi, M., 2012, [http://www.springerlink.com/content/0150455247264825/fulltext.pdf Multiple-point geostatistical modeling based on the cross-correlation functions], Computational Geosciences, 16(3):779-79742.</ref>
 
==See also==
* [[Facial recognition system]]
* [[Pattern recognition]]
* [[Computer vision]]
* [[Elastic Matching]]
 
==References==
{{reflist}}
 
==External links==
*[http://www.mygeeksite.in/2012/05/template-matching-opencv-for-windows.html Template Matching in OpenCV]
*[http://rkb.home.cern.ch/rkb/AN16pp/node283.html#SECTION0002830000000000000000 Template Matching]
*[http://www.araa.asn.au/acra/acra2004/papers/cole.pdf Visual Object Recognition using Template Matching]
*[http://www.lps.usp.br/~hae/software/cirateg/index.html Rotation, scale, translation-invariant template matching demonstration program]
*[http://campar.in.tum.de/Main/AndreasHofhauser perspective-invariant template matching]
 
{{DEFAULTSORT:Template Matching}}
[[Category:Image processing]]

Revision as of 20:06, 23 March 2013

Template matching[1] is a technique in digital image processing for finding small parts of an image which match a template image. It can be used in manufacturing as a part of quality control,[2] a way to navigate a mobile robot,[3] or as a way to detect edges in images.[4]

Approach

Template:Empty section

Feature-based approach

If the template image has strong features, a feature-based approach may be considered; the approach may prove further useful if the match in the search image might be transformed in some fashion. Since this approach does not consider the entirety of the template image, it can be more computationally efficient when working with source images of larger resolution, as the alternative approach, template-based, may require searching potentially large amounts of points in order to determine the best matching location.[5]

Template-based approach

For templates without strong features, or for when the bulk of the template image constitutes the matching image, a template-based approach may be effective. As aforementioned, since template-based template matching may potentially require sampling of a large number of points, it is possible to reduce the number of sampling points by reducing the resolution of the search and template images by the same factor and performing the operation on the resultant downsized images (multiresolution, or pyramid, image processing), providing a search window of data points within the search image so that the template does not have to search every viable data point, or a combination of both.

Motion tracking and occlusion handling

In instances where the template may not provide a direct match, it may be useful to implement the use of eigenspaces – templates that detail the matching object under a number of different conditions, such as varying perspectives, illuminations, color contrasts, or acceptable matching object “poses”.[6] For example, if the user was looking for a face, the eigenspaces may consist of images (templates) of faces in different positions to the camera, in different lighting conditions, or with different expressions.

It is also possible for the matching image to be obscured, or occluded by an object; in these cases, it is unreasonable to provide a multitude of templates to cover each possible occlusion. For example, the search image may be a playing card, and in some of the search images, the card is obscured by the fingers of someone holding the card, or by another card on top of it, or any object in front of the camera for that matter. In cases where the object is malleable or poseable, motion also becomes a problem, and problems involving both motion and occlusion become ambiguous.[7] In these cases, one possible solution is to divide the template image into multiple sub-images and perform matching on each subdivision.

Template-based matching and convolution

A basic method of template matching uses a convolution mask (template), tailored to a specific feature of the search image, which we want to detect. This technique can be easily performed on grey images or edge images. The convolution output will be highest at places where the image structure matches the mask structure, where large image values get multiplied by large mask values.

This method is normally implemented by first picking out a part of the search image to use as a template: We will call the search image S(x, y), where (x, y) represent the coordinates of each pixel in the search image. We will call the template T(x t, y t), where (xt, yt) represent the coordinates of each pixel in the template. We then simply move the center (or the origin) of the template T(x t, y t) over each (x, y) point in the search image and calculate the sum of products between the coefficients in S(x, y) and T(xt, yt) over the whole area spanned by the template. As all possible positions of the template with respect to the search image are considered, the position with the highest score is the best position. This method is sometimes referred to as 'Linear Spatial Filtering' and the template is called a filter mask.

For example, one way to handle translation problems on images, using template matching is to compare the intensities of the pixels, using the SAD (Sum of absolute differences) measure.

A pixel in the search image with coordinates (xs, ys) has intensity Is(xs, ys) and a pixel in the template with coordinates (xt, yt) has intensity It(xt, yt ). Thus the absolute difference in the pixel intensities is defined as Diff(xs, ys, x t, y t) = | Is(xs, ys) – It(x t, y t) |.

The mathematical representation of the idea about looping through the pixels in the search image as we translate the origin of the template at every pixel and take the SAD measure is the following:

Srows and Scols denote the rows and the columns of the search image and Trows and Tcols denote the rows and the columns of the template image, respectively. In this method the lowest SAD score gives the estimate for the best position of template within the search image. The method is simple to implement and understand, but it is one of the slowest methods.

Implementation

In this simple implementation, it is assumed that the above described method is applied on grey images: This is why Grey is used as pixel intensity. The final position in this implementation gives the top left location for where the template image best matches the search image.

minSAD = VALUE_MAX;

// loop through the search image
for ( int x = 0; x <= S_rows - T_rows; x++ ) {
    for ( int y = 0; y <= S_cols - T_cols; y++ ) {
        SAD = 0.0;

	// loop through the template image
	
	for ( int j = 0; j < T_cols; j++ )
            for ( int i = 0; i < T_rows; i++ ) {

                pixel p_SearchIMG = S[x+i][y+j];
                pixel p_TemplateIMG = T[i][j];
		
                SAD += abs( p_SearchIMG.Grey - p_TemplateIMG.Grey );
            }
   
        // save the best found position 
        if ( minSAD > SAD ) { 
            minSAD = SAD;
            // give me min SAD
            position.bestRow = x;
            position.bestCol = y;
            position.bestSAD = SAD;
        }
    }
}

One way to perform template matching on color images is to decompose the pixels into their color components and measure the quality of match between the color template and search image using the sum of the SAD computed for each color separately.

Speeding up the Process

In the past, this type of spatial filtering was normally only used in dedicated hardware solutions because of the computational complexity of the operation,[8] however we can lessen this complexity by filtering it in the frequency domain of the image, referred to as 'frequency domain filtering,' this is done through the use of the convolution theorem.

Another way of speeding up the matching process is through the use of an image pyramid. This is a series of images, at different scales, which are formed by repeatedly filtering and subsampling the original image in order to generate a sequence of reduced resolution images.[9] These lower resolution images can then be searched for the template (with a similarly reduced resolution), in order to yield possible start positions for searching at the larger scales. The larger images can then be searched in a small window around the start position to find the best template location.

Other methods can handle problems such as translation, scale, image rotation and even all affine transformations.[10][11][12]

Improving the accuracy of the matching

Improvements can be made to the matching method by using more than one template (eigenspaces), these other templates can have different scales and rotations.

It is also possible to improve the accuracy of the matching method by hybridizing the feature-based and template-based approaches.[13] Naturally, this requires that the search and template images have features that are apparent enough to support feature matching.

Similar Methods

Other methods which are similar include 'Stereo matching', 'Image registration' and 'Scale-invariant feature transform'.

Examples of Use

Template matching has various applications and is used in such fields as face recognition (see facial recognition system) and medical image processing. Systems have been developed and used in the past to count the number of faces that walk across part of a bridge within a certain amount of time. Other systems include automated calcified nodule detection within digital chest X-rays.[14] Recently, this method was implemented in geostatistical simulation which could provide a fast algorithm.[15]

See also

References

43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.

External links

  1. R. Brunelli, Template Matching Techniques in Computer Vision: Theory and Practice, Wiley, ISBN 978-0-470-51706-2, 2009 ([1] TM book)
  2. Aksoy, M. S., O. Torkul, and I. H. Cedimoglu. "An industrial visual inspection system that uses inductive learning." Journal of Intelligent Manufacturing 15.4 (August 2004): 569(6). Expanded Academic ASAP. Thomson Gale.
  3. Kyriacou, Theocharis, Guido Bugmann, and Stanislao Lauria. "Vision-based urban navigation procedures for verbally instructed robots." Robotics and Autonomous Systems 51.1 (April 30, 2005): 69-80. Expanded Academic ASAP. Thomson Gale.
  4. WANG, CHING YANG, Ph.D. "EDGE DETECTION USING TEMPLATE MATCHING (IMAGE PROCESSING, THRESHOLD LOGIC, ANALYSIS, FILTERS)". Duke University, 1985, 288 pages; AAT 8523046
  5. Li, Yuhai, L. Jian, T. Jinwen, X. Honbo. “A fast rotated template matching based on point feature.” Proceedings of the SPIE 6043 (2005): 453-459. MIPPR 2005: SAR and Multispectral Image Processing.
  6. Luis A. Mateos, Dan Shao and Walter G. Kropatsch. Expanding Irregular Graph Pyramid for an Approaching Object. CIARP 2009: 885-891.
  7. F. Jurie and M. Dhome. Real time robust template matching. In British Machine Vision Conference, pages 123–131, 2002.
  8. Gonzalez, R, Woods, R, Eddins, S "Digital Image Processing using Matlab" Prentice Hall, 2004
  9. E. H. Adelson, C. H. Anderson, J. R. Bergen, P. J. Burt and J. M. Ogden, Pyramid methods in image processing http://web.mit.edu/persci/people/adelson/pub_pdfs/RCA84.pdf
  10. Yuan, Po, M.S.E.E. "Translation, scale, rotation and threshold invariant pattern recognition system". The University of Texas at Dallas, 1993, 62 pages; AAT EP13780
  11. H. Y. Kim and S. A. Araújo, "Grayscale Template-Matching Invariant to Rotation, Scale, Translation, Brightness and Contrast," IEEE Pacific-Rim Symposium on Image and Video Technology, Lecture Notes in Computer Science, vol. 4872, pp. 100-113, 2007.
  12. Korman S., Reichman D., Tsur G. and Avidan S., "FAsT-Match: Fast Affine Template Matching", CVPR2013.
  13. C. T. Yuen, M. Rizon, W. S. San, and T. C. Seong. “Facial Features for Template Matching Based Face Recognition.” American J. of Engineering and Applied Sciences 3 (1): 899-903, 2010.
  14. Ashley Aberneithy. "Automatic Detection of Calcified Nodules of Patients with Tuberculous". University College London, 2007
  15. Tahmasebi, P., Hezarkhani, A., Sahimi, M., 2012, Multiple-point geostatistical modeling based on the cross-correlation functions, Computational Geosciences, 16(3):779-79742.