C # class for finding sub-picture coordinates in the original image

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.