Clock image verification code recognition method, system, computer equipment and storage medium

Through the clock pointer template matching method, it solves the problem of difficulty in identifying clock image verification codes with existing technology, achieves efficient and accurate verification code recognition, improves recognition speed and performance, reduces costs, and is suitable for data collection scenarios.

CN117744057BActive Publication Date: 2024-09-06GUANGZHOU YISHU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311630083.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2024-09-06
Estimated Expiration
2043-11-30

AI Technical Summary

Technical Problem

Existing verification code recognition technology is difficult to effectively identify clock image verification codes, and commonly used image recognition and machine learning/deep learning methods have shortcomings in performance and efficiency and cannot meet the needs of data collection for identifying clock image verification codes.

Method used

The clock pointer template matching method is used to obtain the picture parameter information by receiving and processing the clock image verification code picture, generate the clock pointer template picture, and perform grayscale and binarization processing, calculate the area of ​​the overlapping contour area of ​​the image, and match the clock pointer template to identify the time the clock hands are pointing to.

Benefits of technology

It achieves accurate and efficient recognition of clock image verification codes, improves recognition speed and performance, reduces recognition costs, avoids the need for a large number of sample training, has low resource requirements and is simple to implement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117744057B
    Figure CN117744057B
Patent Text Reader

Abstract

The present invention discloses a clock image verification code recognition method, system, computer equipment and storage medium, wherein the method comprises the following steps: receiving a clock image verification code picture to be recognized of a data collection target website; obtaining picture parameter information of the clock image verification code picture to be recognized; generating clock pointer template pictures of all times in a binary manner according to the picture parameter information; graying and binarizing the clock image verification code picture to be recognized in turn; superimposing the processed clock image verification code picture to be recognized with the clock pointer template pictures in a clock pointer template group of corresponding picture parameter information in turn and calculating the area of ​​image overlapping contour regions; comparing and obtaining the clock pointer template picture with the largest area of ​​image overlapping contour regions; outputting the time pointed to by the pointer in the clock pointer template picture with the largest area of ​​image overlapping contour regions; the present invention can accurately and efficiently recognize clock image verification codes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of verification code recognition, and in particular to a clock image verification code recognition method, system, computer equipment and storage medium. Background Art

[0002] The existing verification code (CAPTCHA, full name: Completely Automated Public Turing test to tell Computers and Humans Apart) is a public fully automatic program to distinguish whether the user is a computer or a human. It is mainly used to distinguish between human and machine behavior. Currently, common verification code forms include image verification codes, SMS verification codes, voice verification codes, etc. Image verification codes are easy to transmit and relatively low in cost, and are widely used. Currently, common image verification codes are mostly numbers, letters, text, etc.

[0003] With the continuous development and in-depth application of information technology and the continuous development of the big data industry, the attribute of data as a key factor has been continuously highlighted, and the construction of some data platform systems usually requires data collection. However, some data collection target websites usually use verification code technology to distinguish between normal users and robot programs, thereby limiting the access of computer programs. In order to achieve data collection, it is necessary to identify or bypass the verification code program of the website to achieve the purpose of data collection.

[0004] Existing verification code recognition technology mainly recognizes image verification codes through image recognition and machine learning / deep learning. The processing steps are complicated, the performance loss is large, and the recognition accuracy depends on the quality of the verification code sample and the recognition algorithm, which is high or low. It is mainly aimed at character-type (numbers, letters, text, etc.) image verification codes, and there is no solution specifically for the recognition of clock image verification codes. Using recognition technology for character-type image verification codes cannot solve the recognition problem of clock image verification codes very well. Summary of the invention

[0005] The object of the present invention is to provide a clock image verification code recognition method, system, computer equipment and storage medium, which can accurately and efficiently recognize the clock image verification code.

[0006] To achieve this object, the present invention adopts the following technical solutions:

[0007] A clock image verification code recognition method is provided, characterized by comprising:

[0008] Receive the clock image verification code image to be identified from the data collection target website;

[0009] Obtaining the image parameter information of the clock image verification code image to be identified, wherein the image parameter information includes: the width and height of the image, the width and length of the hour hand, and the width and length of the minute hand;

[0010] Generating clock pointer template images of all times in a binary manner according to the image parameter information, and naming the clock pointer template images respectively using the time pointed by the clock pointer and saving them in the same clock pointer template group;

[0011] The clock image verification code picture to be identified is subjected to grayscale and binarization processing in sequence;

[0012] The processed clock image verification code image to be identified is sequentially superimposed with the clock pointer template images in the clock pointer template group of the corresponding image parameter information, and the area of ​​the image overlapping contour region is calculated;

[0013] By comparison, the clock pointer template image with the largest overlapping contour area is obtained;

[0014] Output the time pointed by the pointer in the clock pointer template picture with the largest overlapping contour area of ​​the image.

[0015] As a preferred solution of the clock image verification code recognition method, after the step of obtaining the image parameter information of the clock image verification code image to be recognized, the method includes:

[0016] Determine whether the image parameter information of the clock image verification code to be identified is the same as the image parameter information of the generated clock pointer template group;

[0017] If not, the step of generating clock pointer template images of all times in a binary manner according to the image parameter information, and naming the clock pointer template images respectively using the time pointed to by the clock pointer and saving them in the same clock pointer template group is executed;

[0018] If yes, directly execute the steps of sequentially graying and binarizing the clock image verification code picture to be identified.

[0019] As a preferred solution of the clock image verification code recognition method, the step of generating clock pointer template images of all times in a binary manner according to the image parameter information, and naming the clock pointer template images respectively using the time pointed to by the clock pointer and saving them in the same clock pointer template group includes:

[0020] Generate a base image of the clock pointer template image using the width value and the height value of the clock image verification code image to be identified;

[0021] Draw the clock face using a white background;

[0022] Draw a black clock minute hand according to the minute hand width and minute hand length of the clock image verification code picture to be identified;

[0023] Draw a black clock hour hand according to the hour hand width and hour hand length of the clock image verification code picture to be identified.

[0024] As a preferred solution of the clock image verification code recognition method, the step of sequentially graying and binarizing the clock image verification code picture to be recognized includes:

[0025] Obtaining pixel data information of the clock image verification code picture to be identified;

[0026] Use weighted average algorithm to process the grayscale of each pixel acquired;

[0027] The grayscale processed image is binarized, where the threshold is set to 180-200. When the pixel value is greater than the threshold, it is set to 255, otherwise it is set to 0.

[0028] As a preferred solution of the clock image verification code recognition method, the step of sequentially superimposing the processed clock image verification code picture to be recognized with the clock pointer template pictures in the clock pointer template group of the corresponding picture parameter information and calculating the area of ​​the image overlapping contour region includes:

[0029] Obtaining pixel data information of both the processed clock image verification code picture to be identified and the clock pointer template picture;

[0030] Adding pixel values ​​of the same position of the processed clock image verification code image to be identified and the clock pointer template image according to the pixel information to generate a superimposed image;

[0031] Extracting all contours in the superimposed image and storing them in a set form, wherein each contour includes a coordinate vector of a contour pixel;

[0032] Calculate the area of ​​each contour using Green's formula;

[0033] The area of ​​each contour is added together to obtain the area of ​​the overlapping contour region of the image.

[0034] As a preferred solution of the clock image verification code recognition method, after the step of outputting the time pointed by the pointer in the clock pointer template image with the largest image overlapping contour area, the method includes:

[0035] The clock image verification code image to be identified is labeled, named and stored according to the time pointed to by the pointer in the clock pointer template image with the largest image overlapping contour area.

[0036] The present invention also provides a clock image verification code recognition system, comprising:

[0037] A receiving module, used for receiving a clock image verification code image to be identified from a data collection target website;

[0038] An image parameter information extraction module is used to obtain the image parameter information of the clock image verification code image to be identified, wherein the image parameter information includes: the width and height of the image, the width and length of the hour hand, and the width and length of the minute hand;

[0039] A template group generation module, used to generate clock pointer template images of all times in a binary manner according to the image parameter information, and to name the clock pointer template images respectively using the time pointed to by the clock pointer and save them in the same clock pointer template group;

[0040] A processing module, used for sequentially performing grayscale and binarization processing on the clock image verification code picture to be identified;

[0041] A superposition calculation module, used to superimpose the processed clock image verification code picture to be identified with the clock pointer template pictures in the clock pointer template group of the corresponding picture parameter information in sequence and calculate the area of ​​the image overlapping contour region;

[0042] A comparison module, used for comparing and obtaining a clock pointer template image with the largest overlapping contour area of ​​the image;

[0043] The output module outputs the time pointed by the pointer in the clock pointer template image with the largest overlapping contour area of ​​the image.

[0044] As a preferred solution of the clock image verification code recognition system, it also includes:

[0045] A judging module, used for judging whether the picture parameter information of the clock image verification code to be identified is the same as the picture parameter information of the generated clock pointer template group;

[0046] The storage module is used to label, name and store the clock image verification code image to be identified according to the time pointed to by the pointer in the clock pointer template image with the largest image overlapping contour area.

[0047] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above-mentioned clock image verification code recognition methods when executing the computer program.

[0048] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the clock image verification code recognition method as described in any one of the above items are implemented.

[0049] Beneficial effects of the present invention: The clock image verification code recognition method, system, computer device and storage medium proposed in the present invention can accurately and efficiently recognize the clock image verification code by adopting the clock pointer template matching method; compared with image recognition, machine learning, deep learning and other recognition methods, the performance is greatly improved, the recognition speed is much higher than other recognition schemes, and the recognition cost is reduced. The present invention does not require a large number of samples for training, has low resource requirements, is simple to implement, and has extremely low deployment costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 is a flow chart of a clock image verification code recognition method according to an embodiment of the present invention;

[0052] Figure 2 It is one of the display modes when the data collection target website performs clock image verification code verification;

[0053] Figure 3 It is a principle flow chart of clock image verification code recognition according to an embodiment of the present invention;

[0054] Figure 4 It is a part of the clock pointer template pictures in the clock pointer template group of an embodiment of the present invention;

[0055] Figure 5 It is a clock image verification code picture after partial naming and storage according to an embodiment of the present invention;

[0056] Figure 6 It is a structural schematic block diagram of a clock image verification code recognition system according to an embodiment of the present invention;

[0057] Figure 7 is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention;

[0058] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0059] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0060] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0061] Reference Figure 1-5 An embodiment of the present invention provides a clock image verification code recognition method, comprising:

[0062] S1: Receive the clock image verification code image to be identified from the data collection target website;

[0063] S2: Obtaining the image parameter information of the clock image verification code image to be identified, wherein the image parameter information includes: the width and height of the image, the width and length of the hour hand, and the width and length of the minute hand;

[0064] S3: Generate clock pointer template images of all times in a binary manner according to the image parameter information, and name the clock pointer template images respectively using the time pointed by the clock pointer and save them in the same clock pointer template group;

[0065] S4: grayscale and binarization processing are performed on the clock image verification code picture to be identified in sequence;

[0066] S5: superimposing the processed clock image verification code image to be identified with the clock pointer template images in the clock pointer template group of the corresponding image parameter information in sequence and calculating the area of ​​the image overlapping contour region;

[0067] S6: compare and obtain the clock pointer template image with the largest overlapping contour area;

[0068] S7: Output the time pointed by the pointer in the clock pointer template image with the largest image overlapping contour area.

[0069] As described in step S1 above, when the data collection target website shows that clock image verification code verification is required, Figure 2 As shown, the clock image verification code is a colored picture, and an input box is set at the bottom for entering the corresponding time number for verification; the receiving module receives the clock image verification code picture to be identified displayed on the data collection target website.

[0070] As described in the above step S3, the template production module generates clock pointer template images of all times in a binary manner with a white background and a black foreground according to the picture parameter information, and uses the time pointed by the clock pointer to name the clock pointer template images and save them in the same clock pointer template group; wherein, clock image verification code images with different picture parameter information have corresponding clock pointer template groups that are also different, that is, if any one of the width and height of the image, the width and length of the hour hand, the width and length of the minute hand, etc. is different, the corresponding clock pointer template groups are also different; and each group of clock pointer template groups has a total of 720 clock pointer template images (the total number of clock scales is 12*the total number of minute scales is 60), and the clock pointer template images are named according to the time pointed by the clock pointer, specifically, the two digits of the hour hand plus the two digits of the minute hand, and 0 o'clock is used to indicate that it is over 12 o'clock, and if the number is less than two digits, 0 is added in front. Generate a clock pointer template image as follows Figure 4 shown.

[0071] As described in the above step S7, the output module outputs the time pointed by the pointer in the clock pointer template image with the largest image overlapping contour area. The output time is the recognition result of the clock image verification code image to be identified, which is used to enter the input box at the bottom of the clock image verification code displayed on the data collection target website for verification.

[0072] In the above embodiment, by adopting the clock pointer template matching method, the clock image verification code can be accurately and efficiently identified; compared with image recognition, machine learning, deep learning and other recognition methods, there is a great improvement in performance, the recognition speed is much higher than other recognition schemes, and the recognition cost is reduced. The present invention does not require a large number of samples for training, has low resource requirements, is simple to implement, and has extremely low deployment costs.

[0073] In some embodiments, after the step S2 of obtaining the image parameter information of the clock image verification code image to be identified, the method includes:

[0074] S21: Determine whether the image parameter information of the clock image verification code to be identified is the same as the image parameter information of the generated clock pointer template group;

[0075] S22: if not, executing the step of generating clock pointer template images of all times in a binary manner according to the image parameter information, and naming the clock pointer template images respectively using the time pointed to by the clock pointer and saving them in the same clock pointer template group;

[0076] S23: If yes, directly execute the steps of sequentially graying and binarizing the clock image verification code picture to be identified.

[0077] As described in the above steps S21-S23, the judgment module compares the image parameter information of the clock image verification code to be identified with the image parameter information of the generated clock pointer template group one by one, and determines whether the generated clock pointer template group has a corresponding matching clock pointer template group. If not, the clock pointer template group is regenerated; if so, there is no need to generate the clock pointer template group again, and the corresponding matching clock pointer template group can be used directly to avoid repeated generation, making recognition faster and more efficient.

[0078] In some embodiments, the step S3 of generating clock pointer template images of all times in a binary manner according to the image parameter information, and naming the clock pointer template images respectively using the time pointed to by the clock pointer and saving them in the same clock pointer template group includes:

[0079] S31: Generate a base image of the clock pointer template image using the width value and the height value of the clock image verification code image to be identified, which has the same size as the clock image verification code image to be identified;

[0080] S32: Draw the clock face using a white background;

[0081] S33: Draw a black clock minute hand according to the minute hand width and minute hand length of the clock image verification code picture to be identified. Specifically, draw a black clock minute hand starting from the center of the picture and pointing to the clock minute hand time;

[0082] S34: Draw a black clock hand according to the hour hand width and hour hand length of the clock image verification code picture to be identified. Specifically, draw a black clock hand starting from the center of the picture and pointing to the clock hand time.

[0083] In some embodiments, the step S4 of sequentially graying and binarizing the clock image verification code picture to be identified includes:

[0084] S41: Obtain pixel data information of the clock image verification code picture to be identified;

[0085] S42: Use a weighted average algorithm to perform grayscale processing on each acquired pixel; the weighted average algorithm formula is: Gray = 0.299R + 0.587G + 0.114B, where R, G, B represent the values ​​of the three color channels of red, green, and blue, and Gray represents the grayscale value. In the weighted average algorithm, the weight of the red channel is 0.299, the weight of the green channel is 0.587, and the weight of the blue channel is 0.114;

[0086] S43: Binarize the grayscale processed image, wherein the threshold is set to 180-200, and when the pixel value is greater than the threshold, it is set to 255, otherwise it is set to 0.

[0087] The above embodiment is capable of processing the clock image verification code image, removing image noise, and effectively removing noise points in the image to prevent affecting the recognition result.

[0088] In some embodiments, the step S5 of sequentially superimposing the processed clock image verification code image to be identified with the clock pointer template images in the clock pointer template group of the corresponding image parameter information and calculating the area of ​​the image overlapping contour region includes:

[0089] S51: Obtaining pixel data information of both the processed clock image verification code picture to be identified and the clock pointer template picture;

[0090] S52: adding pixel values ​​at the same position of the processed clock image verification code image to be identified and the clock pointer template image according to the pixel information to generate a superimposed image; specifically, the superimposition method is: reading pixel data of the two images, adding the pixel values ​​at the same position thereof, and when the added pixel value is greater than 255, setting it to 255;

[0091] S53: extracting all contours in the superimposed image and storing them in a set form, wherein each contour includes a coordinate vector of contour pixels; specifically, the contour extraction algorithm logic is: retrieving all contours, but not establishing a hierarchical relationship between contours, and saving all continuous contour points on the image boundary;

[0092] S54: Calculate the area of ​​each contour using Green's formula; specifically, the Green's formula theorem is: suppose that a closed region D is surrounded by a piecewise smooth simple curve L, and the functions P(x, y) and Q(x, y) have first-order continuous partial derivatives on D, then:

[0093]

[0094] Where: L is the positive boundary curve of D;

[0095] This formula can be used to calculate the area of ​​irregular surfaces.

[0096] S55: Add the area of ​​each contour to obtain the area of ​​the image overlapping contour region.

[0097] In some embodiments, after the step S7 of outputting the time pointed by the pointer in the clock pointer template picture with the largest image overlapping contour area, the step includes:

[0098] S8: Annotate and store the clock image verification code image to be identified according to the time pointed to by the pointer in the clock pointer template image with the largest image overlapping contour area.

[0099] As described in step S8 above, the clock image verification code image is labeled and named according to the identified time and stored in a designated folder. The naming method can be the format of the identified time plus an English underscore and a random string, such as Figure 5 shown.

[0100] The above-mentioned embodiment facilitates the subsequent regular inspection or statistics of the accuracy of the recognition result of the present invention, such as: manual verification or other image recognition methods for inspection or statistics.

[0101] Reference Figure 6 The present invention also provides a clock image verification code recognition system, comprising:

[0102] A receiving module, used for receiving a clock image verification code image to be identified from a data collection target website;

[0103] An image parameter information extraction module is used to obtain the image parameter information of the clock image verification code image to be identified, wherein the image parameter information includes: the width and height of the image, the width and length of the hour hand, and the width and length of the minute hand;

[0104] A template group generation module, used to generate clock pointer template images of all times in a binary manner according to the image parameter information, and to name the clock pointer template images respectively using the time pointed to by the clock pointer and save them in the same clock pointer template group;

[0105] A processing module, used for sequentially performing grayscale and binarization processing on the clock image verification code picture to be identified;

[0106] A superposition calculation module, used to superimpose the processed clock image verification code picture to be identified with the clock pointer template pictures in the clock pointer template group of the corresponding picture parameter information in sequence and calculate the area of ​​the image overlapping contour region;

[0107] A comparison module, used for comparing and obtaining a clock pointer template image with the largest overlapping contour area of ​​the image;

[0108] The output module outputs the time pointed by the pointer in the clock pointer template image with the largest overlapping contour area of ​​the image.

[0109] In some embodiments, the clock image verification code recognition system further includes:

[0110] A judging module, used for judging whether the picture parameter information of the clock image verification code to be identified is the same as the picture parameter information of the generated clock pointer template group;

[0111] The storage module is used to label, name and store the clock image verification code image to be identified according to the time pointed to by the pointer in the clock pointer template image with the largest image overlapping contour area.

[0112] Reference Figure 7 In an embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a storage medium and an internal memory. The storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store clock image verification code images and clock pointer template groups, etc. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the clock image verification code recognition method described in any of the above embodiments can be implemented.

[0113] Those skilled in the art will understand that Figure 7 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.

[0114] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the clock image verification code recognition method described in any of the above embodiments can be implemented.

[0115] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0116] In the description of the present invention, it is necessary to understand that the terms "middle", "length", "up", "down", "front", "back", "vertical", "horizontal", "inside", "outside", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0117] In the present invention, unless otherwise clearly specified and limited, the first feature "on" the second feature may be that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. "Multiple" means at least two, such as two, three, etc., unless otherwise clearly and specifically limited.

[0118] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection, an electrical connection, or communication with each other; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0119] The above is only for explaining the implementation mode of the present invention and is not intended to limit the present invention. For those skilled in the art, any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention without creative work should be included in the protection scope of the present invention.

Claims

1. A clock image verification code recognition method, It is characterized in that include: Receive the clock image verification code image to be identified from the data collection target website; Obtaining the image parameter information of the clock image verification code image to be identified, wherein the image parameter information includes: the width and height of the image, the width and length of the hour hand, and the width and length of the minute hand; Generating clock pointer template images of all times in a binary manner according to the image parameter information, and naming the clock pointer template images respectively using the time pointed by the clock pointer and saving them in the same clock pointer template group; The clock image verification code picture to be identified is subjected to grayscale and binarization processing in sequence; The processed clock image verification code image to be identified is sequentially superimposed with the clock pointer template images in the clock pointer template group of the corresponding image parameter information, and the area of ​​the image overlapping contour region is calculated; By comparison, the clock pointer template image with the largest overlapping contour area is obtained; Output the time pointed by the pointer in the clock pointer template image with the largest overlapping contour area of ​​the image, Wherein, after the step of obtaining the picture parameter information of the clock image verification code picture to be identified, the following steps are included: Determine whether the image parameter information of the clock image verification code to be identified is the same as the image parameter information of the generated clock pointer template group; If not, the step of generating clock pointer template images of all times in a binary manner according to the image parameter information, and naming the clock pointer template images respectively using the time pointed to by the clock pointer and saving them in the same clock pointer template group is executed; If yes, directly execute the steps of sequentially graying and binarizing the clock image verification code picture to be identified.

2. The clock image verification code recognition method according to claim 1, It is characterized in that The step of generating clock pointer template images of all times in a binary manner according to the image parameter information, and naming the clock pointer template images respectively using the time pointed to by the clock pointer and saving them in the same clock pointer template group includes: Generate a base image of the clock pointer template image using the width value and the height value of the clock image verification code image to be identified; Draw the clock face using a white background; Draw a black clock minute hand according to the minute hand width and minute hand length of the clock image verification code picture to be identified; Draw a black clock hour hand according to the hour hand width and hour hand length of the clock image verification code picture to be identified.

3. The clock image verification code recognition method according to claim 1, It is characterized in that The step of sequentially graying and binarizing the clock image verification code picture to be identified comprises: Obtaining pixel data information of the clock image verification code picture to be identified; Use weighted average algorithm to process the grayscale of each pixel acquired; The grayscale processed image is binarized, where the threshold is set to 180-200. When the pixel value is greater than the threshold, it is set to 255, otherwise it is set to 0.

4. The clock image verification code recognition method according to claim 1, It is characterized in that The step of sequentially superimposing the processed clock image verification code image to be identified with the clock pointer template images in the clock pointer template group corresponding to the image parameter information and calculating the area of ​​the image overlapping contour region includes: Obtaining pixel data information of both the processed clock image verification code picture to be identified and the clock pointer template picture; Adding pixel values ​​of the same position of the processed clock image verification code image to be identified and the clock pointer template image according to the pixel information to generate a superimposed image; Extracting all contours in the superimposed image and storing them in a set form, wherein each contour includes a coordinate vector of a contour pixel; Calculate the area of ​​each contour using Green's formula; The area of ​​each contour is added together to obtain the area of ​​the overlapping contour region of the image.

5. The clock image verification code recognition method according to claim 1, It is characterized in that After the step of outputting the time pointed by the pointer in the clock pointer template picture with the largest image overlapping contour area, the step includes: The clock image verification code image to be identified is labeled, named and stored according to the time pointed to by the pointer in the clock pointer template image with the largest image overlapping contour area.

6. A clock image verification code recognition system, It is characterized in that include: A receiving module, used for receiving a clock image verification code image to be identified from a data collection target website; An image parameter information extraction module is used to obtain the image parameter information of the clock image verification code image to be identified, wherein the image parameter information includes: the width and height of the image, the width and length of the hour hand, and the width and length of the minute hand; A template group generation module, used to generate clock pointer template images of all times in a binary manner according to the image parameter information, and to name the clock pointer template images respectively using the time pointed to by the clock pointer and save them in the same clock pointer template group; A processing module, used for sequentially performing grayscale and binarization processing on the clock image verification code picture to be identified; A superposition calculation module, used to superimpose the processed clock image verification code picture to be identified with the clock pointer template pictures in the clock pointer template group of the corresponding picture parameter information in sequence and calculate the area of ​​the image overlapping contour region; A comparison module, used for comparing and obtaining a clock pointer template image with the largest overlapping contour area of ​​the image; An output module, outputting the time pointed by the pointer in the clock pointer template image with the largest overlapping contour area of ​​the image; The judging module is used to judge whether the image parameter information of the clock image verification code to be identified is the same as the image parameter information of the generated clock pointer template group.

7. The clock image verification code recognition system according to claim 6, further comprising: include: The storage module is used to label, name and store the clock image verification code image to be identified according to the time pointed to by the pointer in the clock pointer template image with the largest image overlapping contour area.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the clock image verification code recognition method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the clock image verification code recognition method according to any one of claims 1 to 5 are implemented.