A seal extraction method based on multi-scale Hough transform

Through multi-scale Hough transform and coordinate mapping technology, the problems of inaccurate shape detection and noise circle dependence of traditional Hough transform in seal detection are solved, achieving higher detection accuracy and stability, and reducing the need for accumulator thresholds. dependence, improving the structural information extraction accuracy and running speed.

CN114913089BActive Publication Date: 2024-09-20CHINA DESIGN GROUP CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210519467.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2024-09-20
Estimated Expiration
2042-05-13

AI Technical Summary

Technical Problem

The traditional Hough transform has problems with inaccurate shape detection and dependence on noise circles in seal detection. Especially in text materials, the fitting of characters into circles causes interference, and improper accumulator threshold settings can lead to recognition errors.

Method used

Multi-scale Hough transform and coordinate mapping methods are used to detect circle center coordinates at different scales, and error circles are removed through noise reduction processing and down-sampling technology to improve detection accuracy.

Benefits of technology

It significantly improves the accuracy and stability of seal detection, suppresses random noise generated by text and patterns, enhances the accuracy of structural information extraction, does not require special design of thresholds, and runs quickly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114913089B
    Figure CN114913089B
Patent Text Reader

Abstract

The present invention aims at the problems existing in the field of seal detection by using Hough transform, and proposes a method for identifying seals based on Hough transform and coordinate mapping at different scales. The present invention uses Hough transform to perform circle detection on text images at different scales and obtain the corresponding circle center coordinates. By comparing these circle center coordinates through coordinate mapping, the error circle formed by text fitting is effectively removed, thereby improving the detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of seal detection and extraction, in particular to a seal extraction method based on multi-scale Hough transform. Background Art

[0002] Office automation and intelligence are the main technical development directions of smart government affairs at present. Among them, seal is the most representative text feature seal detection and has a wide range of application scenarios.

[0003] In recent years, many effective methods and systems for identifying seals have been developed, such as extracting the red component, converting the seal image to be detected from the RGB color model to the HIS color space model, and using the Hough transform to detect the seal center and radius; binarizing the red pixels of the image containing the seal, setting a specific minimum and maximum radius according to the actual size of the seal, and then using the Hough transform to detect a specific circular area according to the set radius interval. The above is based on the color and morphological features of the seal for seal detection. It can be seen that the Hough transform has been proven to have a certain ability to detect seals, but there are still the following shortcomings:

[0004] 1. The traditional Hough transform only performs shape detection. Since this method traverses all edge points and performs shape detection based on a parameter voting mechanism, discrete edge points in different intervals of the image can also be fitted into circles. This phenomenon is particularly prominent in circle detection of text materials. Random fitting between words will form multiple circles of different sizes, causing obvious interference to seal detection.

[0005] 2. Hough transform is more dependent on the set accumulator threshold. When detecting circles in an image, if the accumulator threshold is set low, many noise circles will appear due to the influence of text or other factors in the image. If the accumulator threshold is set high, only noise circles may be identified due to the influence of noise in the image, and the real seal circle may not be identified. Summary of the invention

[0006] The purpose of the present invention is to address the problems existing in the field of seal detection using Hough transform, and to propose a method for identifying seals based on Hough transform and coordinate mapping at different scales. Using Hough transform, circle detection is performed on text images at different scales to obtain corresponding circle center coordinates. These circle center coordinates are compared through coordinate mapping, thereby effectively removing the error circle formed by text fitting and improving detection accuracy.

[0007] The technical solution to achieve the purpose of the present invention is: a seal extraction method based on multi-scale Hough transform, the method comprising the following steps:

[0008] Step 1: Read the image to be processed, marked as I 0 ;

[0009] Step 2, I 0 The noise reduction process is performed and the noise reduction result is recorded as

[0010] Step 3, Perform Hough transform, and the parameter set of the detected circle is recorded as P 0 , represents the parameters of the i-th circle, i=1,2,...,M, M is the number of circles;

[0011] Step 4, set k=1;

[0012] Step 5, I 0 Downsampling, that is, I 0 Reduce the width and height by 1 / 2 k The result is recorded as I k ;

[0013] Step 6, I k Perform noise reduction;

[0014] Step 7, I k Perform Hough transform, and the detected circle center parameter set is recorded as P k , represents the coordinates of the center of the jth circle, j=1,2,...,N, N is the number of circles;

[0015] Step 8, let i=1;

[0016] Step 9, if i≤M, execute step 10, otherwise execute step 11;

[0017] Step 10, if it exists If the following equation is true, then perform the operation i=i+1 and return to step 9, otherwise set P 0 In After setting to zero, perform the operation of i=i+1 and then return to step 9;

[0018]

[0019] Step 11, determine P 0 Is the number of non-zero elements in less than 2? If P 0 If the number of non-zero elements in is less than 2, proceed to the next step, otherwise perform the operation k=k+1 and return to step 5;

[0020] Step 12, determine P 0 Is the number of non-zero elements in equal to 1? If P 0 If the number of non-zero elements in is equal to 1, then proceed to the next step, otherwise it means P 0 The number of non-zero elements in is 0, and the output is "Detection failed!";

[0021] Step 13, by P 0 The non-zero elements in determine the center of the circle C(x center ,y center ) and radius r, at I 0 Draw a circle on the top to mark it.

[0022] Compared with the prior art, the present invention has the following significant advantages:

[0023] (1) The present invention mainly utilizes the consistency of image structural features under different scale conditions to extract seals, and the performance is more stable.

[0024] (2) Compared with the method of performing Hough transform at a fixed scale, this method can significantly suppress the random noise generated by text and patterns due to the use of multi-scale information, thereby improving the accuracy of extracting structural information.

[0025] (3) This method has strong threshold robustness, that is, there is no need to specially design a dedicated threshold for Hough transform structure extraction.

[0026] (4) The method runs fast. Since the method mainly uses downsampling information, the computational cost is small and the operation speed is fast.

[0027] The present invention is further described in detail below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 This is a flow chart of the seal extraction method based on multi-scale Hough transform. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0030] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0031] In one embodiment, a seal extraction method based on multi-scale Hough transform is provided, the method comprising the following steps:

[0032] Step 1: Read the image to be processed, marked as I 0 ;

[0033] Step 2, I 0 The noise reduction process is performed and the noise reduction result is recorded as

[0034] Step 3, Perform Hough transform, and the parameter set of the detected circle is recorded as P 0 , represents the parameters of the i-th circle, i=1,2,...,M, M is the number of circles;

[0035] Step 4, set k=1;

[0036] Step 5, I 0 Downsampling, that is, I 0 Reduce the width and height by 1 / 2 k The result is recorded as I k ;

[0037] Step 6, I k Perform noise reduction;

[0038] Step 7, I k Perform Hough transform, and the detected circle center parameter set is recorded as P k , represents the coordinates of the center of the jth circle, j=1,2,...,N, N is the number of circles;

[0039] Step 8, let i=1;

[0040] Step 9, if i≤M, execute step 10, otherwise execute step 11;

[0041] Step 10, if it exists If the following equation is true, then perform the operation i=i+1 and return to step 9, otherwise set P 0 In After setting to zero, perform the operation of i=i+1 and then return to step 9;

[0042]

[0043] Step 11, determine P 0 Is the number of non-zero elements in less than 2? If P 0If the number of non-zero elements in is less than 2, proceed to the next step, otherwise perform the operation k=k+1 and return to step 5;

[0044] Step 12, determine P 0 Is the number of non-zero elements in equal to 1? If P 0 If the number of non-zero elements in is equal to 1, then proceed to the next step, otherwise it means P 0 The number of non-zero elements in is 0, and the output is "Detection failed!";

[0045] Step 13, by P 0 The non-zero elements in determine the center of the circle C(x center ,y center ) and radius r, at I 0 Draw a circle on the top to mark it.

[0046] Further, in one embodiment, step 2 is described in I 0 Perform noise reduction processing, the specific process includes:

[0047] Step 2-1, for I 0 Perform Gaussian smoothing;

[0048] Step 2-2: perform corrosion and expansion operations to obtain noise reduction results Where G is the Gaussian kernel.

[0049] Further, in one embodiment, step 5 is described in I 0 Downsampling is performed, and the specific process includes:

[0050] Step 5-1: Use radial basis function K for convolution calculation Represents the convolution operation; the radial basis function expression is:

[0051]

[0052] Among them, x c is the center of the kernel function, σ is the width parameter of the function;

[0053] Step 5-2, delete even-numbered rows and columns.

[0054] Further, in one embodiment, step 6 is performed on I k Noise reduction is performed. The specific process includes:

[0055] Step 6-1, for I k Perform Gaussian smoothing;

[0056] Step 6-2: perform corrosion and expansion operations to obtain noise reduction results Where G is the Gaussian kernel.

[0057] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0058] Step 1: Read the image to be processed, marked as I 0 ;

[0059] Step 2, I 0 The noise reduction process is performed and the noise reduction result is recorded as

[0060] Step 3, Perform Hough transform, and the parameter set of the detected circle is recorded as P 0 , represents the parameters of the i-th circle, i=1,2,...,M, M is the number of circles;

[0061] Step 4, set k=1;

[0062] Step 5, I 0 Downsampling, that is, I 0 Reduce the width and height by 1 / 2 k The result is recorded as I k ;

[0063] Step 6, I k Perform noise reduction;

[0064] Step 7, I k Perform Hough transform, and the detected circle center parameter set is recorded as P k , represents the coordinates of the center of the jth circle, j=1,2,...,N, N is the number of circles;

[0065] Step 8, let i=1;

[0066] Step 9, if i≤M, execute step 10, otherwise execute step 11;

[0067] Step 10, if it exists If the following equation is true, then perform the operation i=i+1 and return to step 9, otherwise set P 0 In After setting to zero, perform the operation of i=i+1 and then return to step 9;

[0068]

[0069] Step 11, determine P 0 Is the number of non-zero elements in less than 2? If P 0 If the number of non-zero elements in is less than 2, proceed to the next step, otherwise perform the operation k=k+1 and return to step 5;

[0070] Step 12, determine P 0 Is the number of non-zero elements in equal to 1? If P 0 If the number of non-zero elements in is equal to 1, then proceed to the next step, otherwise it means P 0 The number of non-zero elements in is 0, and the output is "Detection failed!";

[0071] Step 13, by P 0 The non-zero elements in determine the center of the circle C(x center ,y center ) and radius r, at I 0 Draw a circle on the top to mark it.

[0072] For the specific limitations of each step, please refer to the limitations of the seal extraction method based on multi-scale Hough transform in the above text, which will not be repeated here.

[0073] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0074] Step 1: Read the image to be processed, marked as I 0 ;

[0075] Step 2, I 0 The noise reduction process is performed and the noise reduction result is recorded as

[0076] Step 3, Perform Hough transform, and the parameter set of the detected circle is recorded as P 0 , represents the parameters of the i-th circle, i=1,2,...,M, M is the number of circles;

[0077] Step 4, set k=1;

[0078] Step 5, I 0 Downsampling, that is, I 0 Reduce the width and height by 1 / 2 k The result is recorded as I k ;

[0079] Step 6, I k Perform noise reduction;

[0080] Step 7, I k Perform Hough transform, and the detected circle center parameter set is recorded as P k , represents the coordinates of the center of the jth circle, j=1,2,...,N, N is the number of circles;

[0081] Step 8, let i=1;

[0082] Step 9, if i≤M, execute step 10, otherwise execute step 11;

[0083] Step 10, if it exists If the following equation is true, then perform the operation i=i+1 and return to step 9, otherwise set P 0 In After setting to zero, perform the operation of i=i+1 and then return to step 9;

[0084]

[0085] Step 11, determine P 0 Is the number of non-zero elements in less than 2? If P 0 If the number of non-zero elements in is less than 2, proceed to the next step, otherwise perform the operation k=k+1 and return to step 5;

[0086] Step 12, determine P 0 Is the number of non-zero elements in equal to 1? If P 0 If the number of non-zero elements in is equal to 1, then proceed to the next step, otherwise it means P 0 The number of non-zero elements in is 0, and the output is "Detection failed!";

[0087] Step 13, by P 0 The non-zero elements in determine the center of the circle C(x center ,y center ) and radius r, in I 0 Draw a circle on the top to mark it.

[0088] For the specific limitations of each step, please refer to the limitations of the seal extraction method based on multi-scale Hough transform in the above text, which will not be repeated here.

[0089] As some examples, the present invention is further verified and explained in one of the embodiments.

[0090] 1. Results of Hough transform under different accumulator thresholds

[0091] When detecting seals, text will cause great interference, and the number of detected circles, the center position (x, y) and the radius r will change due to the different accumulator threshold values, resulting in great interference in the recognition of circular seals.

[0092] 2. Hough transform results of different scales under the premise of fixed accumulator threshold

[0093] When the image is at different scales, although the threshold is proportional to the scaling factor, the number, position, size, etc. of the circles detected by the Hough transform are different from those detected in the original image.

[0094] 3. Results of the multi-scale multi-threshold coordinate backtracking method of the present invention

[0095] The method of the present invention can eliminate the interference caused by text to the greatest extent, and does not require frequent adjustment of the threshold value, and can accurately identify the seal even at a lower accumulator threshold value.

[0096] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A seal extraction method based on multi-scale Hough transform, characterized in that: The method comprises the following steps: Step 1: Read the image to be processed, marked as I 0 ; Step 2, I 0 The noise reduction process is performed and the noise reduction result is recorded as Step 3, Perform Hough transform, and the parameter set of the detected circle is recorded as P 0 , represents the parameters of the i-th circle, M is the number of circles; Step 4, set k=1; Step 5, I 0 Downsampling, that is, I 0 Reduce the width and height by 1 / 2 k The result is recorded as I k ; Step 6, I k Perform noise reduction; Step 7, I k Perform Hough transform, and the detected circle center parameter set is recorded as P k , represents the coordinates of the center of the jth circle, N is the number of circles; Step 8, let i=1; Step 9, if i≤M, execute step 10, otherwise execute step 11; Step 10, if it exists If the following equation is true, then perform the operation i=i+1 and return to step 9, otherwise set P 0 In After setting to zero, perform the operation of i=i+1 and then return to step 9; Step 11, determine P 0 Is the number of non-zero elements in less than 2? If P 0 If the number of non-zero elements in is less than 2, continue to the next step, otherwise perform the operation of k=k+1 and return to step 5; Step 12, determine P 0 Is the number of non-zero elements in equal to 1? If P 0 If the number of non-zero elements in is equal to 1, then proceed to the next step, otherwise it means P 0 The number of non-zero elements in is 0, and the output is "Detection failed!"; Step 13, by P 0 The non-zero elements in determine the center of the circle C(x center ,y center ) and radius r, at I 0 Draw a circle on the top to mark it.

2. The seal extraction method based on multi-scale Hough transform according to claim 1 is characterized in that: Step 2 0 Perform noise reduction processing, the specific process includes: Step 2-1, for I 0 Perform Gaussian smoothing; Step 2-2: perform corrosion and expansion operations to obtain noise reduction results Where G is the Gaussian kernel.

3. The seal extraction method based on multi-scale Hough transform according to claim 1 is characterized in that: Step 5 0 Downsampling is performed, and the specific process includes: Step 5-1: Use radial basis function K for convolution calculation Represents the convolution operation; the radial basis function expression is: Among them, x c is the center of the kernel function, σ is the width parameter of the function; Step 5-2, delete even-numbered rows and columns.

4. The seal extraction method based on multi-scale Hough transform according to claim 1 is characterized in that: Step 6 k Noise reduction is performed. The specific process includes: Step 6-1, for I k Perform Gaussian smoothing; Step 6-2: perform corrosion and expansion operations to obtain noise reduction results Where G is the Gaussian kernel.

5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • A method, a device and an apparatus for identifying shapes in images and a computer storage medium

    CN107710229A

  • Anti-counterfeit checking method, device and computer-readable storage medium for seal

    CN109635818A

  • Seal extraction and character recognition method and device

    CN112329756A

  • A seal identification method, device and equipment based on Hough transform, and a storage medium

    CN112686255A