On the internet for a long time, there is no ready-made example, I also send a post unfortunately did not find a good way.
Had to write their own, the following for personal ideas written, the algorithm may not be too good, if you have a good example to share with you.
This class mainly implements the image coordinate lookup function and supports the tolerance value
First required namespaces
Here are some definitions of private properties
The following defines a struct used to hold the coordinates found and how many tolerance values are used (how many pixels are wrong)
Here is the constructor method definition
The following defines some public properties for external access
The following defines some public methods for external access
Below is the most important of the core methods in this class
Did not put the code out of the reason is not to want everyone to copy the use, so I lost the meaning of this article, I just hope you can understand this idea
and create more efficient code by thinking about it.
The above part of the basic have comments you should be able to see, if there is anything not understand the place please leave a message.
Source: http://blog.csdn.net/sjzlxd/article/details/3924234
Null
C # class for finding sub-picture coordinates in the original image