Particle region detection and correction method for particle indentation detection
By preprocessing the input image and setting the adaptive gradient threshold technology, combined with multiple boundary search technology, the boundary position of the particle region is dynamically adjusted, and the problems of insufficient adaptability and low accuracy of particle region detection and correction in the prior art are solved, and efficient and accurate particle region detection and correction are achieved.
Patent Information
- Application Number
- CN202510329141.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art has problems such as insufficient adaptability, low accuracy, low computational efficiency and difficulty in handling complex images and multi-directional particle regions in particle region detection and correction.
By preprocessing the input image, the average value of the particle region is extracted, and combined with the adaptive gradient threshold setting technology, the boundary position of the particle region is dynamically adjusted, and the multiple boundary search technology is used to accurately detect and correct the particle region position and width in the image.
It realizes the advantages of strong adaptability, high accuracy and high computing efficiency. It is especially suitable for image processing and real-time application scenarios of complex particle region structures, significantly improving the accuracy and processing efficiency of particle region correction.
Smart Images

Figure CN119887594A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a particle area detection and correction method for particle indentation detection. Background Art
[0002] In the field of image processing, particle regions need to be detected and corrected. Common solutions in existing technologies include edge detection, gradient threshold method, frequency domain analysis, and deep learning segmentation methods. However, these methods often have limitations in practical applications.
[0003] The image processing technology in the prior art has many deficiencies in particle area detection and correction.
[0004] First, traditional edge detection and gradient threshold methods rely on fixed threshold settings and lack adaptability to local image characteristics. In the case of uneven image illumination and high noise interference, such methods are difficult to accurately detect the boundaries of particle regions, resulting in low accuracy of particle region correction.
[0005] Secondly, although the method based on frequency domain analysis is effective for periodic noise, it has limited effect when facing irregular particle areas.
[0006] In addition, although the deep learning technology widely used in recent years can provide high-precision detection in image segmentation tasks, its high computational cost and hardware resource requirements limit its promotion in practical applications. Especially in embedded devices or real-time processing scenarios, the application of such technology is greatly restricted.
[0007] Although adaptive threshold methods (such as the Otsu algorithm) can be adjusted according to local characteristics, they still suffer from large errors and inaccurate corrections when faced with precise adjustment and correction of particle regions.
[0008] Finally, the existing technology also has shortcomings in the fine adjustment of the boundaries of the particle area. It is difficult to deal with small particle areas and multi-directional particle areas in complex images, resulting in unsatisfactory correction results. Summary of the invention
[0009] The purpose of the present invention is to provide a technical solution for a particle region detection and correction method for particle indentation detection in view of the deficiencies in the prior art. The particle region detection and correction method preprocesses the input image, extracts the average value of the particle region, and combines the adaptive gradient threshold setting technology to dynamically adjust the boundary position of the particle region. The method uses multiple boundary search technology to accurately detect and correct the position and width of the particle region in the image. Compared with the prior art, this method has the advantages of strong adaptability, high precision, and high computational efficiency, and is particularly suitable for image processing and real-time application scenarios of complex particle region structures.
[0010] In order to solve the above technical problems, the present invention adopts the following technical solutions: A particle area detection and correction method for particle indentation detection, characterized by comprising the following steps: S1. Extract the average value of the particle area: obtain the image size, calculate the average value of the direction variable of the image according to the set direction variable, and store the result in the convolution result vector; S2. Setting adjustment range and threshold: defining the particle region length offset ratio, calculating the upper and lower limits of the adjusted particle region length, and setting the gradient threshold; S3, traversing the particle area for adjustment: first, setting the search range by calculating the adjustment boundary of each particle area, calculating the initial threshold based on the image gray value, which is used to judge the intensity change of the edge of the particle area, and then setting the search center and search area of the particle area, searching for the particle area edge that meets the initial threshold from the search center to both sides, and then searching for the adjustment start point and adjustment end point in the search area to perform boundary correction; S4, fine-tuning correction: tighten the adjusted start and end points through fine-tuning thresholds, so that the length of the particle area is close to the preset length, and repeat the above process for each particle area, thereby completing the automatic correction of all particle areas.
[0011] The particle region detection and correction method preprocesses the input image, extracts the average value of the particle region, and combines the adaptive gradient threshold setting technology to dynamically adjust the boundary position of the particle region. It uses multiple boundary search technology to accurately detect and correct the position and width of the particle region in the image. Compared with the existing technology, this method has the advantages of strong adaptability, high precision, and high computational efficiency. It is particularly suitable for image processing and real-time application scenarios with complex particle region structures.
[0012] The present invention has the following beneficial effects due to the adoption of the above technical solution: The particle region detection and correction method of the present invention preprocesses the input image, extracts the average value of the particle region, combines the adaptive gradient threshold setting technology, dynamically adjusts the boundary position of the particle region, and uses multiple boundary search technology to accurately detect and correct the position and width of the particle region in the image. Compared with the existing technology, this method has the advantages of strong adaptability, high precision, high computational efficiency, etc., and is particularly suitable for image processing and real-time application scenarios of complex particle region structures.
[0013] The invention is highly adaptable and adaptable to complex scenes: through adaptive gradient threshold setting and multiple boundary searches, the algorithm can dynamically respond to problems such as illumination changes, image noise, and irregular particle regions, ensuring accurate detection and correction of particle region boundaries. This technology is particularly suitable for complex particle region structures.
[0014] The present invention can achieve high-precision correction: in actual tests, based on the algorithm of the present invention, the average error rate of particle area correction is reduced to less than 5%, which is significantly better than the traditional technical solution. In different types of images, regardless of how the particle area direction, width and intensity change, high-precision boundary detection and correction can be achieved.
[0015] The processing efficiency of the present invention is significantly improved: the image processing flow is optimized, and the algorithm execution time is shortened by about 30% by reducing redundant calculations and fine-tuning boundary adjustments. When processing large-size images (such as 4K resolution), the correction time is shortened from 1 second to 0.4 seconds, which is particularly suitable for scenarios requiring real-time processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described below in conjunction with the accompanying drawings: Figure 1 A flow chart of a particle area detection and correction method for particle indentation detection according to the present invention; Figure 2 It is a flowchart of the present invention; Figure 3 This is an application effect diagram of selecting the first frame in the present invention; Figure 4 This is an application effect diagram of selecting the second frame in the present invention; Figure 5 This is an application effect diagram of selecting the last frame in the present invention; Figure 6 This is the application effect diagram after correction in the present invention. DETAILED DESCRIPTION
[0017] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0018] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0020] like Figure 1 to Figure 2 As shown, a particle area detection and correction method for particle indentation detection of the present invention comprises the following steps: First, enter the particle area adjustment function, input the image width and image height into the image size, and determine the adjustment direction according to the set direction variable. Ensure the validity of the input parameters, including the image size and the number of particle areas, ensure that the image width and height are not 0, and ensure that the number of particle areas is not 0. If the conditions are not met, return false in advance.
[0021] S1. Extract the average value of the particle area: obtain the image size, calculate the average value of the direction variable of the image according to the set direction variable, and store the result in the convolution result vector for subsequent particle area position detection.
[0022] Directional variables include horizontal variables and vertical variables, where 0 is a horizontal variable and 1 is a vertical variable.
[0023] S2. Set adjustment range and threshold: define the particle area length offset ratio, calculate the upper and lower limits of the adjusted particle area length, and set the gradient threshold to ensure that the change in particle area length during correction does not exceed the set ratio. The default ratio in this application is 100%.
[0024] Adjust the lower limit of particle area length = particle area length * (1.0-(particle area length offset ratio / 100.0)) Adjust the upper limit of particle area length = particle area length * (1.0 + (particle area length offset ratio / 100.0)) S3, traverse the particle area for adjustment: first set the search range by calculating the adjustment boundary of each particle area, calculate the initial threshold based on the image gray value, which is used to judge the intensity change of the edge of the particle area; the initial threshold = the average gray value of the image in the initial frame * the gradient threshold.
[0025] The average grayscale value of the image in the initial frame = mean(image(rectangular area)) Search scope validity: searchrange[0]=max(0,searchrange[0]) searchrange[1]=min(length-1,searchrange[1]) The initial position of the first particle region is taken from the original starting position list, while subsequent particle regions are calculated based on the position of the previous particle region.
[0026] The method for judging the intensity change of the edge of the particle region specifically includes whether the intensity change of the edge of the particle region is lower than the image grayscale value calculated based on each initial frame.
[0027] Then, the search center and the search area of the particle area are set, and the particle area edge that meets the initial threshold is searched from the search center to both sides; Searching for the particle region edge that meets the initial threshold from the search center to both sides specifically includes searching the boundary from the search center outwards, and moving one pixel at a time according to the limited adjustment boundary to realize the search of the particle region boundary.
[0028] Then, the adjustment starting point and the adjustment end point are found in the search area to perform boundary correction; Searching for the adjustment start point and end point within the search area and performing boundary correction specifically includes the following steps: S3.1 When in the convolution result vector, find the adjustment start point and adjustment end point that meet the initial threshold from the search area, and determine the actual boundary of the current particle area; S3.2 When the boundary cannot be found or the boundary found does not meet the requirements, it is considered necessary to reset the positions of the start and end points and mark them as "needs adjustment" status.
[0029] S4, fine-tuning correction: tighten the adjusted start and end points through fine-tuning thresholds, so that the length of the particle area is close to the preset length, and repeat the above process for each particle area, thereby completing the automatic correction of all particle areas.
[0030] When using fine-tuning threshold, the fine-tuning threshold is compared with the initial frame, and when the width is abnormal, it is adjusted according to the initial frame.
[0031] Fine-tuning threshold = convolution result [adjustment starting point] * fine-tuning threshold ratio.
[0032] After the fine-tuning correction is completed, the starting position and the ending position are updated, which specifically includes the following steps: S5.1 if a valid adjustment start point and an adjustment end point are found, the corresponding particle region positions in the start position and end position lists are updated; S5.2 If the adjustment fails, the original particle region position is retained.
[0033] The particle region detection and correction method preprocesses the input image, extracts the average value of the particle region, and combines the adaptive gradient threshold setting technology to dynamically adjust the boundary position of the particle region. It uses multiple boundary search technology to accurately detect and correct the position and width of the particle region in the image. Compared with the existing technology, this method has the advantages of strong adaptability, high accuracy, and high computational efficiency. It is particularly suitable for image processing and real-time application scenarios with complex particle region structures. Figures 3 to 6 For example, before calibration, select the first pin. Figure 3 As shown, select the second pin to determine the spacing, such as Figure 4As shown, the last pin is then selected and the original frame (uncorrected frame) is determined based on the fixed spacing, as shown in Figure 5 As shown, after correction, Figure 5 Correction Figure 6 .
[0034] The above are only specific embodiments of the present invention, but the technical features of the present invention are not limited thereto. Any simple changes, equivalent replacements or modifications made based on the present invention to achieve basically the same technical effects are all included in the protection scope of the present invention.
Claims
1. A particle area detection and correction method for particle indentation detection, characterized in that The steps include: S1. Extracting the average value of the particle area: obtaining the image size, calculating the average value of the direction variable of the image according to the set direction variable, and storing the result in the convolution result vector; S2. Setting adjustment range and threshold: defining the particle region length offset ratio, calculating the upper and lower limits of the adjusted particle region length, and setting the gradient threshold; S3, traversing the particle area for adjustment: first, setting the search range by calculating the adjustment boundary of each particle area, calculating the initial threshold based on the image gray value, which is used to judge the intensity change of the edge of the particle area, and then setting the search center and search area of the particle area, searching for the particle area edge that meets the initial threshold from the search center to both sides, and then searching for the adjustment start point and adjustment end point in the search area to perform boundary correction; S4, fine-tuning correction: tighten the adjusted start and end points through fine-tuning thresholds, so that the length of the particle area is close to the preset length, and repeat the above process for each particle area, thereby completing the automatic correction of all particle areas.
2. A particle area detection and correction method for particle indentation detection according to claim 1, characterized in that: The direction variable in step S1 includes a horizontal variable and a vertical variable, where 0 is a horizontal variable and 1 is a vertical variable.
3. The particle area detection and correction method for particle indentation detection according to claim 1, characterized in that: The initial threshold in step S3 = the average grayscale value of the image in the initial frame * the gradient threshold.
4. The particle area detection and correction method for particle indentation detection according to claim 1, characterized in that: The initial position of the first particle region in step S3 is taken from the original starting position list, while subsequent particle regions are calculated based on the position of the previous particle region.
5. The particle area detection and correction method for particle indentation detection according to claim 1, characterized in that: The step S3 for judging the intensity change of the edge of the particle region specifically includes whether the intensity change of the edge of the particle region is lower than the image grayscale value calculated based on each initial frame.
6. A particle area detection and correction method for particle indentation detection according to claim 1, characterized in that: Searching for the particle region edge that meets the initial threshold from the search center to both sides in step S3 specifically includes searching the boundary from the search center outwards, and moving one pixel at a time according to the defined adjustment boundary to realize the search of the particle region boundary.
7. A particle area detection and correction method for particle indentation detection according to claim 1, characterized in that: In step S3, the adjustment starting point and the adjustment end point are searched in the search area, and the boundary correction is performed, which specifically includes the following steps: S3.1 When an adjustment start point and an adjustment end point that meet the initial threshold value are found in the convolution result vector from the search area, the actual boundary of the current particle area is determined; S3.2 When the boundary cannot be found or the found boundary does not meet the requirements, it is considered necessary to reset the start and end points and mark them as "needs adjustment" status.
8. The particle area detection and correction method for particle indentation detection according to claim 1, characterized in that: When the fine-tuning threshold is used in step S4, the fine-tuning threshold is compared with the initial frame, and when the width is abnormal, adjustment is made according to the initial frame.
9. A particle area detection and correction method for particle indentation detection according to claim 1, characterized in that: After the fine-tuning correction in step S4 is completed, the starting position and the ending position are updated, which specifically includes the following steps: S4.1 If a valid adjustment start point and an adjustment end point are found, the corresponding particle region positions in the start position and end position lists are updated; S4.2 If the adjustment fails, the original particle region position is retained.
Citation Information
Patent Citations
Conductive particle detection method
CN113112396A