Method, system and device for rapid red seal detection of bill images
Through the method based on color separation and connected domain detection, multi-color spatial features in the ticket image are extracted and SVM classifier is used, combining morphological expansion and connected domain marking, the real-time nature caused by the dependence of candidate boxes of the existing red chapter detection method is solved. and accuracy issues, achieving rapid and accurate detection of the red chapter.
Patent Information
- Application Number
- CN202010644890.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-07
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2040-07-07
AI Technical Summary
The existing red seal detection methods rely heavily on candidate boxes, resulting in poor real-time and accuracy of detection. Especially when the size and shape of the red seal change greatly, it is difficult to quickly respond to new seals.
Using a method based on color separation and connected domain detection, the multi-color spatial characteristics of each pixel point in the ticket image are extracted, and the pre-trained SVM classifier is used to classify, and the width of the connected domain is determined by combining morphological expansion and connected domain marking. Whether the height and aspect ratio are within the set threshold range can achieve rapid detection of the red chapter.
It improves the real-time and accuracy of red seal detection, reduces the dependence on candidate boxes, and can quickly and accurately detect red seals in various types of bill images, which is of great significance for bill identification and layout analysis.
Smart Images

Figure CN111797830B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing and text recognition, and in particular relates to a method, system and device for rapid red seal detection of bill images. Background Art
[0002] The text in the bill image can express rich financial information, while the traditional manual entry of financial information is slow, has a high error rate, and requires a lot of manpower and material resources. In recent years, the craze for artificial intelligence has been growing, and related technologies such as image processing, pattern recognition, and computer vision have also developed rapidly, and intelligent reimbursement systems have gradually emerged.
[0003] With the continuous development of society, the demand for automatic detection and recognition of text in bill images in intelligent reimbursement systems is increasing. Document recognition technology has great economic benefits and broad social value. Text recognition technology can realize high-speed and automatic input of text information, saving a lot of human resources. Among them, red seals are widely present in various bill images, involving various fields such as transportation, finance, logistics, taxation, and administrative management. However, there are many types of bill images, and the positions and sizes of seals are random, which seriously affects the subsequent layout analysis and character recognition of bill images. Therefore, the detection of red seals is of great significance for the rapid recognition of subsequent bill images. At the same time, the red seals in bills also play a key role in the identification of bill images. Therefore, how to accurately and effectively detect red seals plays a key role in the intelligent entry of bills.
[0004] Existing red seal detection methods mainly detect seals by classifying candidate frames. When there are many candidate frames, the detection accuracy is improved, but the presence of a large number of candidate frames slows down the detection speed; when reducing the candidate frames to increase the speed, it is difficult to ensure the accuracy of the detection, which is heavily dependent on the number of candidate frames. In addition, the size and shape of red seals in images vary greatly, and it is difficult to set candidate frames. The classification of candidate frames requires a large number of samples, and it is difficult to respond quickly to the emergence of new types of seals.
[0005] Therefore, the present invention proposes a fast red seal detection method for bill images based on color separation and connected domain detection. Summary of the invention
[0006] In order to solve the above problems in the prior art, that is, to solve the problem that the existing red seal detection method is heavily dependent on the candidate frame and the setting of the candidate frame is difficult, resulting in poor detection real-time and accuracy, the first aspect of the present invention proposes a method for fast red seal detection of bill images, the method comprising:
[0007] Step S100, obtaining a bill image to be detected as an input image;
[0008] Step S200, extracting multi-color space features of each pixel in the input image; the multi-color space features include Lab color features, HSV color features, and RGB color features;
[0009] Step S300, based on the multi-color space features of each pixel, the pixels are classified by a pre-trained SVM classifier to obtain a classification result map of the red seal pixel points as a first result map;
[0010] Step S400, morphologically dilating the first result graph and marking connected domains;
[0011] Step S500, for each marked connected domain, determine in turn whether its width, height, and aspect ratio are within a set threshold range. If so, output its position in the input image and its corresponding first result map as the detection result.
[0012] In some preferred embodiments, in step S300, “classifying pixels by a pre-trained SVM classifier to obtain a classification result map of red seal pixels” is performed as follows:
[0013] For the input image, based on the multi-color space features of each pixel of the input image and the linear parameters learned by the pre-trained SVM classifier, a corresponding predicted image is obtained;
[0014] Each pixel in the predicted image is normalized, and it is determined whether the normalized result is greater than or equal to a set threshold. If so, the corresponding classification result map is marked as 1 as a red seal pixel.
[0015] In some preferred implementations, the method of “normalizing the predicted image of each pixel” is as follows:
[0016]
[0017] Among them, y (i,j) Represents the predicted image Y Img The pixel value at the coordinate (i, j), min(y) represents Y Img The minimum pixel value in, max(y) represents Y Img The maximum pixel value, M (i,j) Represents the pixel value of the normalized predicted image at (i, j).
[0018] In some preferred implementations, the method of "performing morphological expansion on the first result image" in step S400 is:
[0019] Binarizing the first result image;
[0020] The first binarized result image is scaled to a set size using the nearest neighbor difference method, and morphologically expanded using a rectangular kernel.
[0021] In some preferred embodiments, the method for marking the connected domain in step S400 is: using a run-based marking method to extract the connected domain.
[0022] In some preferred embodiments, in step S500, "for each marked connected domain, sequentially determining whether its width, height, and aspect ratio are within a set threshold range" is performed as follows:
[0023] 0.1*H<h<0.6*H
[0024] 0.1*W<w<0.6*W
[0025] 1 / 3<w / h<3
[0026] Among them, w and h represent the width and height of the connected domain of each mark, and W and H represent the width and height of the bill image to be detected.
[0027] In a second aspect of the present invention, a fast red seal detection system for bill images is proposed, the system comprises an image acquisition module to be detected, a multi-color space feature extraction module, a classification module, a connected domain marking module, and an output module;
[0028] The to-be-detected image acquisition module is configured to acquire the to-be-detected bill image as an input image;
[0029] The multi-color space feature extraction module is configured to extract the multi-color space features of each pixel in the input image; the multi-color space features include Lab color features, HSV color features, and RGB color features;
[0030] The classification module is configured to classify the pixels based on the multi-color space features of each pixel through a pre-trained SVM classifier to obtain a classification result map of the red seal pixel as the first result map;
[0031] The connected domain marking module is configured to perform morphological expansion on the first result graph and perform connected domain marking;
[0032] The output module is configured to determine whether the width, height, and aspect ratio of each marked connected domain are within a set threshold range in turn. If so, its position in the input image and its corresponding first result image are output as the detection result.
[0033] According to a third aspect of the present invention, a storage device is provided, in which a plurality of programs are stored. The programs are loaded and executed by a processor to implement the above-mentioned method for rapid red seal detection on bill images.
[0034] The fourth aspect of the present invention proposes a processing device, including a processor and a storage device; the processor is suitable for executing various programs; the storage device is suitable for storing multiple programs; the program is suitable for being loaded and executed by the processor to implement the above-mentioned method for rapid red seal detection of bill images.
[0035] Beneficial effects of the present invention:
[0036] The present invention improves the real-time performance and accuracy of red seal detection. The present invention realizes the separation of the red seal from other parts in the bill data by extracting the color features of the multi-color space of each pixel in the bill image and classifying it through a classifier. Based on the classification result graph, the corresponding connected domain of the red seal is obtained by extracting the connected domain, and the size of the obtained connected domain is screened to finally obtain the red seal detection frame in the bill data, which reduces the dependence on the number of candidate frames and can quickly and accurately detect the red seal in the bill image. Moreover, the method is applicable to various types of bill images, which is of great significance for the later bill counterfeiting, bill layout analysis and bill recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings.
[0038] Figure 1 It is a flow chart of a method for rapid red seal detection of bill images according to an embodiment of the present invention;
[0039] Figure 2 It is a schematic diagram of the framework of a system for rapid red seal detection of bill images according to an embodiment of the present invention;
[0040] Figure 3 It is a detailed flow chart of a method for rapid red seal detection of bill images according to an embodiment of the present invention;
[0041] Figure 4 This is an example diagram of an invoice image containing a seal according to an embodiment of the present invention;
[0042] Figure 5 This is an example diagram of a seal image used for training annotated SVM algorithm according to an embodiment of the present invention;
[0043] Figure 6 This is an example diagram of a classification result diagram of an embodiment of the present invention;
[0044] Figure 7 is a schematic diagram of a detection result of a seal position in a bill image according to an embodiment of the present invention;
[0045] Figure 8This is an example diagram of a seal position and a classification result diagram obtained in an embodiment of the present invention;
[0046] Fig. 9 It is a schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0049] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application may be combined with each other.
[0050] The method for fast red seal detection of bill images of the present invention is as follows: Figure 1 As shown, the following steps are included:
[0051] Step S100, obtaining a bill image to be detected as an input image;
[0052] Step S200, extracting multi-color space features of each pixel in the input image; the multi-color space features include Lab color features, HSV color features, and RGB color features;
[0053] Step S300, based on the multi-color space features of each pixel, the pixels are classified by a pre-trained SVM classifier to obtain a classification result map of the red seal pixel points as a first result map;
[0054] Step S400, morphologically dilating the first result graph and marking connected domains;
[0055] Step S500, for each marked connected domain, determine in turn whether its width, height, and aspect ratio are within a set threshold range. If so, output its position in the input image and its corresponding first result map as the detection result.
[0056] In order to more clearly illustrate the method for rapid red seal detection of bill images of the present invention, each step in an embodiment of the method of the present invention will be described in detail below with reference to the accompanying drawings.
[0057] Step S100, obtaining a bill image to be detected as an input image.
[0058] In this embodiment, the receipt image to be detected can be obtained by photographing and uploading the receipt image by the user or by obtaining the receipt image from other means, such as Figure 4 As shown, the seal in the figure is a red seal. In order to comply with the provisions of the drawings in the patent, it is converted into a grayscale image.
[0059] Step S200, extracting multi-color space features of each pixel in the input image; the multi-color space features include Lab color features, HSV color features, and RGB color features.
[0060] In this embodiment, the color features of the multi-color space of each pixel in the acquired bill image, that is, the multi-color space features, are extracted. In the present invention, the Lab color space features, HSV color space features, and RGB color space features of each pixel in the bill image are preferably extracted, which are respectively expressed as (x L ,x a ,x b )、(x H ,x S ,x V )、(x R ,x G ,x B ), can also be concisely expressed as (L, a, b, H, S, V, R, G, B). Therefore, the multi-color space feature of each pixel in the bill image can be expressed as formula (1):
[0061] x=[x R ,x G ,x B ,x L ,x a ,x b ,x H ,x S ,X V ] T (1)
[0062] Among them, x represents the multi-color space features of the pixel point, and T represents transposition.
[0063] Step S300, based on the multi-color space features of each pixel, the pixels are classified by a pre-trained SVM classifier to obtain a classification result map of the red seal pixels as a first result map.
[0064] In this embodiment, the SVM classifier is pre-trained first, and the training process is as follows:
[0065] Get a bill image with a red seal, mark the pixels on the red seal in the image as category 1, and the rest of the pixels as category 0, as training samples, such as Figure 5 As shown;
[0066] The linear SVM classifier is trained using training samples where pixels are labeled as red seal pixels. The linear classifier is shown in formula (2):
[0067] y=θx T (2)
[0068] Among them, θ represents the linear parameter learned by the SVM classifier, and y represents the result of pixel classification.
[0069] Based on the linear parameter θ obtained by pre-training, combined with the multi-color space feature X extracted from the bill image Img to be detected Img , the corresponding predicted image can be obtained through formula (3).
[0070] Y Img =θX Img T (3)
[0071] Among them, Y Img Represents the predicted image corresponding to the bill image to be detected.
[0072] The predicted image is normalized by formula (4) to obtain the red seal prediction probability map M.
[0073]
[0074] Among them, y (i,j) Represents Y Img The pixel value at the coordinate (i, j), min(y) represents Y Img The minimum pixel value in, max(y) represents Y Img The maximum pixel value, M (i,j) Represents the pixel value of the normalized prediction image at (i, j).
[0075] The red seal prediction probability map is compared with the set threshold Ω to obtain the preliminary classification result map (or classification map image) C of the red seal pixel points, as shown in Figure 6 , the comparison is shown in formula (5):
[0076]
[0077] Among them, C (i,j) Represents the classification result of the red seal prediction probability map M at (i, j).
[0078] Step S400: morphologically dilate the first result graph and mark connected regions.
[0079] In this embodiment, the classification result graph C is binarized and connected domains are extracted. In the present invention, a run-based labeling method is preferably used to implement 8-connected domain extraction. In other embodiments, other methods can also be selected to extract connected domains of different sizes according to actual conditions.
[0080] Considering the influence of image size on connected domain analysis and detection and considering computational efficiency, the size of the binarized image is first resized (adjusted, i.e. scaled) to a width of 800 pixels, and the resizing adopts nearest neighbor interpolation. In order to fuse connected domains with a relatively close distance, the present invention preferably uses a rectangular core of size 3 to perform a morphological dilation operation on the resized classification result image, and then extracts the connected domain. The connected domain extraction process is shown in the figure as follows:
[0081] Step S411, scanning the first result image after morphological dilation processing line by line, and forming a sequence of continuous white pixels in each line as a domain, a start, an end point end and a line number where it is located;
[0082] Step S412, for all fields except the first row, if it has no overlapping area with all fields in the previous row, assign it a new label; if it has overlapping area with only one field in the previous row, assign it the label of the field in the previous row; if it has overlapping area with more than two fields in the previous row, assign the current field the minimum label of the connected fields (the fields that overlap with the current field), and write the labels of these fields in the previous row into an equivalent pair, indicating that they belong to the same category;
[0083] Step S413, convert the equivalent pairs into equivalent sequences, each sequence needs to be given the same label, because they are all equivalent. Starting from 1, give each equivalent sequence a label;
[0084] Step S414, fill the label of each domain into the label image (an image with the same size as the first result image after expansion) to complete the connected domain labeling.
[0085] Step S500, for each marked connected domain, determine in turn whether its width, height, and aspect ratio are within a set threshold range. If so, output its position in the input image and its corresponding first result map as the detection result.
[0086] In this embodiment, the connected domain of the red seal is first determined. Because the size of the red seal in the bill meets a certain aspect ratio, the size of the red seal in the image is also within a certain range. The present invention is aimed at detecting the red seal in various bill images, and the specific screening criteria used are shown in formulas (6), (7), and (8):
[0087] 0.1*H<h<0.6*H (6)
[0088] 0.1*W<w<0.6*W (7)
[0089] 1 / 3<w / h<3 (8)
[0090] Among them, W, H are the height and width of the bill image to be detected, and w, h are the width and height of the marked connected domain.
[0091] The specific screening process is as follows Figure 3 As shown, i is a natural number, indicating a subscript, and N is the number of marked connected domains.
[0092] Based on the connected domain that meets the screening criteria, its position in the image to be detected is saved, and finally the red seal position and the classification result map of the red seal pixels are output. Figure 7 is the position of the red seal detected in the bill image, Figure 8 This is the final classification result diagram of the red seal position and red seal pixel points.
[0093] A second embodiment of the present invention is a bill image rapid red seal detection system, such as Figure 2 As shown, it includes: an image acquisition module 100 to be detected, a multi-color space feature extraction module 200, a classification module 300, a connected domain marking module 400, and an output module 500;
[0094] The to-be-detected image acquisition module 100 is configured to acquire a to-be-detected bill image as an input image;
[0095] The multi-color space feature extraction module 200 is configured to extract the multi-color space features of each pixel in the input image; the multi-color space features include Lab color features, HSV color features, and RGB color features;
[0096] The classification module 300 is configured to classify the pixels based on the multi-color space features of each pixel through a pre-trained SVM classifier to obtain a classification result map of the red seal pixel as a first result map;
[0097] The connected domain marking module 400 is configured to perform morphological expansion on the first result graph and perform connected domain marking;
[0098] The output module 500 is configured to determine whether the width, height, and aspect ratio of each marked connected domain are within a set threshold range in turn. If so, its position in the input image and its corresponding first result image are output as the detection result.
[0099] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0100] It should be noted that the bill image rapid red seal detection system provided in the above embodiment is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be decomposed or combined. For example, the modules in the above embodiments can be combined into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps, and are not regarded as improper limitations on the present invention.
[0101] A storage device according to a third embodiment of the present invention stores a plurality of programs, wherein the programs are suitable for being loaded by a processor and implementing the above-mentioned method for rapid red seal detection on bill images.
[0102] A processing device according to the fourth embodiment of the present invention comprises a processor and a storage device; the processor is suitable for executing various programs; the storage device is suitable for storing multiple programs; the programs are suitable for being loaded and executed by the processor to implement the above-mentioned method for rapid red seal detection of bill images.
[0103] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of the storage device and processing device described above can refer to the corresponding process in the aforementioned method example and will not be repeated here.
[0104] Reference below Fig. 9 It shows a schematic diagram of the structure of a computer system of a server suitable for implementing the method, system, and device embodiments of the present application. Fig. 9 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0105] like Fig. 9As shown, the computer system includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage part 908 to the random access memory (RAM) 903. In the RAM 903, various programs and data required for system operation are also stored. The CPU 901, ROM 902 and RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0106] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read therefrom is installed into the storage section 908 as needed.
[0107] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the method of the present application are executed. It should be noted that the above-mentioned computer-readable medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus or a device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0108] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0109] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0110] The terms "first", "second", etc. are used to distinguish similar objects rather than to describe or indicate a particular order or sequence.
[0111] The term "comprise" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that includes a list of elements includes not only those elements but also other elements not expressly listed, or also includes elements inherent to such process, method, article, or apparatus / device.
[0112] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. A method for rapid red seal detection of bill images, characterized in that: The method includes: Step S100, obtaining a bill image to be detected as an input image; Step S200, extracting multi-color space features of each pixel in the input image; the multi-color space features include Lab color features, HSV color features, and RGB color features; Step S300, based on the multi-color space features of each pixel, the pixels are classified by a pre-trained SVM classifier to obtain a classification result map of the red seal pixel points as the first result map: For the input image, based on the multi-color space features of each pixel and the linear parameters learned by the pre-trained SVM classifier, the corresponding predicted image is obtained: Y Img =θX Img T Among them, Y Img represents the predicted image corresponding to the bill image to be detected, θ represents the linear parameter learned by the SVM classifier, X Img Represents multi-color space features; Normalize each pixel in the predicted image, and determine whether the normalized result is greater than or equal to a set threshold. If so, mark the corresponding classification result map as 1 as a red seal pixel; Step S400, morphologically dilating the first result graph and marking connected domains; Step S500, for each marked connected domain, determine in turn whether its width, height, and aspect ratio are within a set threshold range. If so, output its position in the input image and its corresponding first result map as the detection result.
2. The method for rapid red seal detection of bill images according to claim 1 is characterized in that: "Performing normalization processing on each pixel in the predicted image", the method is: Among them, y (i,j) Represents the predicted image Y Img The pixel value at the coordinate (i, j), min(y) represents Y Im The minimum pixel value in, max(y) represents Y Img The maximum pixel value, M (i,j) Represents the normalized pixel value of the predicted image at (i, j).
3. The method for rapid red seal detection of bill images according to claim 1 is characterized in that: In step S400, the method of "performing morphological expansion on the first result image" is as follows: Binarizing the first result image; The first binarized result image is scaled to a set size using the nearest neighbor difference method, and morphologically expanded using a rectangular kernel.
4. The method for rapid red seal detection of bill images according to claim 1 is characterized in that: The method for marking the connected domain in step S400 is: using a run-based marking method to extract the connected domain.
5. The method for rapid red seal detection of bill images according to claim 1 is characterized in that: In step S500, "for each marked connected domain, determine in turn whether its width, height, and aspect ratio are within the set threshold range", the method is: 0.1*H <h<0.6*H 0.1*W <w<0.6*W 1 / 3 <w / h<3 Among them, w and h represent the width and height of the connected domain of each mark, and W and H represent the width and height of the bill image to be detected.
6. A bill image rapid red seal detection system, characterized in that: The system includes: an image acquisition module to be detected, a multi-color space feature extraction module, a classification module, a connected domain marking module, and an output module; The to-be-detected image acquisition module is configured to acquire the to-be-detected bill image as an input image; The multi-color space feature extraction module is configured to extract the multi-color space features of each pixel in the input image; the multi-color space features include Lab color features, HSV color features, and RGB color features; The classification module is configured to classify the pixels based on the multi-color space features of each pixel through a pre-trained SVM classifier to obtain a classification result map of the red seal pixel as the first result map: For the input image, based on the multi-color space features of each pixel and the linear parameters learned by the pre-trained SVM classifier, the corresponding predicted image is obtained: Y Img =θX Img T Among them, Y Img represents the predicted image corresponding to the bill image to be detected, θ represents the linear parameter learned by the SVM classifier, X Img Represents multi-color space features; Normalize each pixel in the predicted image, and determine whether the normalized result is greater than or equal to a set threshold. If so, mark the corresponding classification result map as 1 as a red seal pixel; The connected domain marking module is configured to perform morphological expansion on the first result graph and perform connected domain marking; The output module is configured to determine whether the width, height, and aspect ratio of each marked connected domain are within a set threshold range in turn. If so, its position in the input image and its corresponding first result image are output as the detection result.
7. A storage device storing a plurality of programs, characterized in that: The program application is loaded and executed by a processor to implement the method for rapid red seal detection of bill images as described in any one of claims 1-5.
8. A processing device, comprising a processor and a storage device; the processor is adapted to execute each program; the storage device is adapted to store a plurality of programs; characterized in that: The program is suitable for being loaded and executed by a processor to implement the method for rapid red seal detection of bill images as described in any one of claims 1-5.
