Symbol recognition system and device based on election

Through deep convolutional neural networks and normalized cross-correlation template matching technology, the accuracy and robustness problems in paper ballot recognition are solved, and efficient and accurate ballot recognition and counting are achieved, which is suitable for a variety of election scenarios.

CN120635910APending Publication Date: 2025-09-12HUAYUN (HEBEI XIONGAN) BIG DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510705957.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing technologies have low accuracy and poor adaptability in paper ballot recognition, especially when dealing with handwritten marks, non-standard symbols or fuzzy overlapping symbols, and lack robustness against ballot rotation or slight misalignment, leading to counting errors.

Method used

A symbol recognition algorithm based on deep convolutional neural networks is used, combined with normalized cross-correlation template matching and data enhancement technology to achieve automated processing and counting of ballot images, including image preprocessing, marked area positioning, symbol recognition and validity judgment, and supports multiple image preprocessing strategies and template configurations.

Benefits of technology

It achieves high recognition accuracy in complex marking situations and adapts to ballots of different formats and layout structures, significantly improving the fairness and transparency of elections, reducing labor costs, and is suitable for large-scale election tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635910A_ABST
    Figure CN120635910A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition and intelligent election, and particularly discloses an election-based symbol recognition system and device. The system comprises an image acquisition module, an image preprocessing module, a marked area positioning module, a symbol recognition module, a validity judgment module and a statistical output module. The system extracts symbol marking areas corresponding to candidates by collecting paper vote images, and classifies and identifies typical symbols such as' X ',' V ',' 0 'and the like by adopting a deep neural network model. Whether the votes are valid or not is further judged in combination with the recognition probability and the vote structure logic, and real-time statistical summarization is conducted on valid vote results. The method has the advantages of being high in recognition precision, high in processing speed, high in adaptability and the like, is suitable for various paper vote scenes such as work meeting election, democratic appraisal and questionnaire voting, and achieves automation and intelligentization of election recognition and statistics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition and intelligent election technology, and in particular to an election-based symbol recognition system and device. Background Art

[0002] Paper ballots are still widely used in various democratic elections, questionnaires, and voting for performance appraisals. Traditional manual ballot counting suffers from inefficiency, error-proneness, and high costs. Accuracy and timeliness are particularly difficult to guarantee when there are large numbers of ballots or a small number of operators. Therefore, developing a system that can automatically identify ballot content and tally the results has become a key goal for improving the fairness and intelligence of elections.

[0003] Currently, some ballot recognition methods based on optical character recognition (OCR) or general image recognition algorithms have been tried and applied, but most methods have low accuracy when dealing with handwritten marks, non-standard symbols, or blurred and overlapping symbols. In addition, some systems are only applicable to fixed layouts or specific symbol types, lacking specialized optimization for common symbols such as "×", "√", and "○", making it difficult to adapt to the diverse marking methods used in actual voting. At the same time, existing systems often lack the ability to robustly recognize the location of the marked area. Once the ballot is rotated or slightly misaligned, it may lead to recognition failure or vote counting errors.

[0004] Traditional symbol recognition algorithms rely heavily on rule-based approaches like contour extraction and geometric feature matching, which are ineffective against complex scribbles, overlapping handwriting, or distorted handwriting. While deep learning has made significant progress in image classification in recent years, its application to fine-grained symbol recognition on paper ballots still faces challenges such as insufficient training samples, significant recognition ambiguity, and high model deployment costs. A mature, universal engineering solution has yet to be developed.

[0005] Therefore, there is an urgent need for an intelligent recognition system that is oriented towards the actual ballot structure and supports automatic recognition of typical handwritten or drawn symbols such as ×, √, ○, etc. It can accurately judge voting intentions under complex marking conditions, and at the same time has flexible template adaptability and efficient statistical capabilities, thereby meeting the recognition and counting needs in different election scenarios.

[0006] In response to the above problems, an election machine based on a one-time multiple-vote recognition system is urgently needed to solve these problems. Summary of the Invention

[0007] The purpose of the present invention is to solve the existing technical problems raised in the above background technology, and to provide an election machine based on a one-time multiple-vote recognition system.

[0008] The present invention achieves the above-mentioned object through the following scheme:

[0009] An election-based symbol recognition system comprising:

[0010] Image acquisition module, used to collect the ballot image to be identified I raw (x,y), where x,y are image space coordinates in pixels;

[0011] An image preprocessing module is used to process the image I raw Process and obtain the grayscale image I g (x,y), binary image I b (x,y), and complete noise elimination and geometric distortion correction;

[0012] The marking region positioning module is used to locate the image I b N candidate marking regions R are detected in (x,y) i ,i=1,2,…,N,each R i is the image sub-region;

[0013] Symbol recognition module, used for each marked area R i Image sub-block S within i (x,y) is classified to get the symbol type And output the confidence P i ∈[0,1];

[0014] Validity judgment module, used to judge the validity of all C i With P i Determine the validity of the ballot and output the flag variable V∈{0,1};

[0015] Statistical output module, used to count the number N of each symbol category in all valid ballots k ,in and the total number of votes T for each candidate j , where j is the candidate number.

[0016] As a preferred technical solution of the present invention, the image preprocessing module includes:

[0017] Grayscale conversion, according to the following formula I raw (x,y) is converted to grayscale image I g (x,y):

[0018] I g (x,y)=0.299R(x,y)+0.587G(x,y)+0.114B(x,y)

[0019] Where R, G, B are the RGB components of the color image, without units, and the output grayscale I g The range is [0,255];

[0020] Gaussian filtering denoising:

[0021] in σ is the Gaussian standard deviation, which controls the degree of smoothing.

[0022] As a preferred technical solution of the present invention, the marker region positioning module implements template matching by a normalized mutual correlation coefficient method, and the correlation coefficient formula is:

[0023]

[0024] Where: T(i,j): pixel value of the template image, in grayscale; Average gray value of template image; Matching area mean; C(x,y)∈[-1,1]: correlation score, unitless.

[0025] As a preferred technical solution of the present invention, the symbol recognition module uses a convolutional neural network for multi-category classification. The input image is Output class probability vector in:

[0026]

[0027] in is the original score (logit) output by the neural network; is the probability of the corresponding category, unitless, satisfying

[0028] As a preferred technical solution of the present invention, the training loss function of the neural network is a cross entropy loss function, which is defined as follows:

[0029]

[0030] in: One-hot encoding of the true label; The model's predicted probability for the kth class; The loss value of the i-th sample, unitless.

[0031] As a preferred technical solution of the present invention, the validity judgment module adopts the following logical judgment rules:

[0032]

[0033] Where: 1: indicator function; θ: confidence threshold, usually θ = 0.8; V∈{0,1}: vote validity label.

[0034] As a preferred technical solution of the present invention, the statistical output module counts the total number of occurrences N of each category according to the following formula: k :

[0035]

[0036] Among them: M: total number of votes, C i : The symbol category selected in the i-th ticket; N k : The number of occurrences of category k, in units of sheets.

[0037] As a preferred technical solution of the present invention, the system also includes a symbol data enhancement module, which rotates (±15°), scales (±10%), perturbs the brightness (±20 grayscale values), and adds Gaussian noise to the original samples to improve recognition robustness during training.

[0038] As a preferred technical solution of the present invention, the system can run on an embedded device with a GPU and support online configuration and model update of ballot format templates.

[0039] The present invention also provides a symbol recognition device constructed based on the symbol recognition system, including a processor, an image acquisition unit, a memory and a software system. The software system is configured to perform the entire process of image acquisition, preprocessing, area extraction, symbol recognition, ballot judgment and statistical output to realize automatic symbol recognition and vote counting analysis of ballot images.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The present invention adopts a symbol recognition algorithm based on a deep convolutional neural network, and specifically performs model training and optimization for typical voting symbols such as "×", "√" and "○". It has extremely strong feature extraction and discrimination capabilities, and can maintain high recognition accuracy when the symbols are written in an irregular manner, are skewed, overlapped, or altered. It is significantly better than traditional geometric matching or template recognition methods.

[0042] This invention automatically locates marked areas on ballots through normalized cross-correlation template matching. It supports ballot templates of varying formats and layouts, demonstrating excellent versatility. The system also supports a variety of image preprocessing strategies, such as adaptive binarization and morphological noise reduction, effectively addressing complex acquisition environments such as image tilt, uneven lighting, and background interference, improving the system's overall robustness and adaptability.

[0043] The system integrates validity judgment logic and vote counting modules, automatically determining the validity of each ballot and performing real-time statistical analysis of various symbols. The entire process supports batch recognition and parallel processing, resulting in rapid vote counting without manual intervention. It is suitable for large-scale, high-intensity elections, significantly reducing labor costs and improving election fairness and transparency. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1 It is a system block diagram of an election-based symbol recognition system of the present invention. DETAILED DESCRIPTION

[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0047] See Figure 1 The present invention provides an election-based symbol recognition system and device for high-precision recognition and statistical analysis of common voting symbols "x", "√" and "o" in ballot images, ensuring that the vote counting process is efficient, accurate and automated.

[0048] The system includes image acquisition module, image preprocessing module, marking area positioning module, symbol recognition module, validity judgment module and statistical output module, and cooperates with corresponding device hardware and software systems to complete the overall function.

[0049] During the implementation process, the paper ballot to be identified is first scanned or photographed by the image acquisition module to obtain the original image I raw (x, y), where x and y represent pixel coordinates in pixels. The image is first processed by the image preprocessing module, and the processing flow includes grayscale conversion noise elimination and binarization. Grayscale conversion uses the weighted average formula to convert the RGB image into a grayscale image. g (x,y), that is:

[0050] I g(x,y)=0.299R(x,y)+0.587G(x,y)+0.114B(x,y)

[0051] In order to further improve the robustness of recognition, Gaussian filtering is applied to the grayscale image for smoothing. The two-dimensional Gaussian kernel used is as follows: The filtering result is recorded as I s (x, y), and then converted into a binary image I by a fixed threshold or adaptive method. b (x, y). Connected domain analysis and morphological processing are then used to remove interference noise from image edges and content to ensure stable subsequent processing.

[0052] After the image preprocessing is completed, it enters the marked area positioning module and uses template matching technology to b The present invention uses the normalized cross-correlation coefficient (NCC) as the matching score function to perform sliding matching between the predefined template T(i, j) and the candidate area in the image. The correlation calculation formula is:

[0053]

[0054] In the matching results, the rectangular area with a matching score higher than the threshold is selected as the candidate marking area R i , and extract the image sub-block S in the area i (x,y) enters the subsequent classification and recognition stage.

[0055] The symbol recognition module implements image classification tasks based on deep convolutional neural networks. The input is each The output is a probability vector representing the symbol category Satisfy the normalization conditions The probability value is calculated by the Softmax function as follows:

[0056]

[0057] in is the logit score of the neural network on category k. During the training process, the system takes the labeled samples as input and uses the cross entropy loss function:

[0058]

[0059] in To improve the generalization ability of the model, a data augmentation module is introduced during the training process to rotate (±15°) and scale (±10°) the original samples.

[0060] After classification, the system determines the validity of the entire ballot based on the recognition results. If there is only one symbol with a confidence level higher than a set threshold θ (e.g., 0.8) in all marked areas, and this symbol belongs to an optional category ("x," "√," and "o"), then the ballot is considered valid and recorded as V = 1. Otherwise, it is an invalid ballot and V = 0. The judgment logic is as follows:

[0061]

[0062] For all valid ballots, the system counts the recognized symbols and calculates the number N of each category. k and the total number of votes for each candidate, T j .

[0063] The category statistics are as follows:

[0064] Where M is the total number of valid votes, C i The symbol category identified for the i-th vote. The final statistical results and identification details are displayed through the data output module, which can output the vote count for each candidate and the total vote distribution in real time.

[0065] To achieve these functions, the device includes an image acquisition unit (such as an industrial camera or high-speed scanner), a processor, memory, and an embedded software system. The software system deploys these functional modules and supports interaction with the ballot template system, allowing different templates to be configured to accommodate different ballot formats. Furthermore, the system supports hot model updates and online parameter adjustment, ensuring that the model's accuracy and performance can be dynamically adjusted based on actual usage scenarios.

[0066] The system provided by the present invention has a compact structure, high recognition accuracy, and strong anti-interference ability. It is applicable to a variety of actual election scenarios such as village-level elections, student evaluations, anonymous questionnaires, etc., and has good versatility and practicality.

[0067] For example, a medium-sized enterprise is conducting a union election. The unit has 520 employees and three candidates. Each employee is required to select one candidate on a paper ballot. The corresponding mark is a preprinted circle (o), where employees can mark "√," "x," or re-circle "o" to indicate their voting intention. To achieve efficient recognition and automatic vote counting, this embodiment uses the election-based symbol recognition system and device of the present invention for ballot recognition and counting.

[0068] First, a high-speed scanner is used to batch collect paper ballot images. The size of each image is 2480×3508 pixels (A4 paper resolution 300dpi). The original image is recorded as I raw(x, y), the image acquisition module stores all images in the system file cache for subsequent processing calls, and the image preprocessing module first converts the original image into a grayscale image I g (x,y), using the weighted average formula:

[0069] I g (x,y)=0.299R(x,y)+0.587G(x,y)+0.114B(x,y)

[0070] Then, the image was filtered and denoised using a Gaussian kernel with a standard deviation of σ = 1.2 to remove the handwriting tail and scanning stripe interference. s (x,y) is binarized using an adaptive threshold algorithm (such as Otsu's method) to obtain a binary image I b (x),y).

[0071] During the template calibration phase, the system manually selects a standard ballot sample, marks the symbol pre-printed box area corresponding to each candidate, and exports the template image T(i,j) with a size of 80×80 pixels. The marked area positioning module uses the normalized cross-correlation coefficient (NCC) algorithm to search for the template position in each binary image. The matching score threshold is set to 0.75, and the corresponding sub-image S is extracted from the matched symbol area. i (x,y), the size is 64×64 pixels, and it is centered and normalized.

[0072] The symbol recognition module uses the ResNet18 convolutional neural network structure and is optimized with TensorRT and deployed on the Jetson AGX Orin edge computing platform. The model input is S i (x,y), the output is a symbol probability vector The training set comes from 5,000 manually annotated images of actual ballot symbols. Data augmentation methods include ±10° rotation, ±15% scaling, and Gaussian noise (mean 0, variance 25) superposition. The model training process uses the cross-entropy loss function and achieves a recognition accuracy of 96.4% on the validation set.

[0073] After extracting all symbol areas from each ballot, the system analyzes the confidence level of each symbol and sets a valid recognition threshold of θ = 0.85. If a ballot only recognizes a symbol in a location corresponding to a candidate, with a probability above the threshold and a symbol type of "√" or "x," the ballot is considered valid, and the system sets V = 1 and records the corresponding candidate number. If the confidence level of multiple marked areas exceeds the threshold simultaneously, or if the symbol is "x" or an unusual mixed shape, the system deems the ballot invalid and sets V = 0.

[0074] The final counting module counted all valid ballots, processed a total of 512 ballots, and identified 503 valid ballots (V=1), of which candidate A received 194 votes, candidate B received 177 votes, and candidate C received 132 votes. Another 9 ballots were marked as invalid due to altered symbols, confusion, or repeated ticks.

[0075] The system runs in less than four minutes, requiring no human intervention throughout the entire recognition and counting process. It also outputs detailed recognition logs and statistical reports, supporting PDF export and backend backup upload. The above examples demonstrate that the election-based symbol recognition system of the present invention boasts high accuracy, fast processing speed, and strong adaptability in processing, recognizing, and counting ballot images, making it suitable for a variety of symbol-based voting election scenarios.

[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. Election-based symbol recognition system, characterized in that include: Image acquisition module, used to collect the ballot image to be identified I raw (x,y), where x,y are image space coordinates in pixels; An image preprocessing module is used to process the image I raw Process and obtain the grayscale image I g (x,y), binary image I b (x,y), and complete noise elimination and geometric distortion correction; The marking region positioning module is used to locate the image I b Detect N candidate marking regions R in (x,y) i ,i=1,2,…,N,each R i is the image sub-region; Symbol recognition module, used for each marked area R i Image sub-block S within i (x,y) is classified to get the symbol type And output the confidence P i ∈[0,1]; Validity judgment module, used to judge the validity of all C i With P i Determine the validity of the ballot and output the flag variable V∈{0,1}; Statistics output module, used to count the number N of each symbol category in all valid ballots k ,in and the total number of votes T for each candidate j , where j is the candidate number.

2. The election-based symbol recognition system according to claim 1, characterized in that The image preprocessing module includes: Grayscale conversion, according to the following formula I raw (x,y) is converted to grayscale image I g (x,y): I g (x,y)=0.299R(x,y)+0.587G(x,y)+0.114B(x,y) Where R, G, B are the RGB components of the color image, without units, and the output grayscale I g The range is [0,255]; Gaussian filtering denoising: in The unit is pixel -2 ,σ is the Gaussian standard deviation, which controls the degree of smoothing.

3. The election-based symbol recognition system according to claim 1, characterized in that The marker region positioning module realizes template matching by using the normalized correlation coefficient method. The correlation coefficient formula is: Where: T(i,j): pixel value of the template image, in grayscale; Average gray value of template image; Matching area mean; C(x,y)∈[-1,1]: correlation score, unitless.

4. The election-based symbol recognition system according to claim 1, characterized in that The symbol recognition module uses convolutional neural network to perform multi-category classification. The input image is Output class probability vector in: in is the original score (logit) output by the neural network; is the probability of the corresponding category, unitless, satisfying 5. The election-based symbol recognition system according to claim 4, characterized in that The training loss function of the neural network is the cross entropy loss function, which is defined as follows: in: One-hot encoding of the true label; The model's predicted probability for the kth class; The loss value of the i-th sample, unitless.

6. The election-based symbol recognition system according to claim 1, characterized in that The validity judgment module adopts the following logical judgment rules: Where: 1: indicator function; θ: confidence threshold, usually θ = 0.8; V∈{0,1}: vote validity label.

7. The election-based symbol recognition system according to claim 1, characterized in that The statistical output module counts the total number of occurrences of each category N according to the following formula k : Among them: M: total number of votes, C i : The symbol category selected in the i-th ticket; N k : The number of occurrences of category k, in units of sheets.

8. The system according to claim 1, wherein: The system also includes a symbolic data enhancement module that rotates, scales, perturbs brightness, and adds Gaussian noise to the original samples to improve recognition robustness during training.

9. The election-based symbol recognition system according to claim 1, characterized in that The system can run on an embedded device with a GPU and supports online configuration of ballot format templates and model updates.

10. A symbol recognition device constructed based on the symbol recognition system described in any one of claims 1 to 9, comprising a processor, an image acquisition unit, a memory and a software system, wherein the software system is configured to perform the entire process of image acquisition, preprocessing, area extraction, symbol recognition, ballot judgment and statistical output to realize automatic symbol recognition and vote counting analysis of ballot images.