Full-screen quick image search in Delphi 3. Image Search

Source: Internet
Author: User

3. Find the color of the image
Combine the content of section 1 and section 2 to design a color-seekingProgramIt should not be a problem. A Bitmap can be viewed as a matrix composed of pixels. Top is equivalent to Y, left is equivalent to X, and top is used to access the pixels on the bitmap like an Access Matrix Element. The search process is the traversal of the counterpoint image element. RelatedCodeIt is available in the bitmapdata. Pas file and will not be repeated here. In the bitmapdata. Pas file, the search process is mainly one-to-one comparison, which is a slow match.Algorithm. For some string matching algorithms, you can skip some characters when the matching fails during the search process to speed up the search. Similar algorithms are also available in matrix lookup, but I have not found a good algorithm. Therefore, one-to-one comparison is used in implementation. This means that the search speed may be improved, although the current search speed is acceptable.
Another problem is that you can find a bitmap on the screen or in a large image. This bitmap can be called a subgraph. The Color comparison algorithm allows a certain color deviation in the subgraph, which does not affect the search result. However, this comparison algorithm does not allow distortion or rotation of subgraphs, as long as the subgraphs are slightly distorted or rotated, they cannot be found. Complex graphic image analysis algorithms are required to allow distortion or rotation of subgraphs. Because the graphic image analysis algorithm is too complex and I have not studied it too deeply, I only implement simple subgraph search in bitmapdata. Pas.

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.