Certificate classification method and device based on jitter detection, equipment and storage medium

Through the intelligent terminal collecting jitter data for perspective correction and image enhancement processing, the problem of poor image blur detection effect in the prior art is solved, and efficient and accurate identification and classification of certificate images are achieved.

CN119295816APending Publication Date: 2025-01-10PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411358458.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

When the prior art deals with image blur caused by shooting jitter, it is impossible to take into account both image details and overall characteristics, resulting in poor blur optimization effects and difficult to meet efficient and accurate detection needs.

Method used

The intelligent terminal collects jitter data, calculates the degree of jitter, and performs perspective correction processing and image enhancement when the jitter degree is less than or equal to the preset threshold, and combines the certificate classification model completed to identify it to ensure image quality and recognition accuracy.

Benefits of technology

Improve image quality, maintain image details, ensure image clarity and accuracy, and improve blur optimization effect and recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295816A_ABST
    Figure CN119295816A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of artificial intelligence and financial science and technology, and relates to a certificate classification method based on jitter detection, which comprises the following steps: acquiring jitter data through a built-in sensor of an intelligent terminal while acquiring a to-be-classified certificate image through the intelligent terminal, and calculating the jitter degree according to the jitter data; and when the jitter degree is smaller than or equal to a preset jitter threshold value, performing perspective correction processing on the to-be-classified certificate image to obtain a corrected certificate image, performing image enhancement processing on the corrected certificate image to obtain an enhanced certificate image, and classifying the enhanced certificate image based on the certificate classification model. The invention further provides a certificate classification device and equipment based on jitter detection and a storage medium. In addition, the invention also relates to a block chain technology, and the to-be-classified certificate image can be stored in a block chain. The quality of the acquired certificate image can be improved, and the classification accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of artificial intelligence and financial technology, and in particular to a document classification method, device, equipment and storage medium based on jitter detection. Background Art

[0002] With the rapid development of mobile Internet technology, smartphones have become an indispensable tool in people's daily lives, especially in financial services, identity authentication, government services and other fields. Uploading sensitive information such as identity documents through mobile phones for verification has become a common and efficient way. However, in this process, image quality, especially clarity, has become a key factor affecting the efficiency and accuracy of subsequent information recognition and review.

[0003] At present, the widely used image upload mechanism in the market mainly relies on the built-in camera function of smartphones to obtain photos of ID cards, driver's licenses, etc. through automatic scanning or manual shooting. However, due to the variability of shooting environments (such as insufficient light, cluttered backgrounds), the instability of camera autofocus, and the natural shaking of users holding their phones, the ID photos taken often have varying degrees of blur. This blur not only reduces the visual quality of the image, but also poses a challenge to subsequent automated processing processes such as OCR (optical character recognition) technology and face recognition algorithms, directly affecting the accuracy of information recognition and the efficiency of the review process.

[0004] In response to the above problems, the prior art has tried to use classic image processing algorithms such as mean blur and Gaussian blur for image blur detection, but these methods often perform unsatisfactorily when dealing with blur caused by shooting shake. The mean blur algorithm smoothes the image by calculating the average value of pixels in the image area. Although it can suppress noise to a certain extent, it will also blur the image details and lacks sufficient distinction between slight blur caused by shaking and the texture features of the image itself. Gaussian blur calculates the weighted average of each pixel in the image and the pixels in its neighborhood through a Gaussian function. Although it can better preserve the overall characteristics of the image, it also has the problem of low accuracy when detecting subtle blur changes. The overall accuracy is often less than 40%, which is difficult to meet the needs of efficient and accurate detection of image blur in practical applications.

[0005] Therefore, developing a blur detection algorithm that can efficiently and accurately identify and distinguish image blur caused by shooting shake while maintaining effective retention and recognition of image details to improve blur optimization effect has become a technical problem that needs to be solved urgently. Summary of the invention

[0006] The purpose of the embodiments of the present application is to propose a document classification method, device, equipment and storage medium based on jitter detection to solve the technical problem in the prior art that image blur detection caused by jitter cannot take into account both image details and overall features, resulting in poor blur optimization effect.

[0007] In order to solve the above technical problems, the embodiment of the present application provides a document classification method based on jitter detection, which adopts the following technical solution:

[0008] Collecting the image of the document to be classified through the smart terminal, and obtaining the jitter data collected by the built-in sensor of the smart terminal;

[0009] Calculating the degree of jitter of the intelligent terminal according to the jitter data, and comparing the degree of jitter with a preset jitter threshold;

[0010] When the jitter degree is less than or equal to a preset jitter threshold, it is determined that the intelligent terminal is in a stable state, and the document image to be classified is subjected to perspective correction processing to obtain a corrected document image;

[0011] Performing image enhancement processing on the corrected document image to obtain an enhanced document image;

[0012] The enhanced document image is input into the trained document classification model for recognition to obtain a document classification result.

[0013] Further, the step of calculating the jitter degree of the smart terminal according to the jitter data includes:

[0014] Extracting acceleration data in three axes from the jitter data to form an acceleration data sequence;

[0015] Performing filtering on the acceleration data sequence to obtain a smooth acceleration data sequence;

[0016] Calculating the change of the smoothed acceleration data sequence in unit time to obtain instantaneous velocity data;

[0017] According to the instantaneous velocity data, the displacement per unit time is calculated to obtain instantaneous displacement data;

[0018] Performing Fourier transform on the instantaneous displacement data to obtain a jitter frequency characteristic;

[0019] Calculating the amplitudes of different frequency components in the jitter frequency characteristics to obtain a jitter amplitude characteristic;

[0020] Combining the jitter frequency feature and the jitter amplitude feature to form a jitter feature vector;

[0021] The jitter degree is calculated based on the jitter feature vector.

[0022] Furthermore, the step of performing perspective correction processing on the document image to be classified to obtain a corrected document image includes:

[0023] Using an edge detection algorithm to process the document image to be classified to obtain the document edge contour;

[0024] According to the edge contour of the document, four original corner points of the document image to be classified are identified by a corner point detection algorithm;

[0025] If the four original corner points are detected successfully, then four target corner points of the perspective transformation are determined;

[0026] Calculate the perspective transformation matrix using a four-point perspective transformation algorithm according to the four original corner points and the four target corner points;

[0027] The document image to be classified is transformed using the perspective transformation matrix to obtain a perspective-corrected document image.

[0028] Furthermore, the step of performing image enhancement processing on the corrected document image to obtain an enhanced document image includes:

[0029] Extracting features of the corrected document image to obtain image blur features;

[0030] Acquire image clarity features of the clear document image according to a pre-constructed clear document image sample library;

[0031] Matching the image blur feature with the image clear feature, and obtaining a feature mapping relationship from the image blur feature to the image clear feature through transfer learning;

[0032] Based on the feature mapping relationship, super-resolution reconstruction is performed on the corrected document image to obtain a reconstructed document image;

[0033] The reconstructed document image is post-processed to obtain an enhanced document image.

[0034] Furthermore, the document classification model includes an image segmentation network, a text feature extraction network, an image feature extraction network, a feature fusion network and an SVM classifier, and the step of inputting the enhanced document image into the trained document classification model for recognition to obtain the document classification result includes:

[0035] Inputting the enhanced document image into the image segmentation network to perform image segmentation to obtain a text segmentation image and an image segmentation image;

[0036] Performing text feature extraction on the text segmentation image through the text feature extraction network to obtain text feature data;

[0037] Performing image feature extraction on the image segmentation image through the image feature extraction network to obtain image feature data;

[0038] The text feature data and the image feature data are fused through the feature fusion network to obtain an attention fusion feature;

[0039] The attention fusion feature is input into the SVM classifier for image classification to obtain the document category.

[0040] Furthermore, after the step of comparing the jitter degree with a preset jitter threshold, the method further includes:

[0041] When the degree of jitter is greater than the preset jitter threshold, the user is prompted to keep the smart terminal in a stable state and the image acquisition operation is re-triggered.

[0042] Furthermore, before the step of performing perspective correction processing on the document image to be classified, the method further includes:

[0043] Using an image quality assessment algorithm to score the clarity of the document image to be classified, and obtaining a clarity score;

[0044] comparing the clarity score with a preset clarity threshold;

[0045] When the clarity score is greater than or equal to the preset clarity threshold, executing the step of performing perspective correction processing on the document image to be classified;

[0046] When the clarity score is less than the preset clarity threshold, the image acquisition operation is re-triggered.

[0047] In order to solve the above technical problems, the embodiment of the present application further provides a document classification device based on jitter detection, which adopts the following technical solution:

[0048] An acquisition module, used to acquire the image of the document to be classified through a smart terminal, and simultaneously acquire the jitter data acquired by a built-in sensor of the smart terminal;

[0049] A jitter detection module, used to calculate the jitter degree of the smart terminal according to the jitter data, and compare the jitter degree with a preset jitter threshold;

[0050] A correction module, configured to determine that the intelligent terminal is in a stable state when the jitter degree is less than or equal to a preset jitter threshold, and perform perspective correction processing on the document image to be classified to obtain a corrected document image;

[0051] An image enhancement module, used for performing image enhancement processing on the corrected document image to obtain an enhanced document image;

[0052] The classification module is used to input the enhanced document image into the trained document classification model for recognition to obtain a document classification result.

[0053] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0054] The computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the document classification method based on jitter detection as described above when executing the computer-readable instructions.

[0055] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0056] The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the document classification method based on jitter detection as described above are implemented.

[0057] Compared with the prior art, this application has the following beneficial effects:

[0058] The present application provides a document classification method based on jitter detection. When a smart terminal collects a document image to be classified, the smart terminal collects jitter data through a built-in sensor of the smart terminal. The jitter degree is calculated according to the jitter data, so that the jitter index can be quantified and whether there is a risk of abnormal jitter can be quickly determined. When the jitter degree is less than or equal to a preset jitter threshold, the document image to be classified is processed for perspective correction to obtain a corrected document image, which can improve the image quality, maintain image details, and ensure image clarity and accuracy. The corrected document image is processed for image enhancement to obtain an enhanced document image, which can restore image detail information, reduce or eliminate jitter blur, make the image clearer, and enhance blur optimization effect. Finally, the enhanced document image is classified by a trained document classification model, which can improve the accuracy and reliability of image recognition and classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0060] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0061] Figure 2 is a flow chart of an embodiment of a document classification method based on jitter detection according to the present application;

[0062] Figure 3 is a structural schematic diagram of an embodiment of a document classification device based on jitter detection according to the present application;

[0063] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0065] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0066] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0067] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0068] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0069] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to a laptop computer 1011, a tablet computer 1012 or a mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.

[0070] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .

[0071] It should be noted that the document classification method based on jitter detection provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the document classification device based on jitter detection is generally arranged in the server / terminal device.

[0072] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0073] Continue to refer Figure 2 , shows a flow chart of an embodiment of a document classification method based on jitter detection according to the present application, comprising the following steps:

[0074] Step S201: collect the image of the document to be classified through the smart terminal, and obtain the jitter data collected by the built-in sensor of the smart terminal.

[0075] In this embodiment, a special document image acquisition application is started on the smart terminal or the camera function of the system is used to scan and shoot the document to be classified to obtain the document image to be classified. The document image to be classified is a document image of various types that needs to be acquired and classified in different business scenarios. Business scenarios include banking business (such as loan approval, account management), payment processing (online payment, mobile payment, etc.), insurance business (insurance claims, insurance business, policy management, etc.), investment management (stock trading, asset management, financial planning, etc.), etc.

[0076] The document types of the document images to be classified include identity cards, household registers, birth certificates, passports, social security cards, Hong Kong, Macao and Taiwan return permits, foreign permanent residence ID cards, driver's licenses, vehicle registration certificates, student ID cards, property certificates, etc. Smart terminals include but are not limited to smart phones, PDAs (personal digital assistants), handheld data collectors, smart wearable devices and other terminals with shooting functions.

[0077] Smart terminals have multiple built-in sensors to sense the device status and environmental information. When the smart terminal starts the ID image acquisition application and prepares to shoot, the built-in sensors will automatically start working. These sensors can sense the angular velocity changes (gyroscope) and acceleration changes (accelerometer) of the smart terminal in three-dimensional space in real time, and convert these changes into electrical signals for output. The operating system or image acquisition application of the smart terminal will receive these sensor data, process and analyze them, and obtain the shaking of the smart terminal during the shooting process.

[0078] Among them, the sensors include accelerometer, gravity sensor and linear acceleration sensor. The accelerometer can detect the acceleration of the smart terminal in three-dimensional space, which are the acceleration of the X-axis, Y-axis and Z-axis respectively; the gravity sensor will return a three-dimensional vector, which can show the direction and strength of gravity; the linear acceleration sensor returns a three-dimensional vector to show the acceleration of the smart terminal in all directions (excluding gravity acceleration). The coordinate system of the accelerometer, gravity sensor and linear acceleration sensor is the same, and the relationship of the output values ​​is as follows: accelerometer = gravity sensor + linear acceleration sensor.

[0079] In this embodiment, the jitter data is the acceleration in three dimensions without the interference of gravity acceleration, that is, the acceleration data collected by the linear acceleration sensor can be directly obtained.

[0080] The jitter data may be acceleration data collected by the acceleration sensor at the moment when the smart terminal captures the document image, or may be a sequence of acceleration data collected by the acceleration sensor from the time the image acquisition application is turned on to the time the image is captured.

[0081] It should be emphasized that in order to further ensure the privacy and security of the document images to be classified, the above-mentioned document images to be classified can also be stored in a node of a blockchain.

[0082] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0083] Step S202: Calculate the jitter degree of the smart terminal according to the jitter data, and compare the jitter degree with a preset jitter threshold.

[0084] When the jitter data is acceleration data at the moment of image capture, the acceleration vectors in the three axes of X, Y, and Z in the jitter data are obtained, and the synthetic acceleration magnitude is calculated using the vector magnitude. The synthetic acceleration magnitude is used to characterize the jitter degree of the smart terminal.

[0085] For example, the jitter data received from the sensor is Where values[0] corresponds to the acceleration in the X-axis direction, values[1] corresponds to the acceleration in the Y-axis direction, and values[2] corresponds to the acceleration in the Z-axis direction. The formula for calculating the resultant acceleration is as follows:

[0086] Resultant acceleration

[0087] In this embodiment, an acceleration threshold is pre-set as a preset jitter threshold, and the composite acceleration magnitude mag is compared with the preset jitter threshold. When the composite acceleration magnitude mag is less than or equal to the preset jitter threshold, it indicates that the jitter of the smart terminal is within an acceptable range, and the document image to be classified is directly processed subsequently. Otherwise, it indicates that the smart terminal has experienced severe jitter, and the captured image may be blurred. A prompt message is popped up to inform the user to stabilize the smart terminal and that the document image needs to be recaptured.

[0088] In some optional implementations, when the jitter data is an acceleration data sequence, the step of calculating the jitter degree of the smart terminal according to the jitter data includes:

[0089] Extracting acceleration data in three axes from the jitter data to form an acceleration data sequence;

[0090] Performing filtering on the acceleration data sequence to obtain a smooth acceleration data sequence;

[0091] Calculate the change of the smoothed acceleration data sequence per unit time to obtain instantaneous velocity data;

[0092] According to the instantaneous velocity data, the displacement per unit time is calculated to obtain the instantaneous displacement data;

[0093] Perform Fourier transform on the instantaneous displacement data to obtain the jitter frequency characteristics;

[0094] Calculate the amplitudes of different frequency components in the jitter frequency feature to obtain the jitter amplitude feature; combine the jitter frequency feature and the jitter amplitude feature to form a jitter feature vector;

[0095] The jitter degree is calculated based on the jitter feature vector.

[0096] Specifically, the acceleration data in the three axes of X, Y, and Z are extracted from the jitter data to form an acceleration data sequence. Since the collected acceleration data may contain noise and interference signals, filtering and denoising are required.

[0097] In this embodiment, the acceleration data sequence is filtered. Specifically, the acceleration data sequence is median filtered to remove burr noise, and then a low-pass filter such as a Butterworth filter is used to filter out high-frequency noise to obtain a smooth acceleration data sequence.

[0098] The smoothed acceleration data sequence is integrated at a preset unit time to calculate the instantaneous speed data of the smart terminal. On this basis, the instantaneous speed data is integrated again at a preset unit time to calculate the displacement of the smart terminal in each unit time, that is, to obtain the instantaneous displacement data. Next, the instantaneous displacement data is subjected to a fast Fourier transform (FFT) to convert the time domain signal into a frequency domain signal to obtain the jitter frequency characteristics of the smart terminal. The jitter amplitude characteristics of the smart terminal are obtained by analyzing the amplitudes of different frequency components in the frequency domain signal. Finally, the jitter frequency characteristics and the jitter amplitude characteristics are combined to form a multi-dimensional jitter feature vector as a digital representation of the jitter state of the smart terminal.

[0099] Draw a spectrum graph based on the jitter feature vector. The horizontal axis of the spectrum graph is the jitter frequency feature, and the vertical axis is the jitter amplitude feature. Integrate the spectrum data within the preset frequency range in the spectrum graph to calculate the total energy, which can be used as a quantitative indicator of the jitter degree. Evaluate the jitter degree based on the calculated total energy. For example, set an energy threshold. When the total energy exceeds the energy threshold, it is considered that the jitter degree is large.

[0100] The preset frequency range may be set based on experience or prior knowledge, and the signal component related to the jitter is most significant in the set range. For example, the jitter of a person's hand may be mainly in a certain low-frequency range.

[0101] In this embodiment, the jitter feature vector is obtained by calculation, and the jitter degree is calculated according to the jitter feature vector, so that the accuracy of jitter determination can be improved.

[0102] Step S203: when the shaking degree is less than or equal to the preset shaking threshold, it is determined that the intelligent terminal is in a stable state, and the document image to be classified is subjected to perspective correction processing to obtain a corrected document image.

[0103] In this embodiment, when the degree of jitter is less than or equal to the preset jitter threshold, it is determined that the intelligent terminal is in a stable state, the collected document image is relatively clear, and subsequent image processing can be directly performed.

[0104] In some optional implementations of the present embodiment, an edge detection algorithm is used to process the document image to be classified to obtain the document edge contour; based on the document edge contour, the four original corner points of the document image to be classified are identified by a corner detection algorithm; if the four original corner points are detected successfully, the four target corner points of the perspective transformation are determined; based on the four original corner points and the four target corner points, a four-point perspective transformation algorithm is used to calculate the perspective transformation matrix; the document image to be classified is transformed using the perspective transformation matrix to obtain a corrected document image after perspective correction.

[0105] Specifically, the Canny edge detection algorithm is used to process the document image to be classified. The algorithm first uses a Gaussian filter to smooth the document image to be classified, then calculates the gradient amplitude and direction of the document image to be classified, performs non-maximum suppression, and finally uses a double threshold method to extract the edge. By setting appropriate thresholds, such as a high threshold of 150 and a low threshold of 50, a clear document edge contour of the document image to be classified can be obtained.

[0106] According to the edge contour of the document, the Harris corner detection algorithm is used to identify the coordinates of the four corner points of the document in the document image to be classified as the four original corner points. The algorithm calculates the gradient correlation matrix of the pixel grayscale value in the local window of the document image to be classified, and determines the corner point according to the eigenvalue of the matrix. If the eigenvalue is greater than the set threshold, it is considered to be a corner point. By sorting the coordinates of the corner points, the coordinates of the four corner points of the upper left, upper right, lower right, and lower left can be determined. The corresponding four target corner points are determined by these four original corner points, and the perspective transformation matrix is ​​established based on the four original corner points and the four target corner points.

[0107] Assuming that the size of the document image to be classified is 640x480 and the size of the target image is 400x300, the following transformation relationship can be established: [x, y, 1] = [u, v, 1] * [a, b, c], [d, e, f], [g, h, 1], where (x, y) is the coordinate of the document image to be classified, and (u, v) is the coordinate of the target image. The 8 parameters in the transformation matrix are solved by the least squares method to obtain the perspective transformation matrix. For each pixel point of the document image to be classified, its coordinates in the target image are calculated according to the transformation matrix, and interpolation is performed to obtain the corrected document image after perspective correction.

[0108] By performing perspective correction on the document image to be classified, the perspective distortion during imaging can be eliminated, the document image from the frontal perspective can be obtained, the image quality can be improved, and the accuracy and reliability of target recognition can be improved.

[0109] Step S204, performing image enhancement processing on the corrected document image to obtain an enhanced document image.

[0110] In this embodiment, feature extraction is performed on the corrected document image to obtain image blur features; image clarity features of the clear document image are obtained based on a pre-constructed clear document image sample library; the image blur features are matched with the image clarity features, and a feature mapping relationship from the image blur features to the image clarity features is obtained through transfer learning; based on the feature mapping relationship, super-resolution reconstruction is performed on the corrected document image to obtain a reconstructed document image; and the reconstructed document image is post-processed to obtain an enhanced document image.

[0111] Specifically, a pre-trained convolutional neural network model such as VGG-19 or ResNet-50 is used to extract features from the input rectified document image, and the image blur features of the rectified document image are extracted through operations such as convolution and pooling to obtain a 512-dimensional feature vector. At the same time, based on a pre-built sample library containing a large number of clear document images, the same convolutional neural network model is used to extract the corresponding image clarity features, and a 512-dimensional feature vector with the same number of clear document images is obtained.

[0112] Using similarity algorithms such as cosine similarity, the extracted image blur features are matched with the image clear features to find the most similar preset number of image clear features. Through transfer learning, the gradient descent algorithm is used to optimize the mapping function from image blur features to image clear features. After a preset number of iterative trainings, such as 100 times, the optimal mapping relationship is learned. Based on the learned feature mapping relationship, a generative adversarial network (GAN) is used to perform super-resolution reconstruction of the corrected document image. The trained generator network maps the corrected document image to a high-resolution space to generate a high-resolution and clear reconstructed document image.

[0113] It should be understood that during the training process of the generative adversarial network, the discriminator network is used to judge the difference between the reconstructed document image and the real clear document image, and the parameters of the generator network are continuously optimized to finally obtain a trained generator network.

[0114] Post-process the reconstructed document image, including:

[0115] The Laplacian operator is used to sharpen the reconstructed document image to highlight the details and edge information of the image, and then the non-local mean filtering algorithm is used to remove noise and artifacts in the sharpened image to improve the visual quality of the image. Finally, the processed enhanced document image is output for subsequent document recognition and application scenarios, such as identity verification and face recognition.

[0116] Through the above method, the clarity and resolution of the document image can be effectively improved, providing high-quality image input for document recognition, and improving the accuracy and reliability of recognition.

[0117] Step S205: input the enhanced document image into the trained document classification model for recognition to obtain a document classification result.

[0118] In this embodiment, the enhanced document image is classified by a trained document classification model, and the document classification model includes an image segmentation network, a text feature extraction network, an image feature extraction network, a feature fusion network and a SVM classifier.

[0119] The enhanced document image is input into the image segmentation network for image segmentation to obtain a text segmentation image and an image segmentation image; the text feature extraction network is used to extract text features from the text segmentation image to obtain text feature data; the image feature extraction network is used to extract image features from the image segmentation image to obtain image feature data; the text feature data and image feature data are fused through the feature fusion network to obtain attention fusion features; the attention fusion features are input into the SVM classifier for image classification to obtain the document category.

[0120] Among them, the image segmentation network uses the Unet network as the backbone network, including an encoder, a decoder and a prediction layer. Among them, the encoder includes multiple stacked connected encoding layers, and the feature map size of each encoding layer is different, that is, the feature dimension and the number of channels are different; the decoder includes multiple decoding layers corresponding to the encoding layer, and each decoding layer is connected to an attention layer. Upsampling is performed through the decoder, the image size becomes larger, and deep information is extracted. In the upsampling process, the shallow information of the left encoding layer is fused, that is, the features of the corresponding encoding layer on the left are spliced.

[0121] Specifically, multi-level feature extraction is performed on the enhanced document image through the encoding layer in the encoder to obtain image features of different levels, and each level of image features is input into the decoding layer corresponding to the decoder; upsampling and attention calculation are performed on each level of image features through the decoding layer and the attention layer to obtain multi-level upsampling fusion features; pixel category prediction is performed on the multi-level upsampling fusion features through the prediction layer to obtain text segmentation images and image segmentation images.

[0122] The text feature extraction network can adopt a convolutional neural network, which performs convolution operations on the text segmentation image to extract text feature data.

[0123] In some optional implementations, the image feature extraction network uses an improved YOLOv9 backbone network, including a CBS convolution layer, multiple RepNCSPELAN4 layers, a downsampling layer between every two RepNCSPELAN4 layers, an EMA attention mechanism layer, and an SPPELAN layer. Specifically, the image segmentation image is convolved through the CBS convolution layer to obtain a convolution feature map; the convolution feature map is extracted in turn through the RepNCSPELAN4 layer and the downsampling layer to obtain a downsampled fused feature map; the downsampled fused feature map is input into the last RepNCSPELAN4 layer for feature extraction and fusion, and the convolution fused feature map is obtained; the convolution fused feature map is calculated by the EMA attention layer to obtain a multi-scale attention feature map; the multi-scale attention feature map is extracted by the SPPELAN layer to obtain image feature data.

[0124] In the feature fusion network, the adaptive weight matrix corresponding to the text feature data and the image feature data is obtained; according to the adaptive weight matrix, the attention calculation is performed on the text feature data and the image feature data respectively to obtain the corresponding attention feature map; based on the attention feature map, the text adaptation feature map and the image adaptation feature map are obtained; the text adaptation feature map and the image adaptation feature map are cascade-fused to obtain the attention fusion feature.

[0125] Use the multi-head attention mechanism of the Transformer infrastructure for adaptive calculation. Get the query vector weight matrix W of each single-head attention in the feature fusion network q , key vector weight matrix W k Sum value vector weight matrix W v , and assign corresponding query vector weight matrices W to text feature data and image feature data q , key vector weight matrix W k Sum value vector weight matrix W vAs an adaptive weight matrix, the text feature data and the image feature data are mapped according to the corresponding adaptive weight matrix to obtain a text adaptation feature map and an image adaptation feature map.

[0126] The document categories include but are not limited to identity cards, household registers, birth certificates, passports, social security cards, Hong Kong, Macao and Taiwan home return permits, permanent residence identity cards for foreigners, driver's licenses, vehicle registration certificates, student cards, etc. The content of each document category is also different. In this embodiment, a corresponding SVM (Support Vector Machine) sub-classifier is constructed for each document category, and an SVM classifier is composed of multiple SVM sub-classifiers.

[0127] Each SVM sub-classifier can be connected in parallel, that is, the attention fusion features are simultaneously input into all SVM sub-classifiers for classification; or they can be connected in cascade form, that is, each SVM sub-classifier is connected using a logical determiner.

[0128] Classifying document images through a document classification model can improve the accuracy and efficiency of document classification.

[0129] In this embodiment, the document category of the document image to be classified is obtained, and it is confirmed whether the document category is the target document. If not, the user is prompted to retake the photo; if so, the document image is transmitted to the background server for further processing. After the background server receives the document image, it can perform subsequent business processes such as document information recognition and authenticity identification.

[0130] The present application collects jitter data through the built-in sensor of the smart terminal while collecting the image of the document to be classified. The jitter degree is calculated according to the jitter data, and the jitter index can be quantified to quickly determine whether there is a risk of abnormal jitter. When the jitter degree is less than or equal to the preset jitter threshold, the document image to be classified is perspective corrected to obtain a corrected document image, which can improve the image quality, maintain image details, and ensure image clarity and accuracy. The corrected document image is enhanced to obtain an enhanced document image, which can restore image detail information, reduce or eliminate jitter blur, make the image clearer, and enhance the blur optimization effect. Finally, the enhanced document image is classified by the trained document classification model, which can improve the accuracy and reliability of image recognition and classification.

[0131] In some optional implementations, after the step of comparing the jitter degree with a preset jitter threshold, the method further includes:

[0132] When the degree of jitter is greater than a preset jitter threshold, the user is prompted to keep the smart terminal in a stable state and the image acquisition operation is re-triggered.

[0133] When the degree of jitter is greater than the preset jitter threshold, it is determined that the smart terminal is jittering too violently and the captured image is blurry. At this time, a prompt message such as "Please stabilize the smart terminal to avoid blurry shooting" pops up to prompt the user to keep the smart terminal in a stable state and re-capture the document image.

[0134] This application can improve the image quality of document collection and provide a more reliable image data foundation for subsequent document recognition and other applications.

[0135] In some optional implementations, before the step of performing perspective correction processing on the document image to be classified, the method further includes:

[0136] An image quality assessment algorithm is used to evaluate the clarity of the document image to be classified and obtain a clarity score;

[0137] comparing the clarity score to a preset clarity threshold;

[0138] When the clarity score is greater than or equal to the preset clarity threshold, executing the step of performing perspective correction processing on the document image to be classified;

[0139] When the clarity score is less than a preset clarity threshold, the image acquisition operation is re-triggered.

[0140] Specifically, the gradient-based Tenengrad algorithm is used to calculate the square sum of the gradients of the grayscale changes of the document image to be classified to obtain the clarity score. The score is compared with the preset clarity threshold score_threshold. If score ≥ score_threshold, the document image to be classified meets the clarity requirement, and the perspective correction processing is performed on the document image to be classified. Otherwise, the document image to be classified does not meet the clarity requirement, and the judgment result is returned to the user, re-triggering the image acquisition operation.

[0141] This application further ensures that the clarity of the captured document images meets the requirements of subsequent image processing by performing clarity scoring on the document images to be classified, effectively increases the probability of capturing clear images, and improves the quality and efficiency of image processing.

[0142] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0143] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0144] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0145] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0146] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a document classification device based on jitter detection, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0147] like Figure 3 As shown, the document classification device 300 based on jitter detection described in this embodiment includes: an acquisition module 301, a jitter detection module 302, a correction module 303, an image enhancement module 304 and a classification module 305. Among them:

[0148] The acquisition module 301 is used to collect the image of the document to be classified through the smart terminal, and at the same time obtain the jitter data collected by the built-in sensor of the smart terminal;

[0149] The jitter detection module 302 is used to calculate the jitter degree of the smart terminal according to the jitter data, and compare the jitter degree with a preset jitter threshold;

[0150] The correction module 303 is used to determine that the intelligent terminal is in a stable state when the jitter degree is less than or equal to a preset jitter threshold, and perform perspective correction processing on the document image to be classified to obtain a corrected document image;

[0151] The image enhancement module 304 is used to perform image enhancement processing on the corrected document image to obtain an enhanced document image;

[0152] The classification module 305 is used to input the enhanced document image into the trained document classification model for recognition to obtain a document classification result.

[0153] It should be emphasized that in order to further ensure the privacy and security of the document images to be classified, the above-mentioned document images to be classified can also be stored in a node of a blockchain.

[0154] Based on the above-mentioned document classification device 300 based on jitter detection, the intelligent terminal collects jitter data through the built-in sensor of the intelligent terminal while collecting the document image to be classified. The jitter degree is calculated according to the jitter data, and the jitter index can be quantified to quickly determine whether there is a risk of abnormal jitter; when the jitter degree is less than or equal to the preset jitter threshold, the document image to be classified is perspective corrected to obtain a corrected document image, which can improve the image quality, maintain image details, and ensure image clarity and accuracy; the corrected document image is enhanced to obtain an enhanced document image, which can restore image detail information, reduce or eliminate jitter blur, make the image clearer, and improve blur optimization effect; finally, the enhanced document image is classified by the trained document classification model, which can improve the accuracy and reliability of image recognition and classification.

[0155] In some optional implementations, the jitter detection module 302 includes:

[0156] An extraction submodule, used for extracting acceleration data in three axes from the jitter data to form an acceleration data sequence;

[0157] A filtering submodule, used for filtering the acceleration data sequence to obtain a smooth acceleration data sequence;

[0158] A speed calculation submodule, used to calculate the change of the smoothed acceleration data sequence per unit time to obtain instantaneous speed data;

[0159] A displacement calculation submodule, used to calculate the displacement per unit time according to the instantaneous velocity data to obtain instantaneous displacement data;

[0160] A transformation submodule, used for performing Fourier transformation on the instantaneous displacement data to obtain a jitter frequency feature;

[0161] An amplitude calculation submodule, used to calculate the amplitudes of different frequency components in the jitter frequency characteristics to obtain the jitter amplitude characteristics;

[0162] A combining submodule, used for combining the jitter frequency feature and the jitter amplitude feature to form a jitter feature vector;

[0163] The jitter degree calculation submodule is used to calculate the jitter degree based on the jitter feature vector.

[0164] The jitter feature vector is obtained by calculation, and the jitter degree is calculated according to the jitter feature vector, so that the accuracy of jitter judgment can be improved.

[0165] In some optional implementations, the correction module 303 is further configured to:

[0166] Using an edge detection algorithm to process the document image to be classified to obtain the document edge contour;

[0167] According to the edge contour of the document, four original corner points of the document image to be classified are identified by a corner point detection algorithm;

[0168] If the four original corner points are detected successfully, then four target corner points of the perspective transformation are determined;

[0169] Calculate the perspective transformation matrix using a four-point perspective transformation algorithm according to the four original corner points and the four target corner points;

[0170] The document image to be classified is transformed using the perspective transformation matrix to obtain a perspective-corrected document image.

[0171] By performing perspective correction on the document image to be classified, the perspective distortion during imaging can be eliminated, the document image from the frontal perspective can be obtained, the image quality can be improved, and the accuracy and reliability of target recognition can be improved.

[0172] In some optional implementations, the image enhancement module 304 includes:

[0173] A first feature extraction submodule is used to extract features from the corrected document image to obtain image blur features;

[0174] A second feature extraction submodule is used to obtain the image clarity feature of the clear document image according to a pre-built clear document image sample library;

[0175] A matching mapping submodule, used for matching the image blur feature with the image clear feature, and obtaining a feature mapping relationship from the image blur feature to the image clear feature by transfer learning;

[0176] A reconstruction submodule, used for performing super-resolution reconstruction on the corrected document image based on the feature mapping relationship to obtain a reconstructed document image;

[0177] The post-processing submodule is used to post-process the reconstructed document image to obtain an enhanced document image.

[0178] Through the above method, the clarity and resolution of the document image can be effectively improved, providing high-quality image input for document recognition, and improving the accuracy and reliability of recognition.

[0179] In some optional implementations, the document classification model includes an image segmentation network, a text feature extraction network, an image feature extraction network, a feature fusion network and an SVM classifier, and the classification module 305 includes:

[0180] A segmentation submodule, used for inputting the enhanced document image into the image segmentation network to perform image segmentation, and obtaining a text segmentation image and an image segmentation image;

[0181] A text feature submodule, used for extracting text features from the text segmentation image through the text feature extraction network to obtain text feature data;

[0182] An image feature submodule, used for extracting image features from the image segmentation image through the image feature extraction network to obtain image feature data;

[0183] A fusion submodule, used for fusing the text feature data and the image feature data through the feature fusion network to obtain an attention fusion feature;

[0184] The classification submodule is used to input the attention fusion feature into the SVM classifier to perform image classification and obtain the document category.

[0185] Classifying document images through a document classification model can improve the accuracy and efficiency of document classification.

[0186] In some optional implementations, the jitter detection-based document classification device 300 further includes: a re-capture module, configured to prompt the user to keep the smart terminal in a stable state and re-trigger the image capture operation when the jitter degree is greater than the preset jitter threshold.

[0187] This application can improve the image quality of document collection and provide a more reliable image data foundation for subsequent document recognition and other applications.

[0188] In some optional implementations, the document classification device 300 based on jitter detection further includes a clarity scoring module, which is used to:

[0189] Using an image quality assessment algorithm to score the clarity of the document image to be classified, and obtaining a clarity score;

[0190] comparing the clarity score with a preset clarity threshold;

[0191] When the clarity score is greater than or equal to the preset clarity threshold, executing the step of performing perspective correction processing on the document image to be classified;

[0192] When the clarity score is less than the preset clarity threshold, the image acquisition operation is re-triggered.

[0193] By scoring the clarity of the document images to be classified, we can further ensure that the clarity of the captured document images meets the requirements of subsequent image processing, effectively increase the probability of capturing clear images, and improve the quality and efficiency of image processing.

[0194] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0195] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 4 with a memory 41, a processor 42, and a network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0196] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0197] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the document classification method based on jitter detection, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0198] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the document classification method based on jitter detection.

[0199] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0200] By collecting jitter data through the built-in sensor of the intelligent terminal while collecting the image of the document to be classified, the degree of jitter is calculated based on the jitter data, the jitter index can be quantified, and whether there is a risk of abnormal jitter can be quickly determined; when the degree of jitter is less than or equal to the preset jitter threshold, the document image to be classified is processed for perspective correction to obtain a corrected document image, which can improve the image quality, maintain image details, and ensure image clarity and accuracy; the corrected document image is processed for image enhancement to obtain an enhanced document image, which can restore image detail information, reduce or eliminate jitter blur, make the image clearer, and enhance the blur optimization effect; finally, the enhanced document image is classified by the trained document classification model, which can improve the accuracy and reliability of image recognition and classification.

[0201] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the document classification method based on jitter detection as described above.

[0202] By collecting jitter data through the built-in sensor of the intelligent terminal while collecting the image of the document to be classified, the degree of jitter is calculated based on the jitter data, the jitter index can be quantified, and whether there is a risk of abnormal jitter can be quickly determined; when the degree of jitter is less than or equal to the preset jitter threshold, the document image to be classified is processed for perspective correction to obtain a corrected document image, which can improve the image quality, maintain image details, and ensure image clarity and accuracy; the corrected document image is processed for image enhancement to obtain an enhanced document image, which can restore image detail information, reduce or eliminate jitter blur, make the image clearer, and enhance the blur optimization effect; finally, the enhanced document image is classified by the trained document classification model, which can improve the accuracy and reliability of image recognition and classification.

[0203] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0204] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A document classification method based on jitter detection, characterized in that: The steps include: Collecting the image of the document to be classified through the smart terminal, and obtaining the jitter data collected by the built-in sensor of the smart terminal; Calculating the degree of jitter of the intelligent terminal according to the jitter data, and comparing the degree of jitter with a preset jitter threshold; When the jitter degree is less than or equal to a preset jitter threshold, it is determined that the intelligent terminal is in a stable state, and the document image to be classified is subjected to perspective correction processing to obtain a corrected document image; Performing image enhancement processing on the corrected document image to obtain an enhanced document image; The enhanced document image is input into the trained document classification model for recognition to obtain a document classification result.

2. The document classification method based on jitter detection according to claim 1, characterized in that: The step of calculating the jitter degree of the smart terminal according to the jitter data comprises: Extracting acceleration data in three axes from the jitter data to form an acceleration data sequence; Performing filtering on the acceleration data sequence to obtain a smooth acceleration data sequence; Calculating the change of the smoothed acceleration data sequence in unit time to obtain instantaneous velocity data; According to the instantaneous velocity data, the displacement per unit time is calculated to obtain instantaneous displacement data; Performing Fourier transform on the instantaneous displacement data to obtain a jitter frequency characteristic; Calculating the amplitudes of different frequency components in the jitter frequency characteristics to obtain a jitter amplitude characteristic; Combining the jitter frequency feature and the jitter amplitude feature to form a jitter feature vector; The jitter degree is calculated based on the jitter feature vector.

3. The document classification method based on jitter detection according to claim 1, characterized in that: The step of performing perspective correction processing on the document image to be classified to obtain a corrected document image comprises: Using an edge detection algorithm to process the document image to be classified to obtain the document edge contour; According to the edge contour of the document, four original corner points of the document image to be classified are identified by a corner point detection algorithm; If the four original corner points are detected successfully, then four target corner points of the perspective transformation are determined; Calculate the perspective transformation matrix using a four-point perspective transformation algorithm according to the four original corner points and the four target corner points; The document image to be classified is transformed using the perspective transformation matrix to obtain a perspective-corrected document image.

4. The document classification method based on jitter detection according to claim 1, characterized in that: The step of performing image enhancement processing on the corrected document image to obtain an enhanced document image comprises: Extracting features of the corrected document image to obtain image blur features; Acquire image clarity features of the clear document image according to a pre-constructed clear document image sample library; Matching the image blur feature with the image clear feature, and obtaining a feature mapping relationship from the image blur feature to the image clear feature through transfer learning; Based on the feature mapping relationship, super-resolution reconstruction is performed on the corrected document image to obtain a reconstructed document image; The reconstructed document image is post-processed to obtain an enhanced document image.

5. The document classification method based on jitter detection according to claim 1, characterized in that: The document classification model includes an image segmentation network, a text feature extraction network, an image feature extraction network, a feature fusion network and an SVM classifier. The step of inputting the enhanced document image into the trained document classification model for recognition to obtain the document classification result includes: Inputting the enhanced document image into the image segmentation network to perform image segmentation to obtain a text segmentation image and an image segmentation image; Performing text feature extraction on the text segmentation image through the text feature extraction network to obtain text feature data; Performing image feature extraction on the image segmentation image through the image feature extraction network to obtain image feature data; The text feature data and the image feature data are fused through the feature fusion network to obtain an attention fusion feature; The attention fusion feature is input into the SVM classifier for image classification to obtain the document category.

6. The document classification method based on jitter detection according to claim 1, characterized in that: After the step of comparing the jitter degree with a preset jitter threshold, the method further includes: When the degree of jitter is greater than the preset jitter threshold, the user is prompted to keep the smart terminal in a stable state and the image acquisition operation is re-triggered.

7. The document classification method based on jitter detection according to claim 1, characterized in that: Before the step of performing perspective correction processing on the document image to be classified, the method further includes: Using an image quality assessment algorithm to score the clarity of the document image to be classified, and obtaining a clarity score; comparing the clarity score with a preset clarity threshold; When the clarity score is greater than or equal to the preset clarity threshold, executing the step of performing perspective correction processing on the document image to be classified; When the clarity score is less than the preset clarity threshold, the image acquisition operation is re-triggered.

8. A document classification device based on jitter detection, characterized in that: include: An acquisition module, used to acquire the image of the document to be classified through a smart terminal, and simultaneously acquire the jitter data acquired by a built-in sensor of the smart terminal; A jitter detection module, used to calculate the jitter degree of the smart terminal according to the jitter data, and compare the jitter degree with a preset jitter threshold; A correction module, configured to determine that the intelligent terminal is in a stable state when the jitter degree is less than or equal to a preset jitter threshold, and perform perspective correction processing on the document image to be classified to obtain a corrected document image; An image enhancement module, used for performing image enhancement processing on the corrected document image to obtain an enhanced document image; The classification module is used to input the enhanced document image into the trained document classification model for recognition to obtain a document classification result.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the document classification method based on jitter detection as described in any one of claims 1 to 7 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the document classification method based on jitter detection as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Multi-factor security authentication method and device based on AI adaptive identification and block chain

    CN119603075A

  • Multi-factor security authentication method and device based on AI adaptive recognition and blockchain

    CN119603075B