An on-site image correction and measurement system for trace image distortion
By processing the trace image through a deep learning network, determining the direction of tangential distortion and screening the appropriate pooling window side length, the problem of inaccurate image distortion correction caused by not considering device edge distortion in the existing technology is solved, and accurate correction and feature recovery of the trace image are achieved.
Patent Information
- Application Number
- CN202510970065.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-07-15
AI Technical Summary
In the prior art, only the two-dimensional scale in the trace image is used as a restoration reference for image distortion correction, without considering the edge distortion of the device itself, resulting in inaccurate image distortion correction.
A deep learning network is used to process the trace image. The trace area and the two-dimensional ruler area are divided by the activation value acquisition module. The actual tangential distortion direction determination module is used to determine the tangential distortion direction. Combined with the blur performance acquisition module and the distortion correction module, the appropriate pooling window side length value is screened to achieve distortion correction of the trace image.
The accuracy of trace image distortion correction is improved, the accuracy and reliability of trace parameter measurement are ensured, the original characteristics of the trace are restored, and the detailed information hidden by the distortion is discovered.
Smart Images

Figure CN120471810B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image correction, and in particular to an on-site image correction and measurement system for trace image distortion. Background Art
[0002] Trace images are images obtained by collecting and processing traces on an object's surface, such as fingerprints and footprints. Distortion can distort trace images, causing deviations from the actual shape, size, texture, and other characteristics of the trace, affecting the accuracy of trace parameter measurements. Correcting trace images accurately restores the trace's original characteristics, providing precise data support for trace comparison and identification, improving the accuracy and reliability of trace identification, and facilitating the discovery of details that may be obscured by distortion.
[0003] A two-dimensional ruler is a reference object with known length and width. Placed near a trace or on the surface of the trace object captured alongside the trace, it provides a reference of known dimensions in the image. Typically, restoration is performed using the two-dimensional ruler in the trace image as a restoration reference. However, this method fails to account for the inherent edge distortion of the device itself, resulting in inaccurate image restoration. Summary of the Invention
[0004] The present invention provides an on-site image correction and measurement system for trace image distortion, which solves the problem of inaccurate image distortion correction caused by using only the two-dimensional scale in the trace image as a restoration reference, without considering the edge distortion of the device itself. The technical solution adopted is as follows:
[0005] An embodiment of the present invention provides an on-site image correction and measurement system for trace image distortion, the system comprising the following modules:
[0006] The activation value acquisition module is used to process the trace image using a deep learning network, obtain the activation value of each pixel in the candidate area at each convolution layer, and divide the trace area and the two-dimensional ruler area in the trace image;
[0007] an actual tangential distortion direction determination module, configured to divide the suspected trace area within the candidate area within the same pooling layer, determine the blurring degree of the suspected trace area based on the numerical distribution of activation values of adjacent pixels outside the edge of the suspected trace area and pixels within the suspected trace area, determine the tangential distortion direction determined by the suspected trace area of the same pooling layer based on the blurring degrees of all suspected trace areas of the same pixel contained in the same pooling layer, obtain the tangential distortion direction determined by the two-dimensional ruler area within the same pooling layer based on the two-dimensional ruler area within the same pooling layer, and determine the actual tangential distortion direction of the trace image based on the tangential distortion directions determined by all the two-dimensional ruler areas;
[0008] A blur performance acquisition module is used to pool the candidate area using the first preset parameter as the side length of the pooling window, record any pooling layer as the target pooling layer, screen the side length values of some pooling windows according to the difference in activation values of the pixel points in the pooling windows of the target pooling layer and all other pooling layers, determine the third mean value based on the side length values of all screened pooling windows, and combine the blur levels of all suspected trace areas of the same pixel point contained in the same pooling layer to obtain the blur performance of each pixel point in the trace image respectively;
[0009] The distortion correction module is used to realize the distortion correction of the trace image according to the difference in blurring performance of the pixels in the trace image and the difference between the two-dimensional ruler area in the trace image and the standard image of the two-dimensional ruler.
[0010] Furthermore, the method for obtaining the suspected trace area is:
[0011] When the activation value of a pixel point is greater than a preset activation value threshold, the pixel point is recorded as a suspected trace pixel point, and the area formed by the suspected trace pixel points is recorded as a suspected trace area.
[0012] Furthermore, the method for determining the blurring degree of the suspected trace area is as follows:
[0013] The maximum value and the minimum value of the activation value in the suspected trace area are used as the upper limit and the lower limit of the value range of the activation value in the suspected trace area respectively, and the value range of the activation value is divided by a preset division span parameter to obtain the value sub-range of the activation value in the suspected trace area, and the ratio of the number of activation values contained in the value sub-range containing the largest number of activation values to the number of activation values in the suspected trace area is recorded as the first ratio of the suspected trace area, and the ratio of the range of activation values in the suspected trace area to the first ratio of the suspected trace area is recorded as the activation value complexity of the suspected trace area;
[0014] The average of the differences between the activation values of the edge pixels in the suspected trace area and the pixels in the eight neighborhoods of the edge pixels that are not in the suspected trace area is recorded as the edge pixel's off-edge difference mean. The average of the edge pixel's off-edge difference means is recorded as the first mean of the suspected trace area.
[0015] The ratio of the activation value complexity of the suspected trace area to the first mean is recorded as the blurring degree of the suspected trace area.
[0016] Furthermore, the method of determining the tangential distortion direction of the suspected trace area of the same pooling layer according to the blurring degree of all suspected trace areas of all the same pixel points contained in the same pooling layer includes the following specific methods:
[0017] The average blurring degree of all suspected trace areas containing the same pixel in the same pooling layer is recorded as the blurring evaluation value of the same pixel;
[0018] Select the pixel point with the smallest blur evaluation value in the same pooling layer as the starting point of the ray of the same pooling layer, and make 20 rays evenly from the horizontal right direction with the starting point of the ray as the endpoint; for each ray with the starting point of the ray as the endpoint, the difference between the blur evaluation value of the pixel point on the ray and the next adjacent blur evaluation value along the extension direction of the ray is recorded as the adjacent blur difference of the pixel point corresponding to the blur evaluation value, and the number of pixels less than 0 in the adjacent blur differences of the pixel points on the ray is recorded as the first number of the ray; the average of the adjacent blur differences of the pixel points on the ray is recorded as the adjacent blur average difference of the ray, and the cumulative sum of the differences between the adjacent blur differences of all pixels on the ray and the adjacent blur average difference is recorded as the adjacent blur difference degree of the ray; the difference between the blur evaluation value of the starting point of the ray and the minimum value of the blur evaluation value of the pixel points on the ray is recorded as the first difference of the ray; the ratio of the product of the first number of rays and the first difference to the adjacent blur difference degree is recorded as the direction conformity of the ray;
[0019] According to the directional consistency of all rays in the same pooling layer, the tangential distortion direction determined by the suspected trace area of the pooling layer is determined.
[0020] Furthermore, the tangential distortion direction of the suspected trace area of the pooling layer is determined based on the directional consistency of all rays of the same pooling layer, and the specific method includes:
[0021] The direction of the ray with the largest direction conformity in the same pooling layer is recorded as the tangential distortion direction determined by the suspected trace area of the pooling layer where the ray is located.
[0022] Furthermore, the actual tangential distortion direction of the trace image is determined as follows:
[0023] The tangential distortion direction determined by the two-dimensional ruler area in the pooling layer is used as the direction of the vector, and the distance between the starting point of the ray and the pixel with the largest blurring evaluation value in the pooling layer where the ray starting point is located is used as the magnitude of the vector to obtain the two-dimensional ruler vector of the pooling layer; the vector summation result of the two-dimensional ruler vectors of all pooling layers is recorded as the actual tangential distortion direction of the trace image.
[0024] Furthermore, the method of screening the side length values of some pooling windows based on the difference in activation values of pixels within the pooling windows of the target pooling layer and all other pooling layers includes the following specific methods:
[0025] Using the preset first preset parameter as the side length of the pooling window, pooling the candidate area, obtaining all pooling windows in each pooling layer, recording any pooling layer as the target pooling layer, recording any pooling window of the target pooling layer as the target pooling window, recording the pooling window of the same pixel point of the trace image as the target pooling window in other pooling layers that are not the target pooling layer as the pooling window corresponding to the target pooling window, recording the mean of the activation values of the pixel points contained in the pooling window corresponding to the target pooling window as the activation mean of the pooling window corresponding to the target pooling window, recording the difference between the mean of the activation values of the pixel points contained in the target pooling window and the maximum value of the activation mean of all pooling windows corresponding to the target pooling window as the second difference of the target pooling window, and summing the second differences of all pooling windows of the target pooling layer as the first accumulated value of the target pooling layer;
[0026] The angle between the tangential distortion direction determined by the suspected trace area of the target pooling layer and the actual tangential distortion direction of the trace image is recorded as the tangential distortion difference angle of the target pooling layer;
[0027] The normalized value of the product of the tangential distortion difference angle of the target pooling layer and the first accumulated value is recorded as the inappropriateness of the side length of the pooling window of the target pooling layer;
[0028] The side length values of the pooling window of the target pooling layer whose unsuitability is less than or equal to the judgment threshold are screened out.
[0029] Furthermore, the third mean is determined as follows:
[0030] The side length of the pooling window is reduced with a step size of 1, and the candidate area is pooled with each value of the side length of the pooling window. The unsuitability of the side length value of the pooling window of the standard pooling layer is obtained, and the side length value of the pooling window is screened.
[0031] Arrange the unsuitability values of the side lengths of the pooling windows filtered out by the target pooling layer in descending order of the side lengths of the pooling windows to obtain an unsuitability sequence, and record the mean of all values contained in the first-order difference sequence of the unsuitability sequence as the second mean;
[0032] The mean of the second means corresponding to all pooling layers is recorded as the third mean.
[0033] Furthermore, the method for obtaining the blurring performance of each pixel in the trace image is as follows:
[0034] For the side length value of the filtered pooling window, the product of the cumulative sum of the blur evaluation values of all pooling layers where the pixel is located and the third mean is recorded as the blur performance of the pixel.
[0035] Furthermore, the distortion correction of the trace image is achieved based on the difference in blurring performance of pixels in the trace image and the difference between the two-dimensional ruler area in the trace image and the standard image of the two-dimensional ruler, including the specific method of:
[0036] Any pixel in the trace image is recorded as a target pixel, the pixel with the smallest blur performance in the trace image is recorded as a feature pixel, and the Euclidean distance between the target pixel and the feature pixel is recorded as the first distance of the target pixel; the angle between the directed line segment pointing from the target pixel to the feature pixel and the actual tangential distortion direction of the trace image is recorded as the first angle of the target pixel; the ratio of the blur performance of the target pixel to the maximum value of the blur performance of all pixels in the trace image is recorded as the blur normalized performance of the target pixel; the product of the first distance of the target pixel, the first angle, and the blur normalized performance is recorded as the movement degree of the target pixel;
[0037] Shifting each pixel point in the two-dimensional ruler area in the trace image so that the two-dimensional ruler area in the trace image is the same as the standard image of the two-dimensional ruler, recording the Euclidean distance of the pixel points in the two-dimensional ruler area as the weight parameter of the pixel point, calculating the normalized value result of the product of the movement degree of the target pixel point and the weight parameter, and recording the product of the normalized value result of the product and the first distance of the target pixel point as the extension length of the target pixel point;
[0038] Each pixel point in the trace image is extended along the direction from the pixel point to the feature pixel point, and the extension length is equal to the extension length of the target pixel point to obtain the trace image after distortion correction.
[0039] The beneficial effects of the present invention are:
[0040] The present invention evaluates the blurring of the pooling layer according to the numerical distribution of activation values in the same pooling layer after the trace image is processed by the deep learning network, obtains the blurring degree of the suspected trace area, and further determines the tangential distortion direction according to the suspected trace area. In the same way, the tangential distortion direction is determined according to the two-dimensional ruler area, and the actual tangential distortion direction of the trace image is further determined. Then, different values of the side length of the pooling window are preset to pool the candidate area. According to the degree of ignoring the detail features after the image in the pooling window is magnified, and the possibility of deviation in the tangential distortion direction, the appropriateness of the value of the side length of the pooling window is evaluated, and the candidate area is screened. Select a suitable value for the side length of the pooling window; evaluate the degree of blurring at each pixel position based on the selected value for the side length of the pooling window, and obtain the blurring performance of each pixel in the trace image; finally, based on the difference in the blurring performance of the pixels in the trace image and the difference between the two-dimensional ruler area in the trace image and the standard image of the two-dimensional ruler, realize the distortion correction of the trace image, solve the problem of inaccurate image distortion correction caused by only using the two-dimensional ruler in the trace image as a restoration reference without considering the edge distortion of the device itself, and thus improve the accuracy of image distortion correction for the trace image. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 A schematic flow chart of an on-site image correction and measurement system for trace image distortion provided by one embodiment of the present invention;
[0043] Figure 2 This is a standard image of a two-dimensional ruler provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0045] See also Figure 1, which shows a flow chart of an on-site image correction and measurement system for trace image distortion provided by an embodiment of the present invention. The system includes: an activation value acquisition module, an actual tangential distortion direction determination module, a blur performance acquisition module, and a distortion correction module.
[0046] The activation value acquisition module uses a deep learning network to process the trace image, obtains the activation value of each pixel in the candidate area at each convolution layer, and divides the trace area and the two-dimensional ruler area in the trace image.
[0047] The trace image is processed using a deep learning network to obtain the feature map of the convolution layer, and the trace area and the two-dimensional ruler area in the trace image are divided.
[0048] Among them, the deep learning network selects a convolutional neural network, the convolution kernel is set to 3×3, and multiple layers of input channels are set, with 64, 128, 256, and 512 channels for each layer respectively; obtaining the feature map of the convolution layer, the trace area in the trace image, and the two-dimensional scale area through the convolutional neural network are all well-known technologies and will not be repeated here. Specifically, the convolutional neural network helps the trace image to converge faster through normalization, slides each convolution kernel on the trace image, and performs local area product summation. Each convolution kernel contains sub-kernels equal to the number of input channels. Each sub-kernel is summed after convolution with the corresponding input channel, and a bias term is added. After convolution, a nonlinear activation function such as ReLU and PReLU is connected to enhance the expression ability of the model to obtain the feature map of the convolution layer; the feature map output by the previous convolution layer is used as the input of the next convolution layer, and high-order features are gradually extracted by stacking multiple convolution layers. The candidate region is generated by the region proposal network RPN. The candidate region is a set of bounding boxes. The coordinates of the bounding box are mapped to the corresponding position of the feature map obtained by the last layer of convolution to extract the features of each candidate region; for example, 、 、 、 The multi-level pooling window performs maximum pooling on the features of the candidate area, and the pooling results of different levels are spliced according to the channel dimension to form a feature vector of fixed length; the fixed-length feature vector is input into the fully connected layer to determine whether the candidate area contains traces. When the candidate area contains traces, the coordinates of the candidate box are optimized through the regression network to determine the boundary of the candidate box. The area determined by the boundary of the candidate box is the trace area. The trace area is marked in the trace image, and the judgment result is output. The judgment result includes two types: the presence of traces and the absence of traces. When the judgment result is the presence of traces, the trace image with the marked trace area and the two-dimensional ruler area is output at the same time.
[0049] It can be understood that in the feature map of the convolution layer, the value of each pixel is an activation value, and the activation value is the characteristic response intensity of the trace feature presented by the pixel position; the trace image contains a two-dimensional ruler, so according to the feature map of the convolution layer, the activation values of all pixels contained in the two-dimensional ruler in the trace image can also be obtained, and the two-dimensional ruler area in the trace image can be obtained. The standard image of the two-dimensional ruler in this embodiment is as follows Figure 2 shown.
[0050] At this point, the activation value of each pixel in the candidate area in each convolution layer is obtained, and the trace area and the two-dimensional ruler area in the trace image are obtained.
[0051] The actual tangential distortion direction determination module divides the suspected trace area within the candidate area in the same pooling layer, determines the blurring degree of the suspected trace area according to the numerical distribution of the activation values of the adjacent pixels outside the edge of the suspected trace area and the pixels within the suspected trace area, determines the tangential distortion direction determined by the suspected trace area of the same pooling layer according to the blurring degrees of all suspected trace areas of all the same pixels contained in the same pooling layer, obtains the tangential distortion direction determined by the two-dimensional ruler area in the same pooling layer according to the two-dimensional ruler area in the same pooling layer, and determines the actual tangential distortion direction of the trace image according to the tangential distortion directions determined by all the two-dimensional ruler areas.
[0052] The tangential distortion direction refers to the displacement of the pixel point along the tangential direction caused by the non-parallelism of the lens of the camera that shoots the trace image to the imaging plane. It should be noted that the tangential distortion direction analyzed in this application is caused by the shooting angle when shooting the trace image. The farther away from the camera in the trace image, the greater the degree of distortion and blur. The degree of blur can be determined based on the distribution of activation values in the pooling layer where the pixel point is located.
[0053] The suspected trace area is determined based on the activation value of the pixel point.
[0054] For pixels in the candidate area of the same pooling layer, when the activation value of the pixel is greater than the activation value threshold, the pixel is recorded as a suspected trace pixel, and a connected domain analysis is performed on the suspected trace pixel to obtain the suspected trace area.
[0055] The blurring degree of the suspected trace area is determined based on the numerical distribution of the activation values of the pixels in the suspected trace area and the activation values of the pixels in the eight neighborhoods of the edge pixels in the suspected trace area.
[0056] Obtain the range of activation values within the suspected trace region. The upper limit of the activation value range is the maximum activation value within the suspected trace region, and the lower limit is the minimum activation value within the suspected trace region. The activation value range within the suspected trace region is divided by the partition span parameter to obtain sub-ranges of activation values within the suspected trace region. The ratio of the number of activation values contained in the sub-range containing the largest number of activation values to the number of activation values within the suspected trace region is recorded as the first ratio of the suspected trace region. The ratio of the range of activation values within the suspected trace region to the first ratio of the suspected trace region is recorded as the activation value complexity of the suspected trace region. The average of the differences between the activation values of edge pixels in the suspected trace region and pixels within the eight-neighborhood of the edge pixel that are not in the suspected trace region is recorded as the edge pixel's off-edge difference mean. The average of the off-edge difference means of all edge pixels in the suspected trace region is recorded as the first mean of the suspected trace region. The ratio of the activation value complexity of the suspected trace region to the first mean is recorded as the degree of blurring of the suspected trace region.
[0057] Among them, the activation value threshold is a preset threshold, and the value of the activation value threshold in this embodiment is 0.8; the division span parameter is a preset threshold, and the value of the division span parameter in this embodiment is 0.2; performing connected domain analysis on pixel points is a well-known technology and will not be repeated here.
[0058] When the sub-range containing the largest number of activation values contains fewer activation values and the range of activation values within the suspected trace region is larger, the distribution of activation values within the suspected trace region becomes more scattered. In this case, the complexity of activation values within the suspected trace region is greater, and the degree of blurring within the suspected trace region is greater. When the first mean value of the suspected trace region is smaller, the difference between the activation values within the suspected trace region and the activation values of adjacent external locations is less obvious, and the blurring characteristics of the suspected trace region are more significant. In this case, the degree of blurring within the suspected trace region is greater.
[0059] The distribution of locations with greater distortion and greater blurring in the trace image is consistent, so the tangential distortion direction can be determined by the distribution of blurring from small to large. Along the extension direction of the tangential distortion direction, the distortion degree in the trace image is also distributed from small to large.
[0060] The average value of the blurring degree of all suspected trace areas containing the same pixel in the same pooling layer is recorded as the blurring evaluation value of the same pixel.
[0061] Select the pixel with the minimum blur evaluation value within the same pooling layer as the starting point of a ray for that pooling layer. Starting from the starting point of the ray and moving horizontally to the right, draw 20 rays uniformly. For each ray with the starting point as its endpoint, record the difference between the blur evaluation value of the pixel on the ray and the next adjacent blur evaluation value along the ray's extension direction as the adjacent blur difference of the pixel corresponding to the blur evaluation value. Record the number of pixels on the ray whose adjacent blur differences are less than 0 as the first number of the ray. Record the average of the adjacent blur differences of the pixels on the ray as the adjacent blur average difference of the ray. Record the sum of the differences between the adjacent blur differences of all pixels on the ray and the adjacent blur average difference as the adjacent blur difference degree of the ray. Record the difference between the blur evaluation value at the starting point of the ray and the minimum blur evaluation value of the pixels on the ray as the first difference of the ray. The ratio of the product of the first number of the ray and the first difference to the adjacent blur difference degree is recorded as the directional conformance of the ray.
[0062] It should be noted that when the blur evaluation value of a pixel point does not have the next adjacent blur evaluation value along the extension direction of the ray, the pixel point is not analyzed when calculating the adjacent blur difference of the pixel point.
[0063] The greater the ray direction conformity, the greater the possibility that the ray extension direction is the tangential distortion direction corresponding to the image.
[0064] The direction of the ray with the largest direction conformity in the same pooling layer is recorded as the tangential distortion direction determined by the suspected trace area of the pooling layer where the ray is located.
[0065] According to a method for obtaining a tangential distortion direction determined by the suspected trace area of the same pooling layer based on the suspected trace area determined in the same pooling layer, the tangential distortion direction determined by the two-dimensional ruler area in the same pooling layer is obtained based on the two-dimensional ruler area in the same pooling layer.
[0066] The tangential distortion direction determined by the two-dimensional ruler area in the pooling layer is used as the direction of the vector, and the distance between the starting point of the ray and the pixel with the largest blurring evaluation value in the pooling layer where the ray starting point is located is used as the magnitude of the vector to obtain the two-dimensional ruler vector of the pooling layer; the vector summation result of the two-dimensional ruler vectors of all pooling layers is recorded as the actual tangential distortion direction of the trace image.
[0067] At this point, the actual tangential distortion direction of the trace image is obtained.
[0068] The blur performance acquisition module pools the candidate area using the first preset parameter as the side length of the pooling window, records any pooling layer as the target pooling layer, and screens the side length values of some pooling windows based on the difference in activation values of the pixel points in the pooling windows of the target pooling layer and all other pooling layers. The third mean is determined based on the side length values of all screened pooling windows, and the blur performance of each pixel point in the trace image is obtained by combining the blur degree of all suspected trace areas with the same pixel point contained in the same pooling layer.
[0069] The pooling window size of the pooling layer will affect the recognition of image features within the pooling window. The larger the pooling window size, the greater the degree of magnification of the image within the pooling window, the more detailed features are ignored, and the greater the possibility of deviation in the determined tangential distortion direction. Therefore, the pooling window size needs to be determined.
[0070] Will Using the length of the pooling window as the side length, the candidate region is pooled to obtain all pooling windows in each pooling layer. Any pooling layer is denoted as the target pooling layer, and any pooling window of the target pooling layer is denoted as the target pooling window. The pooling window in any pooling layer other than the target pooling layer that contains the same pixel of the trace image as the target pooling window is denoted as the pooling window corresponding to the target pooling window. The mean activation value of the pixels contained in the pooling window corresponding to the target pooling window is denoted as the activation mean of the pooling window corresponding to the target pooling window. The difference between the mean activation value of the pixels contained in the target pooling window and the maximum activation mean of all pooling windows corresponding to the target pooling window is denoted as the second difference of the target pooling window. The sum of the second differences of all pooling windows in the target pooling layer is denoted as the first cumulative value of the target pooling layer. The angle between the tangential distortion direction determined for the suspected trace region of the target pooling layer and the actual tangential distortion direction of the trace image is denoted as the tangential distortion difference angle of the target pooling layer. The normalized value of the product of the tangential distortion difference angle of the target pooling layer and the first accumulated value is recorded as the inappropriateness of the side length of the pooling window of the target pooling layer.
[0071] in, represents the first preset parameter. In this embodiment, the value of the first preset parameter is 20. It should be noted that this embodiment uses the sigmoid function to calculate the normalized value. In actual application, the implementer may use other existing methods such as the maximum and minimum value normalization method, the Z-Score standard normalization method, etc. to calculate the normalized value, which is not limited here.
[0072] When the tangential distortion difference angle of the target pooling layer is larger and the first accumulated value of the target pooling layer is larger, more detail features are ignored after the image in the pooling window is magnified, and the possibility of deviation in the determined tangential distortion direction is greater. The value of the side length of the pooling window corresponding to the unsuitability is more inappropriate, and the target pooling layer is less suitable for being divided into the pooling segmentation method range of the distortion degree analysis.
[0073] The unsuitability is compared with the judgment threshold, and the side length value of the pooling window of the target pooling layer whose unsuitability is greater than the judgment threshold is not analyzed.
[0074] The judgment threshold is a preset threshold. In this embodiment, the judgment threshold is set to 0.8.
[0075] The side length of the pooling window is reduced with a step size of 1, and the candidate area is pooled with each value of the side length of the pooling window. The unsuitability of the side length value of the pooling window of the target pooling layer is obtained, and it is determined whether to continue to analyze the side length value of the pooling window of the target pooling layer.
[0076] The same method can be used to obtain the side length of the pooling window that needs to be further analyzed in any pooling layer.
[0077] The side length values of the pooling window that needs to be further analyzed for the target pooling layer are taken, and the unsuitability of the side length values of the pooling window of the target pooling layer is arranged in descending order according to the side length of the pooling window to obtain an unsuitability sequence, and the mean of all values contained in the first-order difference sequence of the unsuitability sequence is recorded as the second mean.
[0078] The same method can be used to obtain the second mean corresponding to any pooling layer, and the average of the second means corresponding to all pooling layers can be recorded as the third mean.
[0079] For the side length value of the pooling window that continues to be analyzed, the product of the cumulative sum of the blur evaluation values of all pooling layers where the pixel is located and the third mean is recorded as the blur performance of the pixel.
[0080] The greater the blur of a pixel, the more obvious the blur at the pixel position.
[0081] At this point, the blurred representation of each pixel of the trace image is obtained.
[0082] The distortion correction module realizes the distortion correction of the trace image according to the difference in blurring performance of pixels in the trace image and the difference between the two-dimensional ruler area in the trace image and the standard image of the two-dimensional ruler.
[0083] Any pixel point in the trace image is recorded as the target pixel point, the pixel point with the smallest blurring performance in the trace image is recorded as the feature pixel point, and the Euclidean distance between the target pixel point and the feature pixel point is recorded as the first distance of the target pixel point; the angle between the directed line segment pointing from the target pixel point to the feature pixel point and the actual tangential distortion direction of the trace image is recorded as the first angle of the target pixel point; the ratio of the blurring performance of the target pixel point to the maximum value of the blurring performance of all pixels in the trace image is recorded as the normalized blurring performance of the target pixel point; the product of the first distance of the target pixel point, the first angle and the normalized blurring performance is recorded as the movement degree of the target pixel point.
[0084] Each pixel point in the two-dimensional ruler area in the trace image is translated separately so that the two-dimensional ruler area in the trace image is the same as the standard image of the two-dimensional ruler. The Euclidean distance of the pixel points in the two-dimensional ruler area is recorded as the weight parameter of the pixel point. The normalized value result of the product of the movement degree of the target pixel point and the weight parameter is calculated, and the product of the normalized value result of the product and the first distance of the target pixel point is recorded as the extension length of the target pixel point.
[0085] The same method can be used to obtain the extension length of any pixel in the trace image.
[0086] Among them, the role of the pixel weight parameter is to ensure that the distortion correction of the trace image meets the correction ratio required by the trace image.
[0087] Each pixel point in the trace image is extended along the direction from the pixel point to the feature pixel point, and the extension length is equal to the extension length of the target pixel point to obtain the trace image after distortion correction.
[0088] The corresponding position coordinates of all pixels in the trace image before and after distortion correction are obtained through SQL query statements, and are visualized in the form of a table.
[0089] At this point, the distortion correction of the trace image is achieved.
[0090] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An on-site image correction and measurement system for trace image distortion, characterized in that: The system includes the following modules: The activation value acquisition module is used to process the trace image using a deep learning network, obtain the activation value of each pixel in the candidate area at each convolution layer, and divide the trace area and the two-dimensional ruler area in the trace image; an actual tangential distortion direction determination module, configured to divide the suspected trace area within the candidate area within the same pooling layer, determine the blurring degree of the suspected trace area based on the numerical distribution of activation values of adjacent pixels outside the edge of the suspected trace area and pixels within the suspected trace area, determine the tangential distortion direction determined by the suspected trace area of the same pooling layer based on the blurring degrees of all suspected trace areas of the same pixel contained in the same pooling layer, obtain the tangential distortion direction determined by the two-dimensional ruler area within the same pooling layer based on the two-dimensional ruler area within the same pooling layer, and determine the actual tangential distortion direction of the trace image based on the tangential distortion directions determined by all the two-dimensional ruler areas; A blur performance acquisition module is used to pool the candidate area using the first preset parameter as the side length of the pooling window, record any pooling layer as the target pooling layer, screen the side length values of some pooling windows according to the difference in activation values of the pixel points in the pooling windows of the target pooling layer and all other pooling layers, determine the third mean value based on the side length values of all screened pooling windows, and combine the blur levels of all suspected trace areas of the same pixel point contained in the same pooling layer to obtain the blur performance of each pixel point in the trace image respectively; The distortion correction module is used to realize the distortion correction of the trace image based on the angle between the line segment between the pixel point in the trace image and the pixel point with the minimum blurring performance and the actual tangential distortion direction, the difference in blurring performance between the pixels, and the difference between the two-dimensional ruler area in the trace image and the standard image of the two-dimensional ruler.
2. The on-site image correction and measurement system for trace image distortion according to claim 1, characterized in that: The method for obtaining the suspected trace area is: When the activation value of a pixel point is greater than a preset activation value threshold, the pixel point is recorded as a suspected trace pixel point, and the area formed by the suspected trace pixel points is recorded as a suspected trace area.
3. The on-site image correction and measurement system for trace image distortion according to claim 1, characterized in that: The method for determining the blurring degree of the suspected trace area is as follows: The maximum value and the minimum value of the activation value in the suspected trace area are used as the upper limit and the lower limit of the value range of the activation value in the suspected trace area respectively, and the value range of the activation value is divided by a preset division span parameter to obtain the value sub-range of the activation value in the suspected trace area, and the ratio of the number of activation values contained in the value sub-range containing the largest number of activation values to the number of activation values in the suspected trace area is recorded as the first ratio of the suspected trace area, and the ratio of the range of activation values in the suspected trace area to the first ratio of the suspected trace area is recorded as the activation value complexity of the suspected trace area; The average of the differences between the activation values of the edge pixels in the suspected trace area and the pixels in the eight neighborhoods of the edge pixels that are not in the suspected trace area is recorded as the edge pixel's off-edge difference mean. The average of the edge pixel's off-edge difference means is recorded as the first mean of the suspected trace area. The ratio of the activation value complexity of the suspected trace area to the first mean is recorded as the blurring degree of the suspected trace area.
4. The on-site image correction and measurement system for trace image distortion according to claim 1, characterized in that: The method of determining the tangential distortion direction of the suspected trace area of the same pooling layer according to the blurring degree of all suspected trace areas of the same pixel point contained in the same pooling layer includes: The average blurring degree of all suspected trace areas containing the same pixel in the same pooling layer is recorded as the blurring evaluation value of the same pixel; Select the pixel point with the smallest blur evaluation value in the same pooling layer as the starting point of the ray of the same pooling layer, and make 20 rays evenly starting from the horizontal right direction with the starting point of the ray as the endpoint; for each ray with the starting point of the ray as the endpoint, the difference between the blur evaluation value of the pixel point on the ray and the next adjacent blur evaluation value along the extension direction of the ray is recorded as the adjacent blur difference of the pixel point corresponding to the blur evaluation value, and the number of pixels less than 0 in the adjacent blur differences of the pixel points on the ray is recorded as the first number of the ray; the average of the adjacent blur differences of the pixel points on the ray is recorded as the adjacent blur average difference of the ray, and the cumulative sum of the differences between the adjacent blur differences of all pixel points on the ray and the adjacent blur average difference is recorded as the adjacent blur difference degree of the ray; the difference between the blur evaluation value of the starting point of the ray and the minimum value of the blur evaluation value of the pixel points on the ray is recorded as the first difference of the ray; The ratio of the product of the first number of rays and the first difference to the adjacent blur difference is recorded as the ray direction compliance; According to the directional consistency of all rays in the same pooling layer, the tangential distortion direction determined by the suspected trace area of the pooling layer is determined.
5. The on-site image correction and measurement system for trace image distortion according to claim 4, characterized in that: The specific method for determining the tangential distortion direction of the suspected trace area of the pooling layer based on the direction consistency of all rays in the same pooling layer is as follows: The direction of the ray with the largest direction conformity in the same pooling layer is recorded as the tangential distortion direction determined by the suspected trace area of the pooling layer where the ray is located.
6. The on-site image correction and measurement system for trace image distortion according to claim 4, characterized in that: The method for determining the actual tangential distortion direction of the trace image is: The tangential distortion direction determined by the two-dimensional ruler area in the pooling layer is used as the direction of the vector, and the distance between the starting point of the ray and the pixel with the largest blurring evaluation value in the pooling layer where the ray starting point is located is used as the magnitude of the vector to obtain the two-dimensional ruler vector of the pooling layer; the vector summation result of the two-dimensional ruler vectors of all pooling layers is recorded as the actual tangential distortion direction of the trace image.
7. The on-site image correction and measurement system for trace image distortion according to claim 1, characterized in that: The method of screening the side length values of some pooling windows based on the difference in activation values of pixels within the pooling windows of the target pooling layer and all other pooling layers includes the following specific methods: Using the preset first preset parameter as the side length of the pooling window, pooling the candidate area, obtaining all pooling windows in each pooling layer, recording any pooling layer as the target pooling layer, recording any pooling window of the target pooling layer as the target pooling window, recording the pooling window of the same pixel point of the trace image as the target pooling window in other pooling layers that are not the target pooling layer as the pooling window corresponding to the target pooling window, recording the mean of the activation values of the pixel points contained in the pooling window corresponding to the target pooling window as the activation mean of the pooling window corresponding to the target pooling window, recording the difference between the mean of the activation values of the pixel points contained in the target pooling window and the maximum value of the activation mean of all pooling windows corresponding to the target pooling window as the second difference of the target pooling window, and summing the second differences of all pooling windows of the target pooling layer as the first accumulated value of the target pooling layer; The angle between the tangential distortion direction determined by the suspected trace area of the target pooling layer and the actual tangential distortion direction of the trace image is recorded as the tangential distortion difference angle of the target pooling layer; The normalized value of the product of the tangential distortion difference angle of the target pooling layer and the first accumulated value is recorded as the inappropriateness of the side length of the pooling window of the target pooling layer; The side length values of the pooling window of the target pooling layer whose unsuitability is less than or equal to the judgment threshold are screened out.
8. The on-site image correction and measurement system for trace image distortion according to claim 1, characterized in that: The method for determining the third mean is: The side length of the pooling window is reduced with a step size of 1, and the candidate area is pooled with each value of the side length of the pooling window. The unsuitability of the side length value of the pooling window of the standard pooling layer is obtained, and the side length value of the pooling window is screened. Arrange the unsuitability values of the side lengths of the pooling windows filtered out by the target pooling layer in descending order of the side lengths of the pooling windows to obtain an unsuitability sequence, and record the mean of all values contained in the first-order difference sequence of the unsuitability sequence as the second mean; The mean of the second means corresponding to all pooling layers is recorded as the third mean.
9. The on-site image correction and measurement system for trace image distortion according to claim 4, characterized in that: The method for obtaining the blurring performance of each pixel in the trace image is as follows: For the side length value of the filtered pooling window, the product of the cumulative sum of the blur evaluation values of all pooling layers where the pixel is located and the third mean is recorded as the blur performance of the pixel.
10. The on-site image correction and measurement system for trace image distortion according to claim 1, characterized in that: The method of correcting the distortion of the trace image according to the difference in blurring performance of pixels in the trace image and the difference between the two-dimensional ruler area in the trace image and the standard image of the two-dimensional ruler includes the following specific methods: Any pixel in the trace image is recorded as a target pixel, the pixel with the smallest blur performance in the trace image is recorded as a feature pixel, and the Euclidean distance between the target pixel and the feature pixel is recorded as the first distance of the target pixel; the angle between the directed line segment pointing from the target pixel to the feature pixel and the actual tangential distortion direction of the trace image is recorded as the first angle of the target pixel; the ratio of the blur performance of the target pixel to the maximum value of the blur performance of all pixels in the trace image is recorded as the blur normalized performance of the target pixel; the product of the first distance of the target pixel, the first angle, and the blur normalized performance is recorded as the movement degree of the target pixel; Shifting each pixel point in the two-dimensional ruler area in the trace image so that the two-dimensional ruler area in the trace image is the same as the standard image of the two-dimensional ruler, recording the Euclidean distance of the pixel points in the two-dimensional ruler area as the weight parameter of the pixel point, calculating the normalized value result of the product of the movement degree of the target pixel point and the weight parameter, and recording the product of the normalized value result of the product and the first distance of the target pixel point as the extension length of the target pixel point; Each pixel point in the trace image is extended along the direction from the pixel point to the feature pixel point, and the extension length is equal to the extension length of the target pixel point to obtain the trace image after distortion correction.
Citation Information
Patent Citations
Drift angle and fast correction for mark evidence and its rectangular scale
CN101029878A
Electronic watermark detection method, device, and program
JP2017022489A