Method and system for identifying and positioning nameplate area in nameplate image
By pre-processing and exposure adjustment of the nameplate image of the power system, combined with deep learning model and CNN technology, the problem of difficulty in nameplate image recognition is solved, and the accuracy and efficiency of nameplate information recognition are improved.
Patent Information
- Application Number
- CN202411282963.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-13
AI Technical Summary
The nameplate image in the power system is prone to overexposed or insufficient exposure due to angle problems, which leads to difficulty in identifying the nameplate, inaccuracy and inefficiency.
By acquiring the initial image for preprocessing and exposure adjustment, extracting the contour and the area to be detected, cutting the image for text contour extraction and perspective transformation, combining deep learning models and CNN technology, the identification accuracy of nameplate areas is improved.
It effectively reduces image problems caused by ambient light, improves the accuracy and efficiency of identification of nameplate information, accurately locates the nameplate area, and improves the accuracy of identification.
Smart Images

Figure CN119251452A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to a method and system for identifying and locating a nameplate area in a nameplate image. Background Art
[0002] The power infrastructure is large in scale, with a large number of equipment and widespread distribution, forming a complex and huge power system network. In order to effectively manage these devices and ensure the stable operation of the power system, it is usually necessary to record key equipment information, such as model, specification, production date, manufacturer, etc., in detail on the nameplate. However, the current registration of electrical equipment nameplate information is mainly done manually, which is not only inefficient, requires a lot of manpower and time, but also prone to errors, such as information entry errors, omissions or duplications. At the same time, this traditional manual method will also cause serious loss of human resources, which is not conducive to the long-term development and intelligent transformation of the power system.
[0003] In order to solve the above problems, it is now common to use a camera to obtain images of the nameplates of electrical equipment, and then use image analysis technology to extract the information on the nameplates. This method has improved the efficiency and accuracy of information registration to a certain extent, but there are still some challenges. In practical applications, since some electrical equipment in the power system needs to be installed outdoors, and due to the high installation position or environmental restrictions, it is often impossible to directly photograph the nameplates on the electrical equipment. This situation results in the process of collecting images of electrical equipment nameplates. Due to angle problems, the images are prone to overexposure or underexposure, making subsequent nameplate recognition very difficult, and even leading to the inability to accurately identify the nameplate and the key information on the nameplate, making the accuracy and efficiency of nameplate recognition and positioning low. Summary of the invention
[0004] The purpose of the present invention is to solve the problem that the image is easily overexposed or underexposed due to angle problems, which makes the subsequent nameplate recognition very difficult, and even leads to the inability to accurately identify the nameplate and the key information on the nameplate, resulting in low accuracy and efficiency of nameplate recognition and positioning. A method and system for identifying and positioning the nameplate area in a nameplate image is proposed.
[0005] In a first aspect of the present invention, a method for identifying and locating a nameplate area in a nameplate image is first proposed, the method comprising:
[0006] Acquire an initial image, and preprocess the initial image to obtain a first image; the initial image is an image including a nameplate area;
[0007] Adjusting the exposure of the first image to obtain a second image, extracting contours in the second image, and obtaining a set of regions to be detected according to the extracted contours;
[0008] For the set of regions to be detected, the second image is cut with the region to be detected to obtain a detection image, a text contour is extracted from the detection image to obtain a target text layout, the target text layout is substituted into a preset database for similarity comparison, and if the comparison result shows that there is a nameplate image, the detection image is recorded as a target image;
[0009] A perspective transformation matrix is performed on the target image to obtain a final image.
[0010] Optionally, performing exposure adjustment on the first image to obtain the second image includes:
[0011] Processing the first image by a tone mapping curve to obtain an exposure image set;
[0012] For each exposure image in the exposure image set, Laplace filtering is performed on the exposure image to obtain a filtering result value of each pixel in the exposure image, an absolute value of the filtering result value is recorded as a first parameter value, and a first parameter map is obtained according to the first parameter values of all pixels;
[0013] For each pixel of the exposure image, the mean of the pixel on the R channel, the G channel and the B channel is calculated, the standard deviation corresponding to the pixel is obtained according to the mean, and the second parameter map is obtained according to the standard deviations corresponding to all pixels;
[0014] For each pixel of the exposure image, calculate the brightness value corresponding to the pixel, obtain the exposure value corresponding to the pixel according to the brightness value, and obtain a third parameter map according to the exposure values corresponding to all pixels;
[0015] A weight value corresponding to the exposure image is obtained according to the first parameter map, the second parameter map and the third parameter map corresponding to the exposure image, and a weighted sum is performed on all exposure images according to the weight values corresponding to all exposure images to obtain a second image.
[0016] Optionally, extracting contours in the second image, and obtaining a set of regions to be detected according to the extracted contours includes:
[0017] Substituting the second image into a deep aggregation network to obtain a first multi-scale feature map, and performing center point, offset and direction prediction on the first multi-scale feature map to obtain multiple predicted bounding boxes;
[0018] For each predicted bounding box, performing corner point detection on the predicted bounding box to obtain a target corner point set, and connecting all points in the target corner point set to obtain an initial connection line set;
[0019] For the initial connection line set, obtaining the initial connection line combination that forms the largest area to obtain a first connection line set;
[0020] The first connection line set and the second image are brought into the connection line enhancement model to obtain a second connection line set, a region to be detected is formed according to the connection lines in the second connection line set, and a set of regions to be detected is obtained according to the region to be detected corresponding to each predicted bounding box.
[0021] Optionally, bringing the first connection line set and the second image into a connection line enhancement model to obtain a second connection line set includes:
[0022] Substituting the second image into a CNN backbone network to obtain a second multi-scale feature map, and performing encoding optimization on the second multi-scale feature map through a transformer encoder to obtain a target scale feature map;
[0023] For each link in the first link set, position encoding is performed on the endpoint coordinates of the link to obtain a first encoding value, and the first encoding value is substituted into a multilayer perceptron to obtain a target query vector;
[0024] The target query vector and the target scale feature map are brought into a transformer decoder for decoding to obtain a target enhanced link line, the link line is enhanced according to the target enhanced link line to obtain a target link line, and the target link lines corresponding to all the link lines in the first link line set are obtained to obtain a second link line set.
[0025] Optionally, extracting text contours from the detection image to obtain target text layout includes:
[0026] The detection image is converted into a grayscale image, and the grayscale image is converted into a binary image by an edge detection algorithm to obtain a target detection image;
[0027] Performing Hough transform detection on the target detection image to obtain a text area boundary in the target detection image, and determining a text recognition contour according to the text area boundary;
[0028] Performing text segmentation on the target detection image according to the text recognition contour to obtain a target text image;
[0029] All target text images are acquired for text recognition to obtain a character label set, and all character labels in the character label set are laid out according to the recognition positions of all target text images to obtain a target text layout.
[0030] In a second aspect of the present invention, a system for identifying and locating a nameplate region in a nameplate image is provided, comprising:
[0031] A first image acquisition module, used to acquire an initial image, and preprocess the initial image to obtain a first image; the initial image is an image including a nameplate area;
[0032] A contour acquisition module, used to adjust the exposure of the first image to obtain a second image, extract contours in the second image, and obtain a set of areas to be detected according to the extracted contours;
[0033] a target image acquisition module, for the set of regions to be detected, cutting the second image with the region to be detected to obtain a detection image, extracting text contours from the detection image to obtain a target text layout, substituting the target text layout into a preset database for similarity comparison, and if the comparison result shows that a nameplate image exists, recording the detection image as a target image;
[0034] The final image acquisition module is used to perform a perspective transformation matrix on the target image to obtain a final image.
[0035] Optionally, the contour acquisition module includes:
[0036] An exposure image generation module, configured to process the first image using a tone mapping curve to obtain an exposure image set;
[0037] a first parameter map acquisition module, configured to perform Laplace filtering on each exposure image in the exposure image set to obtain a filtering result value of each pixel in the exposure image, record an absolute value of the filtering result value as a first parameter value, and obtain a first parameter map according to the first parameter values of all pixels;
[0038] A second parameter map acquisition module is used to calculate the mean of each pixel of the exposure image on the R channel, the G channel and the B channel, obtain the standard deviation corresponding to the pixel according to the mean, and obtain the second parameter map according to the standard deviations corresponding to all pixels;
[0039] A third parameter map acquisition module is used to calculate the brightness value corresponding to each pixel of the exposure image, obtain the exposure value corresponding to the pixel according to the brightness value, and obtain the third parameter map according to the exposure values corresponding to all pixels;
[0040] The second image generation module is used to obtain the weight value corresponding to the exposure image according to the first parameter map, the second parameter map and the third parameter map corresponding to the exposure image, and to obtain the second image by weighted summing up all the exposure images according to the weight values corresponding to all the exposure images.
[0041] Optionally, the contour acquisition module further includes:
[0042] A prediction bounding box generation module, used for substituting the second image into a deep aggregation network to obtain a first multi-scale feature map, and performing center point, offset and direction prediction on the first multi-scale feature map to obtain multiple prediction bounding boxes;
[0043] An initial connection line generation module is used to perform corner point detection on each predicted bounding box to obtain a target corner point set, and connect all points in the target corner point set to obtain an initial connection line set;
[0044] A first connection line determination module is used to obtain, for the initial connection line set, a combination of initial connection lines that forms the largest area to obtain a first connection line set;
[0045] The module for determining the area to be detected is used to bring the first connection line set and the second image into the connection line enhancement model to obtain a second connection line set, form the area to be detected according to the connection lines in the second connection line set, and obtain the area set to be detected according to the area to be detected corresponding to each predicted boundary box.
[0046] Optionally, the module for determining the area to be detected includes:
[0047] A coding optimization module, used for substituting the second image into a CNN backbone network to obtain a second multi-scale feature map, and performing coding optimization on the second multi-scale feature map through a transformer encoder to obtain a target scale feature map;
[0048] a target query vector determination module, configured to perform position encoding on the endpoint coordinates of each link in the first link set to obtain a first encoding value, and substitute the first encoding value into a multilayer perceptron to obtain a target query vector;
[0049] The second connecting line determination module is used to bring the target query vector and the target scale feature map into the transformer decoder for decoding to obtain a target enhanced connecting line, enhance the connecting line according to the target enhanced connecting line to obtain a target connecting line, and obtain the target connecting lines corresponding to all the connecting lines in the first connecting line set to obtain a second connecting line set.
[0050] Optionally, the target image acquisition module includes:
[0051] The target detection image determination module is used to convert the detection image into a grayscale image, and convert the grayscale image into a binary image by an edge detection algorithm to obtain a target detection image;
[0052] A text area boundary determination module is used to perform Hough transform detection on the target detection image to obtain the text area boundary in the target detection image, and determine the text recognition contour according to the text area boundary;
[0053] An image cutting module, used for performing text cutting on the target detection image according to the text recognition contour to obtain a target text image;
[0054] The image layout module is used to obtain all target text images for text recognition to obtain a character label set, and to layout all character labels in the character label set according to the recognition positions of all target text images to obtain a target text layout.
[0055] Beneficial effects of the present invention:
[0056] The present invention proposes a method for identifying and locating a nameplate area in a nameplate image, obtaining an initial image, preprocessing the initial image to obtain a first image; adjusting the exposure of the first image to obtain a second image, extracting the contour in the second image, and obtaining a set of areas to be detected based on the extracted contour; for the set of areas to be detected, cutting the second image with the area to be detected to obtain a detection image, extracting the text contour of the detection image to obtain a target text layout, substituting the target text layout into a preset database for similarity comparison, if the comparison result is that there is a nameplate image, the detection image is recorded as the target image; performing a perspective transformation matrix on the target image to obtain a final image. By preprocessing and adjusting the exposure of the initial image, the problem of overexposure or underexposure of the image caused by ambient light can be effectively reduced, thereby improving the recognition accuracy of the nameplate information, and performing contour extraction and cutting of the second image to be detected The set of areas is helpful to accurately locate the nameplate area, further improve the accuracy of recognition, and improve the accuracy and efficiency of nameplate recognition and positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The present invention will be further described below in conjunction with the accompanying drawings.
[0058] Figure 1 A flowchart of a method for identifying and locating a nameplate area in a nameplate image is provided for an embodiment of the present invention;
[0059] Figure 2 A framework diagram of a system for identifying and locating a nameplate area in a nameplate image is provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0060] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.
[0061] The embodiment of the present invention provides a method for identifying and locating a nameplate area in a nameplate image. Figure 1 , Figure 1 A flowchart of a method for identifying and locating a nameplate area in a nameplate image provided by an embodiment of the present invention. The method comprises the following steps:
[0062] S101, acquiring an initial image, and preprocessing the initial image to obtain a first image.
[0063] S102, adjusting the exposure of the first image to obtain a second image, extracting contours in the second image, and obtaining a set of regions to be detected according to the extracted contours;
[0064] S103, for the set of regions to be detected, cutting the second image with the region to be detected to obtain a detection image, extracting text contours from the detection image to obtain a target text layout, substituting the target text layout into a preset database for similarity comparison, and if the comparison result shows that there is a nameplate image, recording the detection image as a target image;
[0065] S104, performing a perspective transformation matrix on the target image to obtain a final image.
[0066] The initial image is an image including the nameplate area.
[0067] Based on a method for identifying and locating a nameplate area in a nameplate image provided by an embodiment of the present invention, the problem of overexposure or underexposure of the image caused by ambient light can be effectively reduced by preprocessing and adjusting the exposure of the initial image, thereby improving the recognition accuracy of the nameplate information. Contour extraction and cutting of the set of areas to be detected on the second image help to accurately locate the nameplate area, further improve the accuracy of recognition, and improve the accuracy and efficiency of nameplate recognition and positioning.
[0068] In one implementation, through exposure adjustment and contour extraction, the area containing the nameplate information, i.e., the set of areas to be detected, can be accurately identified from the second image, which is the basis for subsequent text extraction and recognition. Accurate positioning can avoid misprocessing of non-nameplate areas and improve processing efficiency.
[0069] In one implementation, preprocessing includes denoising, filtering, enhancement, etc., which are used to improve image quality, enhance image features, and simplify image data to facilitate subsequent image analysis.
[0070] In one implementation, a preset database is used to store text layouts corresponding to images of different nameplates taken at different angles, and similarity comparison can be performed through cosine similarity, Jaccard similarity, etc.
[0071] In one implementation, if the area to be inspected is traversed and all comparison results show that the nameplate image does not exist, a reshoot message is sent to the photographer.
[0072] In one implementation, for each area to be detected, a detection image is obtained by cutting and the text contour is extracted, so that the text information on the nameplate can be efficiently obtained. The regional processing method is more efficient than the global processing and can more accurately extract the target text layout.
[0073] In one implementation, the extracted target text layout is compared with a preset database for similarity, which can intelligently determine whether the current detection image is a nameplate image. This not only improves the recognition accuracy, but also has a certain degree of flexibility and can adapt to nameplate images of different types and formats.
[0074] In one implementation, the detection image confirmed as the nameplate image is processed with a perspective transformation matrix to obtain a final image that is more in line with the observation habits of the human eye and easier to process subsequently. The perspective transformation can correct the image deformation caused by factors such as shooting angle and camera distortion, thereby improving the visual effect and use value of the image.
[0075] In one embodiment, performing exposure adjustment on the first image to obtain the second image includes:
[0076] Processing the first image through a tone mapping curve to obtain an exposure image set;
[0077] For each exposure image in the exposure image set, Laplace filtering is performed on the exposure image to obtain a filtering result value of each pixel in the exposure image, and an absolute value of the filtering result value is recorded as a first parameter value, and a first parameter map is obtained according to the first parameter values of all pixels;
[0078] For each pixel of the exposure image, the mean of the pixel on the R channel, the G channel and the B channel is calculated, the standard deviation corresponding to the pixel is obtained according to the mean, and the second parameter map is obtained according to the standard deviations corresponding to all pixels;
[0079] For each pixel of the exposure image, calculate the brightness value corresponding to the pixel, obtain the exposure value corresponding to the pixel according to the brightness value, and obtain a third parameter map according to the exposure values corresponding to all pixels;
[0080] A weight value corresponding to the exposure image is obtained according to the first parameter map, the second parameter map and the third parameter map corresponding to the exposure image, and a weighted sum is performed on all exposure images according to the weight values corresponding to all exposure images to obtain a second image.
[0081] In one implementation, by using images with different exposures, the details of bright and dark areas can be better preserved, thereby improving the dynamic range of the image. By performing Laplace filtering on the image, the edges and details of the image can be enhanced, making the image clearer.
[0082] In one implementation, the exposure image is subjected to Laplace filtering by the formula L(i, j)=Σ k,lI(i+k,j+l).K(k,l) obtains the filtering result value, where L(i,j) is the filtering result value of the pixel point (i,j), K(k,l) is the Laplace kernel, k is the radius of the kernel in the horizontal direction, l is the radius of the kernel in the vertical direction, and I(i+k,j+l) is the pixel value corresponding to the pixel point I(i+k,j+l) of the exposure image.
[0083] In one implementation, the formula The weight value corresponding to the exposure image is obtained; wherein W is the weight value, A is the first parameter value, B is the standard deviation, C is the exposure value, and w1, w2 and w3 are weight indices determined by technicians.
[0084] In one implementation, random noise in an image can be effectively reduced by a weighted summation method. Different exposure images have different noise characteristics, and the noise can be smoothed by weighted summation.
[0085] In one implementation, the mean and standard deviation of the RGB channels are calculated for each pixel, which can better adjust the color and brightness, making the image more natural and balanced. By calculating the brightness value and exposure value of the pixel, the problem of overexposure or underexposure of the image can be avoided, making the brightness distribution of the image more reasonable.
[0086] In one implementation, by combining the first parameter map (Laplacian filter result), the second parameter map (standard deviation) and the third parameter map (exposure value), the details, contrast and brightness of the image can be comprehensively considered to obtain a better quality image.
[0087] In one embodiment, extracting contours in the second image, and obtaining a set of regions to be detected according to the extracted contours includes:
[0088] Substituting the second image into the deep aggregation network to obtain a first multi-scale feature map, and performing center point, offset and direction prediction on the first multi-scale feature map to obtain multiple predicted bounding boxes;
[0089] For each predicted bounding box, perform corner point detection on the predicted bounding box to obtain a target corner point set, and connect all points in the target corner point set to obtain an initial connection line set;
[0090] For the initial connection line set, the initial connection line combination that forms the largest area is obtained to obtain a first connection line set;
[0091] The first connection line set and the second image are brought into the connection line enhancement model to obtain a second connection line set, a region to be detected is formed according to the connection lines in the second connection line set, and a set of regions to be detected is obtained according to the region to be detected corresponding to each predicted bounding box.
[0092] In one implementation, multi-scale feature maps are extracted through a deep learning network, which can better capture the complex information in the image and improve the accuracy of detection; combining information at different scales allows both small and large targets to be effectively detected, improving the robustness of detection.
[0093] In one implementation, by performing corner point detection on the predicted bounding box, the four corner points of the target area can be accurately determined, thereby avoiding the inaccuracy of the bounding box.
[0094] In one implementation, by calculating the connection line set and processing the enhanced model, the connection lines can be better extracted and optimized, thereby obtaining a more accurate area to be detected.
[0095] In one embodiment, bringing the first connection line set and the second image into the connection line enhancement model to obtain the second connection line set includes:
[0096] Substituting the second image into the CNN backbone network to obtain a second multi-scale feature map, and encoding and optimizing the second multi-scale feature map through a transformer encoder to obtain a target scale feature map;
[0097] For each link in the first link set, position encoding is performed on the endpoint coordinates of the link to obtain a first encoding value, and the first encoding value is substituted into the multilayer perceptron to obtain a target query vector;
[0098] The target query vector and the target scale feature map are brought into the transformer decoder for decoding to obtain the target enhanced link line, the link line is enhanced according to the target enhanced link line to obtain the target link line, and the target link lines corresponding to all the link lines in the first link line set are obtained to obtain the second link line set.
[0099] In one implementation, multi-scale feature maps are extracted through the CNN backbone network, which can effectively capture multi-level information in the image and provide rich features for subsequent processing; the multi-scale feature maps are encoded and optimized to further improve the expression ability of the feature maps, making the feature maps more suitable for the extraction and enhancement tasks of connecting lines.
[0100] In one implementation, the coordinates of the endpoints of the connecting lines are positionally encoded, which can retain spatial information and improve the processing effect of the multi-layer perceptron and transformer model on the connecting lines; the encoded values are converted into target query vectors through the multi-layer perceptron to simplify the feature representation of the connecting lines and facilitate subsequent decoding and enhancement processing.
[0101] In one implementation, the target query vector and the target scale feature map are input into the transformer decoder, and the global information and contextual relationship are fully utilized to decode and enhance the connection lines. The enhanced connection lines output by the decoder can more accurately represent and optimize the connection lines, making the connection lines more accurate and stable.
[0102] In one implementation, through position encoding and target query vectors, the model can adapt to connecting lines of different positions and scales and has strong adaptability.
[0103] In one embodiment, extracting text contours from the detection image to obtain target text layout includes:
[0104] The detection image is converted into a grayscale image, and the grayscale image is converted into a binary image by an edge detection algorithm to obtain a target detection image;
[0105] Perform Hough transform detection on the target detection image to obtain the text area boundary in the target detection image, and determine the text recognition contour according to the text area boundary;
[0106] Perform text segmentation on the target detection image according to the text recognition contour to obtain the target text image;
[0107] All target text images are acquired for text recognition to obtain a character label set, and all character labels in the character label set are laid out according to the recognition positions of all target text images to obtain a target text layout.
[0108] In one implementation, by converting the detected image into a grayscale image and applying an edge detection algorithm, the outline of the text area can be more clearly highlighted, thereby improving the accuracy of subsequent processing; converting the grayscale image into a binary image can effectively remove background noise, enhance the contrast of the text area, and make the text area more obvious.
[0109] In one implementation, the text area boundary is detected by Hough transform, so that the text area in the image can be accurately located. Hough transform is particularly effective for straight line detection and can reliably find the boundary line of the text area. Based on the detected text area boundary, the text recognition contour is further accurately determined to ensure the accuracy of subsequent text cutting.
[0110] In one implementation, text cutting is performed according to the precisely determined text recognition contour, which can ensure that the cut text image is complete and accurate, avoid the problem of partial loss of text or incomplete cutting, and obtain the cut target text image, which helps to improve the effect of OCR text recognition, because the input image quality directly affects the accuracy of OCR recognition.
[0111] In one implementation, the target text image is recognized through OCR technology, which can efficiently convert the text in the image into a character label set. According to the position information of the text recognition, the character labels are reasonably arranged, and the typesetting structure of the original text can be reconstructed, retaining the format and structural information of the text.
[0112] Based on the same inventive concept, the embodiment of the present invention also provides a system for identifying and locating a nameplate area in a nameplate image. Figure 2 , Figure 2 A framework diagram of a nameplate area recognition and positioning system in a nameplate image provided by an embodiment of the present invention includes:
[0113] A first image acquisition module is used to acquire an initial image and preprocess the initial image to obtain a first image; the initial image is an image including a nameplate area;
[0114] A contour acquisition module, used to adjust the exposure of the first image to obtain a second image, extract contours in the second image, and obtain a set of areas to be detected according to the extracted contours;
[0115] A target image acquisition module is used to cut the second image with the to-be-detected area set to obtain a detection image, extract the text contour of the detection image to obtain a target text layout, substitute the target text layout into a preset database for similarity comparison, and if the comparison result shows that there is a nameplate image, the detection image is recorded as the target image;
[0116] The final image acquisition module is used to perform perspective transformation matrix on the target image to obtain the final image.
[0117] A system for identifying and locating nameplate areas in nameplate images provided in an embodiment of the present invention can effectively reduce the problem of image overexposure or underexposure caused by ambient light by preprocessing and adjusting the exposure of the initial image, thereby improving the recognition accuracy of nameplate information. Contour extraction and cutting of the set of areas to be detected in the second image help to accurately locate the nameplate area, further improve the accuracy of recognition, and improve the accuracy and efficiency of nameplate recognition and positioning.
[0118] In one embodiment, the contour acquisition module includes:
[0119] An exposure image generation module, used for processing the first image through a tone mapping curve to obtain an exposure image set;
[0120] A first parameter map acquisition module is used to perform Laplace filtering on each exposure image in the exposure image set to obtain a filtering result value of each pixel in the exposure image, record the absolute value of the filtering result value as a first parameter value, and obtain a first parameter map according to the first parameter values of all pixels;
[0121] A second parameter map acquisition module is used to calculate the mean of each pixel of the exposure image on the R channel, the G channel and the B channel, obtain the standard deviation corresponding to the pixel according to the mean, and obtain the second parameter map according to the standard deviations corresponding to all pixels;
[0122] A third parameter map acquisition module is used to calculate the brightness value corresponding to each pixel of the exposure image, obtain the exposure value corresponding to the pixel according to the brightness value, and obtain the third parameter map according to the exposure values corresponding to all pixels;
[0123] The second image generation module is used to obtain the weight value corresponding to the exposure image according to the first parameter map, the second parameter map and the third parameter map corresponding to the exposure image, and to obtain the second image by weighted summing up all the exposure images according to the weight values corresponding to all the exposure images.
[0124] In one embodiment, the contour acquisition module further includes:
[0125] A prediction bounding box generation module is used to substitute the second image into a deep aggregation network to obtain a first multi-scale feature map, and perform center point, offset and direction prediction on the first multi-scale feature map to obtain multiple prediction bounding boxes;
[0126] An initial connection line generation module is used to perform corner point detection on each predicted bounding box to obtain a target corner point set, and connect all points in the target corner point set to obtain an initial connection line set;
[0127] A first connection line determination module is used to obtain, for the initial connection line set, a combination of initial connection lines that forms the largest area to obtain a first connection line set;
[0128] The module for determining the area to be detected is used to bring the first connection line set and the second image into the connection line enhancement model to obtain the second connection line set, form the area to be detected according to the connection lines in the second connection line set, and obtain the area set to be detected according to the area to be detected corresponding to each predicted boundary box.
[0129] In one embodiment, the module for determining the area to be detected includes:
[0130] A coding optimization module, used for substituting the second image into the CNN backbone network to obtain a second multi-scale feature map, and performing coding optimization on the second multi-scale feature map through a transformer encoder to obtain a target scale feature map;
[0131] A target query vector determination module is used to perform position encoding on the endpoint coordinates of each link in the first link set to obtain a first encoding value, and substitute the first encoding value into the multilayer perceptron to obtain a target query vector;
[0132] The second connection line determination module is used to bring the target query vector and the target scale feature map into the transformer decoder for decoding to obtain a target enhanced connection line, enhance the connection line according to the target enhanced connection line to obtain a target connection line, and obtain the target connection lines corresponding to all the connection lines in the first connection line set to obtain a second connection line set.
[0133] In one embodiment, the target image acquisition module includes:
[0134] The target detection image determination module is used to convert the detection image into a grayscale image, and convert the grayscale image into a binary image by an edge detection algorithm to obtain a target detection image;
[0135] A text area boundary determination module is used to perform Hough transform detection on the target detection image to obtain the text area boundary in the target detection image, and determine the text recognition contour according to the text area boundary;
[0136] An image cutting module is used to cut the target detection image into characters according to the character recognition contour to obtain the target character image;
[0137] The image layout module is used to obtain all target text images for text recognition to obtain a character label set, and to layout all character labels in the character label set according to the recognition positions of all target text images to obtain a target text layout.
[0138] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A method for identifying and locating a nameplate area in a nameplate image, characterized in that: The method comprises: Acquire an initial image, and preprocess the initial image to obtain a first image; the initial image is an image including a nameplate area; Adjusting the exposure of the first image to obtain a second image, extracting contours in the second image, and obtaining a set of regions to be detected according to the extracted contours; For the set of regions to be detected, the second image is cut with the region to be detected to obtain a detection image, a text contour is extracted from the detection image to obtain a target text layout, the target text layout is substituted into a preset database for similarity comparison, and if the comparison result shows that there is a nameplate image, the detection image is recorded as a target image; A perspective transformation matrix is performed on the target image to obtain a final image.
2. The method for identifying and locating a nameplate area in a nameplate image according to claim 1, characterized in that: Adjusting the exposure of the first image to obtain the second image includes: Processing the first image by a tone mapping curve to obtain an exposure image set; For each exposure image in the exposure image set, Laplace filtering is performed on the exposure image to obtain a filtering result value of each pixel in the exposure image, an absolute value of the filtering result value is recorded as a first parameter value, and a first parameter map is obtained according to the first parameter values of all pixels; For each pixel of the exposure image, the mean of the pixel on the R channel, the G channel and the B channel is calculated, the standard deviation corresponding to the pixel is obtained according to the mean, and the second parameter map is obtained according to the standard deviations corresponding to all pixels; For each pixel of the exposure image, calculate the brightness value corresponding to the pixel, obtain the exposure value corresponding to the pixel according to the brightness value, and obtain a third parameter map according to the exposure values corresponding to all pixels; A weight value corresponding to the exposure image is obtained according to the first parameter map, the second parameter map and the third parameter map corresponding to the exposure image, and a weighted sum is performed on all exposure images according to the weight values corresponding to all exposure images to obtain a second image.
3. The method for identifying and locating a nameplate area in a nameplate image according to claim 1, characterized in that: Extracting contours in the second image, and obtaining a set of regions to be detected according to the extracted contours comprises: Substituting the second image into a deep aggregation network to obtain a first multi-scale feature map, and performing center point, offset and direction prediction on the first multi-scale feature map to obtain multiple predicted bounding boxes; For each predicted bounding box, performing corner point detection on the predicted bounding box to obtain a target corner point set, and connecting all points in the target corner point set to obtain an initial connection line set; For the initial connection line set, obtaining the initial connection line combination that forms the largest area to obtain a first connection line set; The first connection line set and the second image are brought into the connection line enhancement model to obtain a second connection line set, a region to be detected is formed according to the connection lines in the second connection line set, and a set of regions to be detected is obtained according to the region to be detected corresponding to each predicted bounding box.
4. The method for identifying and locating a nameplate area in a nameplate image according to claim 3, characterized in that: Substituting the first connection line set and the second image into the connection line enhancement model to obtain the second connection line set comprises: Substituting the second image into a CNN backbone network to obtain a second multi-scale feature map, and performing encoding optimization on the second multi-scale feature map through a transformer encoder to obtain a target scale feature map; For each link in the first link set, position encoding is performed on the endpoint coordinates of the link to obtain a first encoding value, and the first encoding value is substituted into a multilayer perceptron to obtain a target query vector; The target query vector and the target scale feature map are brought into a transformer decoder for decoding to obtain a target enhanced link line, the link line is enhanced according to the target enhanced link line to obtain a target link line, and the target link lines corresponding to all the link lines in the first link line set are obtained to obtain a second link line set.
5. The method for identifying and locating a nameplate area in a nameplate image according to claim 1, characterized in that: Extracting the text contour of the detected image to obtain the target text layout includes: The detection image is converted into a grayscale image, and the grayscale image is converted into a binary image by an edge detection algorithm to obtain a target detection image; Performing Hough transform detection on the target detection image to obtain a text area boundary in the target detection image, and determining a text recognition contour according to the text area boundary; Performing text segmentation on the target detection image according to the text recognition contour to obtain a target text image; All target text images are acquired for text recognition to obtain a character label set, and all character labels in the character label set are laid out according to the recognition positions of all target text images to obtain a target text layout.
6. A nameplate area recognition and positioning system in a nameplate image, characterized in that: The system comprises: A first image acquisition module, used to acquire an initial image, and preprocess the initial image to obtain a first image; the initial image is an image including a nameplate area; A contour acquisition module, used to adjust the exposure of the first image to obtain a second image, extract contours in the second image, and obtain a set of areas to be detected according to the extracted contours; a target image acquisition module, for the set of regions to be detected, cutting the second image with the region to be detected to obtain a detection image, extracting text contours from the detection image to obtain a target text layout, substituting the target text layout into a preset database for similarity comparison, and if the comparison result shows that a nameplate image exists, recording the detection image as a target image; The final image acquisition module is used to perform a perspective transformation matrix on the target image to obtain a final image.
7. The nameplate area recognition and positioning system in a nameplate image according to claim 6, characterized in that: The contour acquisition module comprises: An exposure image generation module, configured to process the first image using a tone mapping curve to obtain an exposure image set; a first parameter map acquisition module, configured to perform Laplace filtering on each exposure image in the exposure image set to obtain a filtering result value of each pixel in the exposure image, record an absolute value of the filtering result value as a first parameter value, and obtain a first parameter map according to the first parameter values of all pixels; A second parameter map acquisition module is used to calculate the mean of each pixel of the exposure image on the R channel, the G channel and the B channel, obtain the standard deviation corresponding to the pixel according to the mean, and obtain the second parameter map according to the standard deviations corresponding to all pixels; A third parameter map acquisition module is used to calculate the brightness value corresponding to each pixel of the exposure image, obtain the exposure value corresponding to the pixel according to the brightness value, and obtain the third parameter map according to the exposure values corresponding to all pixels; The second image generation module is used to obtain the weight value corresponding to the exposure image according to the first parameter map, the second parameter map and the third parameter map corresponding to the exposure image, and to obtain the second image by weighted summing up all the exposure images according to the weight values corresponding to all the exposure images.
8. The system for identifying and locating a nameplate area in a nameplate image according to claim 6, characterized in that: The contour acquisition module also includes: A prediction bounding box generation module, used for substituting the second image into a deep aggregation network to obtain a first multi-scale feature map, and performing center point, offset and direction prediction on the first multi-scale feature map to obtain multiple prediction bounding boxes; An initial connection line generation module is used to perform corner point detection on each predicted bounding box to obtain a target corner point set, and connect all points in the target corner point set to obtain an initial connection line set; A first connection line determination module is used to obtain, for the initial connection line set, a combination of initial connection lines that forms the largest area to obtain a first connection line set; The module for determining the area to be detected is used to bring the first connection line set and the second image into the connection line enhancement model to obtain a second connection line set, form the area to be detected according to the connection lines in the second connection line set, and obtain the area set to be detected according to the area to be detected corresponding to each predicted boundary box.
9. The nameplate area recognition and positioning system in a nameplate image according to claim 8, characterized in that: The module for determining the area to be detected includes: A coding optimization module, used for substituting the second image into a CNN backbone network to obtain a second multi-scale feature map, and performing coding optimization on the second multi-scale feature map through a transformer encoder to obtain a target scale feature map; a target query vector determination module, configured to perform position encoding on the endpoint coordinates of each link in the first link set to obtain a first encoding value, and substitute the first encoding value into a multilayer perceptron to obtain a target query vector; The second connecting line determination module is used to bring the target query vector and the target scale feature map into the transformer decoder for decoding to obtain a target enhanced connecting line, enhance the connecting line according to the target enhanced connecting line to obtain a target connecting line, and obtain the target connecting lines corresponding to all the connecting lines in the first connecting line set to obtain a second connecting line set.
10. The nameplate area recognition and positioning system in a nameplate image according to claim 6, characterized in that: The target image acquisition module comprises: The target detection image determination module is used to convert the detection image into a grayscale image, and convert the grayscale image into a binary image by an edge detection algorithm to obtain a target detection image; A text area boundary determination module is used to perform Hough transform detection on the target detection image to obtain the text area boundary in the target detection image, and determine the text recognition contour according to the text area boundary; An image cutting module, used for performing text cutting on the target detection image according to the text recognition contour to obtain a target text image; The image layout module is used to obtain all target text images for text recognition to obtain a character label set, and to layout all character labels in the character label set according to the recognition positions of all target text images to obtain a target text layout.
Citation Information
Patent Citations
Method and device for nameplate identification of transformer station device
CN108009547A
Handwritten text detection method and device, server and storage medium
CN115620315A
Image fusion method based on adaptive edge preserving smooth pyramid
CN116416175A
Electric energy meter nameplate key feature identification method and system
CN117636321A
Electrical equipment nameplate exposure image correction method based on LMPEC algorithm
CN118115408A
