Target identification methods, devices, equipment, media and products

By performing enhancement processing in the spatial domain and grayscale domain after image preprocessing, using various algorithms to extract features and enhance image details, the problem of low image recognition accuracy in the prior art is solved, and more efficient target recognition is achieved.

CN114399432BActive Publication Date: 2025-08-08GUANGXI BEITOU XINCHUANG TECH INVESTMENT GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111519607.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2025-08-08
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

In the prior art, the image recognition method has a low recognition accuracy after preprocessing, making it difficult to accurately identify target objects in the image.

Method used

By enhancing the preprocessed images in the spatial domain and grayscale domain, the features are extracted using grayscale transformation, histogram equalization algorithm and mean filtering algorithm, and combined with the Frangi filtering algorithm and the neural network of the variability convolution kernel, image details are enhanced.

Benefits of technology

The accuracy and accuracy of image recognition are improved, especially in scenarios such as crack detection, vascular detection, building detection and intelligent industrial defect detection, which achieves more efficient target recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114399432B_ABST
    Figure CN114399432B_ABST
Patent Text Reader

Abstract

This disclosure provides a target recognition method, apparatus, device, medium, and product. A specific implementation scheme comprises: performing image preprocessing on an image to be processed to obtain a preprocessed image; performing enhancement processing on the preprocessed image in both the spatial and grayscale domains to obtain an enhanced image corresponding to the preprocessed image; and identifying the target object in the enhanced image. The technical solution of this disclosure improves image recognition efficiency by enhancing images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence, and in particular to a target recognition method, device, equipment, medium, and product. Background Art

[0002] With the rapid development of artificial intelligence technology, image recognition is being used more and more widely. Among them, image crack detection is a particularly important application. For example, crack detection in mountain images can quickly determine whether there are cracks in the mountain, and thus provide early warning of possible natural disasters.

[0003] In the prior art, when performing crack detection on an image, the image can be preprocessed, such as by grayscale conversion, to facilitate subsequent image feature extraction and crack identification. However, after preprocessing the image, feature extraction and identification are performed on the image, resulting in inaccurate recognition results and low recognition accuracy. Summary of the Invention

[0004] The present disclosure provides a target recognition method, apparatus, device, medium and product.

[0005] According to a first aspect of the present disclosure, there is provided a target recognition method, comprising:

[0006] Performing image preprocessing on the image to be processed to obtain a preprocessed image;

[0007] Performing enhancement processing on the preprocessed image in both the spatial domain and the grayscale domain to obtain an enhanced image corresponding to the preprocessed image;

[0008] A target object is identified in the enhanced image.

[0009] According to a second aspect of the present disclosure, there is provided a target recognition device, comprising:

[0010] An image processing module is used to perform image preprocessing on the image to be processed to obtain a preprocessed image;

[0011] An image enhancement module is used to perform enhancement processing on the preprocessed image in both the spatial domain and the grayscale domain to obtain an enhanced image corresponding to the preprocessed image;

[0012] The target recognition module is used to recognize the target object in the enhanced image.

[0013] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the image processing method described in the first aspect.

[0017] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the image processing method described in the first aspect.

[0018] According to a fourth aspect of the present disclosure, a computer program product is provided, comprising: a computer program, wherein the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the electronic device performs the image processing method described in the first aspect.

[0019] In the disclosed embodiments, after preprocessing an image to be processed to obtain a preprocessed image, enhancement processing can be performed on the preprocessed image in both the spatial and grayscale domains to obtain an enhanced image corresponding to the preprocessed image. The preprocessed image is enhanced in detail in both the spatial and grayscale domains to achieve higher recognition accuracy when identifying target objects in the enhanced image, thereby improving the recognition precision of the image to be processed.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.

[0022] Figure 1 is a flowchart of an embodiment of a target recognition method provided by an embodiment of the present disclosure;

[0023] Figure 2 is a flowchart of another embodiment of a target recognition method provided by an embodiment of the present disclosure;

[0024] Figure 3 is a flowchart of another embodiment of a target recognition method provided by an embodiment of the present disclosure;

[0025] Figure 4 is a flowchart of another embodiment of a target recognition method provided by an embodiment of the present disclosure;

[0026] Figure 5is a schematic structural diagram of an embodiment of a target recognition device provided by an embodiment of the present disclosure;

[0027] Figure 6 This is a network architecture diagram of a target identification method provided by an embodiment of the present disclosure;

[0028] Figure 7 It is a structural diagram of an embodiment of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0030] The technical solution disclosed in the present invention can be applied to crack detection scenarios, by performing detail enhancement on the preprocessed image in both the spatial domain and the grayscale domain to improve the recognition accuracy and precision of the image.

[0031] In the related art, after the image to be processed is preprocessed, the obtained preprocessed image is used for target recognition. However, there is a large error between the target object obtained by recognition and the actual object, and the recognition accuracy is not high.

[0032] In the disclosed embodiments, to improve image recognition efficiency, image detail enhancement is considered. However, existing detail enhancement methods are relatively limited. For example, image enhancement is typically performed from a spatial domain perspective, which can be ineffective. To more accurately extract image features, image enhancement can also be performed from a grayscale domain perspective to improve image enhancement.

[0033] The disclosed embodiments can be applied to a variety of common crack detection scenarios. For example, crack detection in mountains can automatically detect cracks in captured mountain images, enabling timely detection and preventing personal or property damage from natural disasters. Furthermore, the system can be applied to scenarios such as vascular inspection in medicine, wall inspection in the construction field, and product defect detection in the intelligent industrial field.

[0034] The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings. Figure 1 FIG. 1 is a flow chart of an embodiment of a target recognition method according to an embodiment of the present disclosure. The method may include the following steps:

[0035] 101: Perform image preprocessing on the image to be processed to obtain a preprocessed image.

[0036] 102: Perform enhancement processing on the preprocessed image in both the spatial domain and the grayscale domain to obtain an enhanced image corresponding to the preprocessed image.

[0037] Performing image preprocessing on the image to be processed to obtain the preprocessed image may include: performing grayscale processing on the image to obtain the preprocessed image.

[0038] In practical applications, the image to be processed can be determined first. The image to be processed can be provided by the user or captured by a camera and sent to the electronic device. Videos or images captured by the camera can also be sent to the electronic device.

[0039] For example, a user terminal may detect an image to be processed input by the user. The user terminal may then send the image to be processed to an electronic device. The electronic device may then directly obtain the image to be processed sent by the user terminal. For another example, the image to be processed may be an image frame extracted from a captured video.

[0040] Optionally, the image to be processed may be an image captured in a specific scene, for example, an image captured by photographing a mountain or an image captured by photographing a wall. 103: Identify the target object in the enhanced image.

[0041] Optionally, identifying the target object in the enhanced image may include: using a face recognition algorithm to identify faces in the enhanced image, identifying cracks in a crack image, identifying lane lines in a road image, etc. The specific identification content of the target object is not excessively limited in the embodiments of the present disclosure.

[0042] In the embodiment of the present disclosure, after determining the image to be processed, the image to be processed can be preprocessed to obtain a preprocessed image, and the preprocessed image can be enhanced in both the spatial domain and the grayscale domain to obtain an enhanced image corresponding to the preprocessed image. By enhancing the image, when the target object in the enhanced image is identified, the target object obtained is more accurate, and the image details are enhanced in both the spatial domain and the grayscale domain to improve the recognition accuracy and precision of the image. Figure 2 FIG. 1 is a flow chart of another embodiment of a target recognition method provided by an embodiment of the present disclosure. The method may include the following steps:

[0043] 201: Perform image preprocessing on the image to be processed to obtain a preprocessed image.

[0044] 202: Extracting grayscale domain features and spatial domain features of the preprocessed image.

[0045] 203: Generate a transfer function of an image filtering algorithm using grayscale domain features and spatial domain features.

[0046] Optionally, extracting the grayscale domain features and spatial domain features of the preprocessed image may include: extracting the grayscale domain features of the preprocessed image using a grayscale transformation or a histogram equalization algorithm, and extracting the spatial domain features of the preprocessed image using a mean filtering algorithm or a median filtering algorithm.

[0047] Among them, the processing method of grayscale transformation, histogram equalization algorithm, mean filtering algorithm or median filtering algorithm for the pre-processed image can refer to the description in the existing technology and will not be repeated here.

[0048] Grayscale domain features can characterize the grayscale characteristics of an image, and spatial domain features can characterize the spatial characteristics of an image.

[0049] In the image filtering algorithm, transfer functions can be used to perform filtering calculations on preprocessed images.

[0050] 204: Perform filtering calculation on the pre-processed image using the transfer function to obtain an enhanced image corresponding to the pre-processed image.

[0051] Optionally, the preprocessed image can be input into the transfer function, and the probability that the pixel points in the preprocessed image belong to the crack points can be calculated to obtain the probability corresponding to each pixel point. The probability of each pixel can be combined according to the position point of the corresponding pixel to form a corresponding enhanced image to obtain an accurate enhanced image.

[0052] 205: Identify target objects in the enhanced image.

[0053] In the disclosed embodiments, after determining the image to be processed, the image can be preprocessed to obtain a preprocessed image. This allows the grayscale and spatial domain features of the image to be processed to be extracted. These features are then used to generate a transfer function for the image filtering algorithm. The transfer function is used to filter the preprocessed image to obtain an enhanced image corresponding to the preprocessed image, thereby enhancing the details of the preprocessed image. A preset target recognition algorithm can then be used to identify the target image in the enhanced image, improving the recognition efficiency and accuracy of the target image.

[0054] As an embodiment, extracting grayscale domain features and spatial domain features of the image to be processed includes:

[0055] According to the preset grayscale distribution function, the grayscale domain features of the preprocessed image are calculated.

[0056] According to the preset spatial feature extraction function, the spatial domain features of the preprocessed image are extracted.

[0057] In the embodiment of the present disclosure, the grayscale domain features of the preprocessed image can be accurately extracted according to the preset grayscale distribution function, and the spatial domain features of the preprocessing function can be extracted according to the preset spatial domain feature extraction function.

[0058] In one possible design, calculating the grayscale domain features of the preprocessed image according to a preset grayscale distribution function may include:

[0059] Based on the Poisson distribution function of the preset target parameters, the grayscale domain features of the preprocessed image are calculated.

[0060] Alternatively, the target parameter may be a parameter value of a Poisson distribution function, specifically the average number of occurrences of a random event per unit time (or per unit area). Poisson distribution is used to describe the number of occurrences of a random event per unit time.

[0061] According to the preset spatial feature extraction function, the spatial domain features of the preprocessed image are extracted, including:

[0062] Based on a two-dimensional Gaussian function of a predetermined scale, the preprocessed image is input as input data into the two-dimensional Gaussian function;

[0063] The second-order differential of the two-dimensional Gaussian function after inputting the preprocessed image is calculated to extract the spatial domain features of the preprocessed image.

[0064] In the disclosed embodiments, the grayscale domain features of the preprocessed image can be calculated based on a Poisson distribution function with preset target parameters, enabling accurate calculation of the grayscale domain features of the preprocessed image using the Poisson distribution function. Furthermore, the second-order differential of the preprocessed image with respect to the two-dimensional Gaussian function at a predetermined scale can be calculated to extract the spatial domain features of the preprocessed image, enabling accurate extraction of the spatial domain features of the preprocessed image using a predetermined spatial domain extraction algorithm.

[0065] In one possible design, the image filtering algorithm includes a Frangi filtering algorithm. The transfer function of the image filtering algorithm is generated by utilizing grayscale domain features and spatial domain features, including:

[0066] The grayscale domain features and spatial domain features are used to generate the Hessian matrix corresponding to the preprocessed image.

[0067] Compute the matrix eigenvalues of the Hessian matrix;

[0068] The transfer function of the Frangi filter algorithm is generated using the matrix eigenvalues.

[0069] The Hessian matrix, also known as the Hessian matrix, is a square matrix consisting of the second-order partial derivatives of a multivariate function, describing the local curvature of the function. The Frangi filter algorithm operates on the Hessian matrix.

[0070] In the disclosed embodiment, the spatial domain features and the grayscale domain features are matrix-combined by the Frangi filter algorithm to obtain the matrix eigenvalues of the Hessian matrix, and the matrix eigenvalues are used to generate the transfer function of the Frangi filter algorithm, so as to effectively enhance the preprocessed image by using the transfer function with both spatial domain and grayscale domain characteristics, thereby improving the image enhancement effect.

[0071] like Figure 3 FIG. 1 is a flow chart of another embodiment of a target recognition method provided by an embodiment of the present disclosure. The method may include the following steps:

[0072] 301: Perform image preprocessing on the image to be processed to obtain a preprocessed image.

[0073] 302: Calculate the grayscale domain features of the preprocessed image based on a Poisson distribution function with preset target parameters.

[0074] 303: Based on a two-dimensional Gaussian function of a predetermined scale, calculate the second-order differential of the pre-processed image on the two-dimensional Gaussian function to extract spatial domain features of the pre-processed image.

[0075] 304: Generate a Hessian matrix corresponding to the preprocessed image using the grayscale domain features and the spatial domain features.

[0076] In the embodiment of the present disclosure, the Frangi filter algorithm can be used to enhance the pre-processed image in order to perform more comprehensive detail enhancement on the pre-processed image. Generally, the Frangi filter algorithm uses the Hessian matrix to filter and enhance the image, but since the Hessian matrix in the Frangi filter algorithm only uses a two-dimensional Gaussian function to calculate the spatial domain features of the pre-processed image, the enhancement effect of the Frangi filter algorithm lacks features in other domains of the pre-processed image. Therefore, in the embodiment of the present disclosure, the Frangi filter algorithm is improved by extracting the grayscale domain features of the pre-processed image using the Poisson distribution function, and then performing convolution calculation with the spatial domain features in the Hessian matrix in the Frangi filter algorithm in the prior art to obtain the Hessian matrix in the Frangi filter algorithm.

[0077] The Hessian matrix with the grayscale domain added can be expressed as:

[0078] Where Gxx, Gxy, Gyx, and Gyy are the spatial domain features of the preprocessed image obtained by calculating the spatial domain features of the preprocessed image using a two-dimensional Gaussian function. P is the grayscale domain feature of the preprocessed image, that is, the grayscale domain feature of the preprocessed image is introduced into the original spatial domain feature.

[0079]

[0080] Therefore, using grayscale domain features and spatial domain features to generate the Hessian matrix corresponding to the preprocessed image can include: convolving each second-order differential in the spatial domain features with the preprocessed image and then calculating it with the grayscale domain, and combining the calculation results according to the second-order differential in the spatial domain features and the position of the Hessian matrix to form a Hessian matrix.

[0081] 305: Calculate the matrix eigenvalues of the Hessian matrix.

[0082] 306: Generate the transfer function of the Frangi filter algorithm using matrix eigenvalues.

[0083] 307: Perform filtering calculation on the pre-processed image using the transfer function to obtain an enhanced image corresponding to the pre-processed image.

[0084] 308: Identify the target object in the enhanced image.

[0085] In the embodiment of the present disclosure, when enhancing the preprocessed image, when using the Frangi filter (Frangi) algorithm to perform image enhancement on the preprocessed image, the grayscale domain features are also added to the construction scene of the Hessian matrix of the Frangi filter (Frangi) algorithm, so as to increase the grayscale domain characteristics of the image during the filtering calculation, improve the image enhancement effect, effectively improve the accuracy of the subsequent target object, and obtain an accurate target object.

[0086] like Figure 4 FIG. 1 is a flow chart of an embodiment of a target recognition method provided by an embodiment of the present disclosure. The method may include the following steps:

[0087] 401: Perform image preprocessing on the image to be processed to obtain a preprocessed image.

[0088] 402: Perform enhancement processing on the preprocessed image in both the spatial domain and the grayscale domain to obtain an enhanced image corresponding to the preprocessed image.

[0089] 403: Identify the crack area and the crack object formed by the shape in the enhanced image.

[0090] Optionally, the crack morphology may include information such as crack shape, position, size, and length.

[0091] In the disclosed embodiments, after determining the image to be processed, image preprocessing can be performed on the image to obtain a preprocessed image. The preprocessed image can then be enhanced in both the spatial and grayscale domains to obtain an enhanced image corresponding to the preprocessed image. A pre-set crack recognition algorithm can then be used to identify the crack regions and morphologically defined crack objects in the enhanced image, enabling accurate extraction of the crack objects.

[0092] In some embodiments, identifying the target object in the enhanced image includes:

[0093] A crack recognition algorithm is used to identify the crack regions and crack objects formed by their morphology in the enhanced image. In the disclosed embodiment, after determining the image to be processed, image preprocessing can be performed on the image to obtain a preprocessed image. After enhancing the preprocessed image in both the spatial and grayscale domains using a preset image filtering algorithm, an enhanced image corresponding to the preprocessed image can be obtained. Furthermore, a preset crack recognition algorithm is used to identify the crack regions and crack objects formed by their morphology in the enhanced image, enabling accurate extraction of the crack objects.

[0094] As an embodiment, a preset crack recognition algorithm is used to identify crack areas and crack objects formed by the shapes in the enhanced image, including:

[0095] Splitting the enhanced image into at least one sub-image according to a channel sampling strategy;

[0096] Obtain at least one neural network convolution kernel selected using a variable convolution kernel;

[0097] At least one neural network convolution kernel is used to perform convolution calculations on at least one sub-image to obtain feature sub-images corresponding to the at least one sub-image.

[0098] At least one of the neural network convolution kernels has a different scale.

[0099] Perform channel splicing on the feature sub-images corresponding to at least one sub-image according to the channel sampling strategy to obtain the feature image corresponding to the enhanced image;

[0100] Classify the pixels in the feature image into crack categories to obtain target pixels in the feature image that belong to cracks;

[0101] Determine the area where the target pixel point is located and the crack object formed by the shape.

[0102] Optionally, splitting the enhanced image into at least one sub-image according to the channel sampling strategy may include: splitting the enhanced image according to the number of sampling layers and the sampling length and width according to a preset number of sampling layers and sampling length and width to obtain at least one sub-image. Specifically, the image may be split first according to the number of layers, and then each split layer may be split according to the length and width. For example, a 256*256*12 image may be split into 3, 4, 2, 2, and 1 layers. Each split is then repeated, for example, splitting an image 256*256*3 with three layers into a plurality of 8*8*3 layers and a plurality of 4*4*3 layers to obtain at least one sub-image.

[0103] Optionally, the crack recognition algorithm may include Res-2Net (Residual 2NeuralNetwork, depth 2, residual network). In the embodiment of the present disclosure, Res-2Net is used to identify crack objects. The specific steps of Res-2Net's recognition of enhanced images can be referred to the description in this embodiment. The difference from the traditional Res-2Net is that the embodiment of the present disclosure also adopts at least one neural network convolution kernel selected by a deformable convolution kernel (DCN, Deformable Convolution Net) to achieve effective selection of the convolution kernel. By introducing the deformable convolution kernel, the position of the convolution unit of the convolution kernel is no longer completely fixed, but the convolution unit is fine-tuned by the deformable convolution kernel. The convolution kernel obtained after each fine-tuning is different from the scale of other convolution kernels, so as to achieve accurate selection of the convolution kernel, thereby improving the convolution accuracy of the convolution kernel to promote the recognition efficiency of the target object.

[0104] In the disclosed embodiment, the enhanced image can be split into at least one sub-image according to a preset channel sampling strategy to facilitate processing of sub-images of different channels. Using at least one neural network convolution kernel set at different scales, convolution calculations are performed on each of the at least one sub-image to obtain feature sub-images corresponding to each of the at least one sub-images. The feature sub-images of the at least one sub-image are then channel-joined according to the channel sampling strategy to obtain a feature image corresponding to the enhanced image. The pixels in the feature image are then classified into crack categories to obtain target pixels in the feature image that belong to cracks. The crack object formed by the region and shape of the target pixel is determined to achieve accurate identification of cracks in the image.

[0105] In one possible design, the number of at least one neural convolution kernel is equal to the number of at least one sub-image.

[0106] Using at least one neural network convolution kernel, performing convolution calculations on at least one sub-image respectively to obtain feature sub-images corresponding to the at least one sub-image respectively, including:

[0107] Determining a neural network convolution kernel corresponding to each of the at least one sub-image based on an analysis order corresponding to each of the at least one sub-image;

[0108] Convolution calculation is performed on the sub-image and the neural network convolution kernel corresponding to the sub-image to obtain a feature sub-image corresponding to at least one sub-image.

[0109] Optionally, the analysis order corresponding to the at least one sub-image may be determined based on the sampling order of the channel sampling strategy of the at least one sub-image. For example, according to the channel sampling strategy, the earliest sampled sub-image is the first to be analyzed, and the sampling order of each sub-image is sequentially determined as the analysis order.

[0110] The convolution kernel of the neural network corresponding to at least one sub-image can be assigned to the corresponding sub-image through the convolution calculation matching degree. For example, if the sub-image is a 9*9*3 image, the convolution kernel of M*N*3 that can be convolved with it can be assigned to the image. The length and width of the sub-image (9*9) is greater than the length and width of the convolution kernel (M*N), and the number of layers is equal to the number of layers of the convolution kernel.

[0111] In the embodiment of the present disclosure, the neural network convolution kernel corresponding to at least one sub-image can be determined through the analysis order corresponding to at least one sub-image, so as to achieve accurate allocation of the neural network convolution kernel, so as to improve the calculation accuracy of subsequent feature sub-images.

[0112] In some embodiments, performing convolution calculations on the sub-images and the neural network convolution kernels corresponding to the sub-images to obtain feature sub-images corresponding to at least one sub-image may include:

[0113] When the sub-image is the first sub-image, the neural network convolution kernel of the first sub-image is used to extract the feature sub-image of the first sub-image;

[0114] When the sub-image is the k-th sub-image, the neural network convolution kernel of the k-th sub-image is used to process the feature sub-images of the k-th sub-image and the k-1-th sub-image to obtain the feature sub-image of the k-th sub-image, where k is an integer greater than or equal to 2 and less than or equal to N, and N is the total number of sub-images.

[0115] Calculate the convolution result of the first sub-image and its corresponding neural network convolution kernel to obtain the feature sub-image corresponding to the first word image.

[0116] Starting from the second sub-image, traverse at least one sub-image, perform convolution calculation on any sub-image with its corresponding neural network convolution kernel, and the feature sub-image corresponding to the previous sub-image of the sub-image, to obtain the feature sub-image of the sub-image, so as to obtain the feature sub-image corresponding to at least one sub-image.

[0117] The k-1th sub-image may be a sub-image preceding the kth sub-image.

[0118] In the disclosed embodiment, when performing convolution calculations on at least one sub-image using at least one neural network convolution kernel selected according to the variable convolution kernel, characteristic sub-images of sub-images of different scales can be convolved with the corresponding neural network convolution kernel according to the convolution result of the previous sub-image to obtain characteristic sub-images corresponding to the at least one sub-image, thereby achieving accurate extraction of the characteristic sub-images.

[0119] like Figure 5FIG. 5 is a schematic diagram of the structure of an image processing device according to an embodiment of the present disclosure. The image processing device 500 may include the following modules:

[0120] Image processing module 501: used for performing image preprocessing on the image to be processed to obtain a preprocessed image.

[0121] Image enhancement module 502: used to perform enhancement processing on the pre-processed image in both the spatial domain and the grayscale domain to obtain an enhanced image corresponding to the pre-processed image.

[0122] Target recognition module 503: used to recognize target objects in the enhanced image.

[0123] As an embodiment, the image enhancement module includes:

[0124] A first extraction unit is used to extract grayscale domain features and spatial domain features of the preprocessed image;

[0125] A function generation unit, used to generate a transfer function of an image filtering algorithm using grayscale domain features and spatial domain features;

[0126] The image enhancement unit is used to perform filtering calculation on the preprocessed image using a transfer function to obtain an enhanced image corresponding to the preprocessed image.

[0127] In one possible design, the first extraction unit includes:

[0128] A grayscale extraction subunit, configured to calculate the grayscale domain features of the preprocessed image according to a preset grayscale distribution function;

[0129] The spatial extraction subunit is used to extract the spatial domain features of the preprocessed image according to a preset spatial feature extraction function.

[0130] In some embodiments, the grayscale extraction subunit is specifically configured to:

[0131] Calculate the grayscale domain features of the preprocessed image based on the Poisson distribution function of the preset target parameters;

[0132] The spatial extraction subunit is specifically used for:

[0133] Based on a two-dimensional Gaussian function of a predetermined scale, the preprocessed image is input as input data into the two-dimensional Gaussian function;

[0134] Calculate the second-order differential of the two-dimensional Gaussian function after inputting the preprocessed image to obtain a second-order Gaussian function;

[0135] The second-order Gaussian function is convolved with the preprocessed image to extract the spatial domain features of the preprocessed image.

[0136] As an embodiment, the image filtering algorithm includes: a Frangi filtering algorithm; and a function generating unit including:

[0137] The matrix generation subunit is used to generate the Hessian matrix corresponding to the preprocessed image using the grayscale domain features and the spatial domain features;

[0138] A feature calculation subunit, used to calculate the matrix eigenvalues of the Hessian matrix;

[0139] The transfer generating subunit is used to generate the transfer function of the Frangi filter algorithm by using the matrix eigenvalues.

[0140] As yet another embodiment, the target recognition module includes:

[0141] The crack recognition unit is used to use a crack recognition algorithm to identify the crack area and the crack object formed by the shape in the enhanced image.

[0142] In some embodiments, the crack identification unit includes:

[0143] a channel splitting subunit, configured to split the enhanced image into at least one sub-image according to a channel sampling strategy;

[0144] A convolution acquisition subunit, configured to acquire at least one neural network convolution kernel selected using a variable convolution kernel;

[0145] The convolution calculation subunit is configured to perform convolution calculations on the at least one sub-image using at least one neural network convolution kernel to obtain feature sub-images corresponding to the at least one sub-image. The at least one neural network convolution kernel has a different scale.

[0146] A channel stitching subunit, configured to stitch the feature sub-images corresponding to at least one sub-image according to a channel sampling strategy to obtain a feature image corresponding to the enhanced image;

[0147] A pixel classification subunit is used to classify the pixel points in the feature image into crack categories to obtain target pixel points in the feature image that belong to cracks;

[0148] The object determination subunit is used to determine the crack object formed by the area where the target pixel point is located and the shape.

[0149] In one possible design, the number of at least one neural convolution kernel is equal to the number of at least one sub-image.

[0150] The convolution calculation subunit is specifically used for:

[0151] Determining a neural network convolution kernel corresponding to each of the at least one sub-image based on an analysis order corresponding to each of the at least one sub-image;

[0152] Convolution calculation is performed on the sub-image and the neural network convolution kernel corresponding to the sub-image to obtain a feature sub-image corresponding to at least one sub-image.

[0153] As an embodiment, the convolution calculation subunit is further configured to:

[0154] When the sub-image is the first sub-image, the neural network convolution kernel of the first sub-image is used to extract the feature sub-image of the first sub-image;

[0155] When the sub-image is the k-th sub-image, the neural network convolution kernel of the k-th sub-image is used to process the feature sub-images of the k-th sub-image and the k-1-th sub-image to obtain the feature sub-image of the k-th sub-image, where k is an integer greater than or equal to 2 and less than or equal to N, and N is the total number of sub-images.

[0156] Figure 5 The image processing apparatus shown can perform Figure 1 - Figure 4 For the image processing methods in the embodiments, the specific solutions executed by each module, unit and sub-unit can be referred to the embodiments described in the above method, which will not be repeated here.

[0157] Figure 6 This is a diagram of a network architecture for the image processing method provided in an embodiment of the present disclosure. The network architecture may include an electronic device 1 and a user device 2. The electronic device 1 and the user device 2 may be connected via a local area network or a wide area network. For example, the electronic device 2 may be a common server, a cloud server, or a computer. The user device 1 may also be a computer, a laptop, a supercomputer, a mobile phone, a tablet computer, or other device. The specific types of the electronic device 2 and the user device 1 are not particularly limited in the present embodiment.

[0158] The user device 2 may be, for example, a mobile phone 2, and the electronic device 1 may be, for example, Figure 6 Mobile phone 2 can send the image to be processed to cloud server 1. Based on the technical solution disclosed herein, the cloud server can then identify the target object. By enhancing the details of the pre-processed image in both the spatial and grayscale domains, the recognition accuracy and precision of the image can be improved. The cloud server can then feed back the identified target object to mobile phone 2.

[0159] Figure 7 This is a schematic diagram of the structure of an embodiment of an electronic device provided in an embodiment of the present application. The server may include a processing component 701 and a storage component 702. The storage component 702 is used to store one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component.

[0160] The processing component 701 can be used to:

[0161] Determine the image to be processed;

[0162] Performing image preprocessing on the image to be processed to obtain a preprocessed image;

[0163] Based on the preset image filtering algorithm, the preprocessed image is enhanced in both the spatial domain and the grayscale domain to obtain an enhanced image corresponding to the preprocessed image;

[0164] Use the preset target recognition algorithm to identify the target object in the enhanced image.

[0165] The processing component 701 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above method.

[0166] The storage component 702 is configured to store various types of data to support operations in the server. The storage component can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0167] Of course, the terminal may also include other components, such as input / output interfaces, communication components, etc.

[0168] In some embodiments, the processing component performs enhancement processing on the preprocessed image in both the spatial domain and the grayscale domain based on a preset image filtering algorithm to obtain an enhanced image corresponding to the preprocessed image, which may include:

[0169] Extract grayscale domain features and spatial domain features of the preprocessed image;

[0170] Generate the transfer function of the image filtering algorithm by using the grayscale domain features and spatial domain features;

[0171] The transfer function is used to perform filtering calculation on the preprocessed image to obtain the enhanced image corresponding to the preprocessed image.

[0172] As yet another embodiment, the processing component extracts grayscale domain features and spatial domain features of the pre-processed image, which may include:

[0173] Calculate the grayscale domain features of the preprocessed image according to the preset grayscale distribution function;

[0174] According to the preset spatial feature extraction function, the spatial domain features of the preprocessed image are extracted.

[0175] In one possible design, the processing component calculates the grayscale domain features of the preprocessed image according to a preset grayscale distribution function, which may include:

[0176] Calculate the grayscale domain features of the preprocessed image based on the Poisson distribution function of the preset target parameters;

[0177] According to the preset spatial feature extraction function, the spatial domain features of the preprocessed image are extracted, including:

[0178] Based on a two-dimensional Gaussian function of a predetermined scale, the second-order differential of the preprocessed image in the two-dimensional Gaussian function is calculated to extract and obtain the spatial domain features of the preprocessed image.

[0179] In some embodiments, the image filtering algorithm includes a Frangi filtering algorithm; the processing component generates a transfer function of the image filtering algorithm using grayscale domain features and spatial domain features, which may include:

[0180] Generate the Hessian matrix corresponding to the preprocessed image using grayscale domain features and spatial domain features;

[0181] Compute the matrix eigenvalues of the Hessian matrix;

[0182] The transfer function of the Frangi filter algorithm is generated using the matrix eigenvalues.

[0183] As yet another embodiment, the target recognition algorithm includes a crack recognition algorithm;

[0184] The processing component uses a pre-set target recognition algorithm to identify the target object in the enhanced image, which may include:

[0185] The preset crack recognition algorithm is used to identify the crack areas and crack objects formed by the morphology in the enhanced image.

[0186] As an embodiment, the processing component uses a preset crack recognition algorithm to identify the crack area and the crack object formed by the shape in the enhanced image, which may include:

[0187] Splitting the enhanced image into at least one sub-image according to a preset channel sampling strategy;

[0188] Using at least one neural network convolution kernel set according to different scales, convolution calculations are performed on at least one sub-image to obtain feature sub-images corresponding to the at least one sub-image;

[0189] Perform channel splicing on the feature sub-images of at least one sub-image according to the channel sampling strategy to obtain a feature image corresponding to the enhanced image;

[0190] Classify the pixels in the feature image into crack categories to obtain target pixels in the feature image that belong to cracks;

[0191] Determine the area where the target pixel point is located and the crack object formed by the shape.

[0192] In some embodiments, the number of at least one neural convolution kernel is equal to the number of at least one sub-image; and the processing component performs convolution calculations on the at least one sub-image using the at least one neural network convolution kernel set according to different scales to obtain feature sub-images corresponding to the at least one sub-image, which may include:

[0193] Based on the feature analysis order corresponding to the at least one sub-image, at least one neural network convolution kernel is assigned to the corresponding feature sub-image;

[0194] Calculate the convolution result of the first sub-image and its corresponding neural network convolution kernel to obtain the feature sub-image corresponding to the first word image;

[0195] Starting from the second sub-image, traverse at least one sub-image, perform convolution calculation on any sub-image with its corresponding neural network convolution kernel, and the feature sub-image corresponding to the previous sub-image of the sub-image, to obtain the feature sub-image of the sub-image, so as to obtain the feature sub-image corresponding to at least one sub-image.

[0196] The present application also provides a computer-readable storage medium storing a computer program, which can achieve the above-mentioned Figure 1 The information processing method of the illustrated embodiment.

[0197] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0198] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0199] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or certain parts of the embodiment.

[0200] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A target recognition method, characterized in that: include: Performing image preprocessing on the image to be processed to obtain a preprocessed image; Performing enhancement processing on the preprocessed image in both the spatial domain and the grayscale domain to obtain an enhanced image corresponding to the preprocessed image; identifying a target object in the enhanced image; The identifying the target object in the enhanced image comprises: Using a crack recognition algorithm, identifying the crack area and the crack object formed by the shape in the enhanced image; The method of using a crack recognition algorithm to identify the crack area and the crack object formed by the shape in the enhanced image includes: Splitting the enhanced image into at least one sub-image according to a channel sampling strategy; Obtaining and utilizing a variable convolution kernel to determine at least one neural network convolution kernel; Using at least one of the neural network convolution kernels, perform convolution calculations on at least one of the sub-images to obtain feature sub-images corresponding to the at least one sub-image; Perform channel stitching on the feature sub-images corresponding to at least one of the sub-images according to the channel sampling strategy to obtain a feature image corresponding to the enhanced image; Classifying the pixels in the feature image into crack categories to obtain target pixels in the feature image that belong to cracks; Determine the area where the target pixel point is located and the crack object formed by the shape; The step of splitting the enhanced image into at least one sub-image according to the channel sampling strategy includes: According to the preset number of sampling layers and sampling length and width, the enhanced image is split according to the number of sampling layers and sampling length and width to obtain at least one sub-image; specifically, the image is first split according to the number of layers, and then the length and width of the image corresponding to each split layer are split; The method of using at least one neural network convolution kernel to perform convolution calculation on at least one of the sub-images to obtain a feature sub-image corresponding to the at least one sub-image includes: Determining a neural network convolution kernel corresponding to at least one of the sub-images based on an analysis order corresponding to each of the at least one sub-images; Performing convolution calculation on the sub-image and the neural network convolution kernel corresponding to the sub-image to obtain a feature sub-image corresponding to at least one of the sub-images; The performing convolution calculation on the sub-image and the neural network convolution kernel corresponding to the sub-image includes: When the sub-image is the first sub-image, extracting a feature sub-image of the first sub-image by using a neural network convolution kernel process of the first sub-image; When the sub-image is the k-th sub-image, the neural network convolution kernel of the k-th sub-image is used to process the characteristic sub-images of the k-th sub-image and the k-1-th sub-image to obtain the characteristic sub-image of the k-th sub-image, where k is an integer greater than or equal to 2 and less than or equal to N, and N is the total number of the sub-images.

2. The method according to claim 1, characterized in that The step of performing enhancement processing on the preprocessed image in both the spatial domain and the grayscale domain to obtain an enhanced image corresponding to the preprocessed image includes: Extracting grayscale domain features and spatial domain features of the preprocessed image; generating a transfer function of an image filtering algorithm using the grayscale domain features and the spatial domain features; The transfer function is used to perform filtering calculation on the preprocessed image to obtain an enhanced image corresponding to the preprocessed image.

3. The method according to claim 2, characterized in that The extracting of the grayscale domain features and the spatial domain features of the pre-processed image includes: Calculating the grayscale domain features of the preprocessed image according to a preset grayscale distribution function; The spatial domain features of the preprocessed image are extracted according to a preset spatial feature extraction function.

4. The method according to claim 3, characterized in that The preset grayscale distribution function calculates the grayscale domain features of the preprocessed image, including: Calculating the grayscale domain features of the preprocessed image based on a Poisson distribution function of preset target parameters; The step of extracting the spatial domain features of the pre-processed image according to a preset spatial feature extraction function includes: Based on a two-dimensional Gaussian function of a predetermined scale, inputting the pre-processed image as input data into the two-dimensional Gaussian function; Calculate the second-order differential of the two-dimensional Gaussian function after inputting the preprocessed image to obtain a second-order Gaussian function; A convolution calculation is performed on a second-order Gaussian function and a pre-processed image to extract and obtain spatial domain features of the pre-processed image.

5. The method according to claim 2, characterized in that The image filtering algorithm includes: a Frangi filtering algorithm; the use of the grayscale domain features and the spatial domain features to generate a transfer function of the image filtering algorithm includes: Generate a Hessian matrix corresponding to the preprocessed image using the grayscale domain features and the spatial domain features; Calculating matrix eigenvalues of the Hessian matrix; The transfer function of the Frangi filter algorithm is generated using the matrix eigenvalues.

6. A target recognition device, characterized in that: include: An image processing module is used to perform image preprocessing on the image to be processed to obtain a preprocessed image; An image enhancement module is used to perform enhancement processing on the preprocessed image in both the spatial domain and the grayscale domain to obtain an enhanced image corresponding to the preprocessed image; A target recognition module, configured to recognize a target object in the enhanced image; The target recognition module includes: a crack recognition unit for identifying the crack area and the crack object formed by the morphology in the enhanced image using a crack recognition algorithm; The crack identification unit comprises: a channel splitting subunit, configured to split the enhanced image into at least one sub-image according to a channel sampling strategy; A convolution acquisition subunit, configured to acquire at least one neural network convolution kernel selected using a variable convolution kernel; a convolution calculation subunit, configured to perform convolution calculations on the at least one sub-image using at least one neural network convolution kernel to obtain feature sub-images corresponding to the at least one sub-image; the at least one neural network convolution kernel having a different scale; A channel stitching subunit, configured to stitch the feature sub-images corresponding to at least one sub-image according to a channel sampling strategy to obtain a feature image corresponding to the enhanced image; A pixel classification subunit is used to classify the pixel points in the feature image into crack categories to obtain target pixel points in the feature image that belong to cracks; The object determination subunit is used to determine the crack object formed by the area where the target pixel point is located and the shape; The channel splitting subunit is specifically configured to: split the enhanced image according to the number of sampling layers and the sampling length and width according to the preset number of sampling layers and the sampling length and width to obtain at least one sub-image; specifically, the image is first split according to the number of layers, and then the image corresponding to each split layer is split into length and width; The convolution calculation subunit is specifically configured to: determine, based on the analysis order corresponding to at least one of the sub-images, a neural network convolution kernel corresponding to each of the at least one sub-images; and perform convolution calculations on the sub-images and the neural network convolution kernel corresponding to the sub-images to obtain feature sub-images corresponding to each of the at least one sub-images; The convolution calculation subunit performs convolution calculation on the sub-image and the neural network convolution kernel corresponding to the sub-image, specifically including: When the sub-image is the first sub-image, the neural network convolution kernel of the first sub-image is used to extract the feature sub-image of the first sub-image; When the sub-image is the k-th sub-image, the neural network convolution kernel of the k-th sub-image is used to process the feature sub-images of the k-th sub-image and the k-1-th sub-image to obtain the feature sub-image of the k-th sub-image, where k is an integer greater than or equal to 2 and less than or equal to N, and N is the total number of sub-images.

7. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the target recognition method according to any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the target recognition method according to any one of claims 1 to 5.

9. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the steps of the target recognition method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Underwater robot hydraulic oil pipeline surface weld defect identification method and device

    CN113436162A

  • RCNN-based cattle herd target detection method and equipment

    CN113780193A