Electrical equipment test data acquisition method and system based on image recognition
Through the method based on image recognition, the test data of electrical equipment is collected and processed, and the problems of low data acquisition efficiency and poor accuracy in the prior art are solved, and the effects of automated acquisition and high accuracy are achieved.
Patent Information
- Application Number
- CN202411560807.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the acquisition efficiency of electrical equipment test data is low, easily affected by human factors, and there are electromagnetic interference and noise problems, resulting in inaccurate data collection.
Using an image recognition-based method, the nameplate instrument images of the electrical equipment are taken through mobile devices, perspective transformation correction, area segmentation, noise reduction processing and text recognition are performed, and combined with deep learning and text verification correction, automatic data collection is achieved.
It improves the efficiency and accuracy of electrical equipment test data collection, reduces manual entry errors, reduces labor costs, and can accurately collect data in an electromagnetic interference environment.
Smart Images

Figure CN119580264A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrical equipment test data acquisition methods, and in particular to an electrical equipment test data acquisition method and system based on image recognition. Background Art
[0002] Electrical equipment testing has made an important contribution to the operation and monitoring of power systems. Currently, most electrical testers conduct electrical tests on electrical equipment in substations, collect and enter test data, and discover equipment faults as part of their daily work. Testers manually record and enter field equipment parameters, electrical test data and other information into the PMS system after returning to the company to issue a test report. Not only is the process cumbersome and complex, but the workload is also large.
[0003] With the development of intelligent operation and inspection mode, intelligent image recognition methods have been successfully applied to manual, machine and intelligent inspection. However, the automation level of test data collation is low, which lags far behind the development of power operation and inspection.
[0004] Therefore, the prior art has the following disadvantages in the process of collating test data:
[0005] 1. Low data collection efficiency: Traditional data collection methods for electrical equipment tests usually rely on manual recording, which is not only time-consuming but also easily affected by human factors, resulting in low data collection efficiency.
[0006] 2. Electromagnetic interference problem: Compared with character recognition scenarios in other industries, due to the large amount of electromagnetic interference caused by the operation of high-voltage equipment in substations, the collected text and graphics have problems such as high noise and unclear images.
[0007] 3. Compared with traditional optical character recognition technology, for professional electrical equipment and test data, when there are professional terms or unclear images, there is a certain probability of typos or wrong information.
[0008] In summary, the current domestic electrical tests cannot realize the automatic collection of on-site test data and cannot get rid of the constraints of instrument communication interfaces. Although the current image recognition technology is very mature, the various instrument screens of different manufacturers and models have not been digitally modeled, and the test data cannot be accurately collected and read.
[0009] To this end, we provide an electrical equipment test data acquisition method and system based on image recognition to solve the above problems. Summary of the invention
[0010] In view of the problems existing in the above-mentioned prior art, the present invention provides an electrical equipment test data acquisition method and system based on image recognition, which solves the problem that the current domestic electrical tests cannot realize automatic collection of on-site test data and cannot get rid of the constraints of instrument communication interfaces. Although the current image recognition technology is very mature, it has not performed digital modeling on various instrument screens of different manufacturers and models, and cannot accurately collect and read test data.
[0011] In order to achieve the above object, the present invention adopts an electrical equipment test data acquisition method based on image recognition, comprising the following steps:
[0012] The first step is to obtain the nameplate instrument image of the electrical test equipment:
[0013] Use the high-definition camera of the mobile device to take pictures of the nameplate instruments of the electrical equipment to obtain the nameplate instrument images containing the test data;
[0014] The second step is image distortion correction:
[0015] Use perspective transformation technology to correct the deformity of the test equipment nameplate instrument image. Perform perspective transformation processing on the acquired test equipment nameplate instrument image. By projecting and mapping the original image and transforming it to the new image plane, the distortion caused by shooting angle and equipment surface curvature factors can be eliminated.
[0016] The perspective transformation formula is:
[0017]
[0018] Among them, the coordinate point of the source image plane before perspective transformation is (x, y, z), the three-dimensional coordinate point of the image after projection mapping is (X, Y, Z), and the coordinate point of the new image plane is (X', Y', Z'). Since we need to obtain the two-dimensional coordinates of the nameplate instrument image after projection mapping onto the new image plane, we can set Z'=1 and divide the transformed image coordinates by Z to reduce the three-dimensional image to two-dimensional, and get the following equation:
[0019]
[0020] Finally, the perspective transformation formula is obtained:
[0021]
[0022] Wherein, a in formula (1) and formula (3) represents the image scaling and translation parameters;
[0023] There are 9 parameters in the formula a ij Represents the mapping transformation matrix, so a 33Select four coordinate points on the original image and the target image to list eight sets of equations, and solve the scaling and translation parameters of the test environment. Select the four vertex coordinates of the original image for calculation according to the field test environment;
[0024] The third step is image region segmentation:
[0025] Perform regional segmentation on the corrected image to be recognized, and use the OTSU threshold segmentation method to separate the character area from the background in the image to obtain the character area image;
[0026] Step 4: Image denoising:
[0027] The median filtering method is used to remove the impulse noise in the text image and retain the edge and structural features of the characters;
[0028] Step 5: Image enhancement and character image segmentation:
[0029] The contrast of the character area image after removing noise is enhanced by using a contrast stretching method;
[0030] Step 6: Character recognition model training:
[0031] Establish a training data set of nameplates and instrument screens of electrical test equipment in substations, segment the text images of these nameplates and instrument screens into individual characters, and perform text annotation to complete the construction of the character model training data set;
[0032] The pre-trained text recognition model uses a convolutional recurrent neural network based on deep learning. The character model training data set is input into the character recognition pre-training model for training optimization. When the accuracy of the text content recognition of the pre-trained text recognition model reaches the requirements of the electrical test inspection, the model training is terminated.
[0033] Step 7: Text verification and correction:
[0034] The optimized and trained text recognition model is applied to the electrical test data collection. The recognized equipment nameplate text information is compared with the key information of the electrical equipment object stored locally. The similarity between the recognition result and the text is evaluated through the edit distance algorithm, and the text verification and correction are performed.
[0035] Step 8: Automatically enter test data into the system:
[0036] The calibrated and corrected instrument information is associated with the electrical equipment test object in the database through the nameplate information and saved in the system database to realize the automatic collection of electrical equipment test data.
[0037] As a further optimization of the above scheme, the threshold segmentation formula in the third step is:
[0038] σ 2 =p A (t)(m A (t)-m G ) 2 +p B (t)(m B (t)-m G ) 2 (4)
[0039] The image pixel values are divided into two categories by a threshold t; they are character class A and background class B. Character class A is less than t, and background class B is greater than or equal to t. The inter-class variance σ 2 Expressed as a function of the segmentation threshold t, p A (t) and p B (t) are the proportions of text pixels and background pixels, m A (t) and m B (t) are the average grayscale of text and background, m G is the overall average grayscale, and the optimal threshold is determined by traversing pixels [0-255] and calculating the maximum inter-class variance;
[0040] The pixel values of the image to be recognized are mapped to 0-255, and the optimal segmentation threshold t is calculated to divide the image into two parts: text and background.
[0041] As a further optimization of the above solution, the median filter formula in the fourth step is:
[0042] g(x,y)=med{f(xi,yi)},(i,j)∈S(5)
[0043] Where g(x,y) is the grayscale value of the output image, f(x,y) is the grayscale value of the pixel in the neighborhood centered at (x,y) in the input image, med represents the median operation, S is the template window, and i and j represent the pixel range of the S window respectively;
[0044] Select a 3x3 window and slide it along each pixel from left to right and from top to bottom in the row and column directions of the text image. After each slide, sort the grayscale of the pixels in the window and replace the grayscale value of the pixel at the center of the window with the middle value.
[0045] As a further optimization of the above scheme, the contrast stretching formula in the fifth step is:
[0046]
[0047] Where g(x,y) is the grayscale value of the output image, f(x,y) represents the grayscale value of the pixel (x,y) in the original image; min and max are the minimum and maximum grayscale values of all pixels in the image respectively; L is the grayscale range after stretching;
[0048] Selecting 255 as the grayscale range maps the grayscale value of the image after noise removal to the range of 0 to 255. The pixel values in the output text image are more evenly distributed in the entire grayscale range, which enhances the contrast of the text in the image.
[0049] Adaptive thresholding is used to automatically determine the threshold according to the grayscale value of the local area of the image, and the image is converted into a binary image in which the target text is separated from the background, and the character image is saved.
[0050] As a further optimization of the above scheme, the edit distance algorithm formula in the seventh step is:
[0051]
[0052] The text recognition model recognizes the nameplate information string a, and the electrical equipment string name stored in the database is b, LD a,b (i,j) represents the edit distance between the first i characters of string a and the first j characters of string b. The minimum number of edit operations required to convert string a into string b is calculated. In the formula, max(i,j) represents the maximum edit distance, and min(i,j) represents the minimum edit distance. The smaller the edit distance, the greater the similarity between the two strings. If means that if the edit distance min(i,j) is 0, it means that the text is correct and does not need to be corrected. Otherwise means that in other cases, the edit distance is non-zero and less than the threshold. Then, the device name with the smallest edit distance is used to replace the image recognition result. If it is greater than the threshold, a new device is added to the database or the text recognition model is re-optimized and trained.
[0053] The present invention also discloses an electrical equipment test data acquisition system based on image recognition, which uses an electrical equipment test data acquisition method based on image recognition to realize automatic acquisition of electrical equipment test data. The electrical equipment test data acquisition system based on image recognition includes a camera module, an image preprocessing module, a text recognition and correction module, and a report content filling module.
[0054] As a further optimization of the above solution, the photographing module uses the camera of the mobile device to take pictures of the nameplate and instruments of the test equipment, and saves the images to a specified directory.
[0055] As a further optimization of the above scheme, the image preprocessing module performs deformity correction on the image saved by the camera, and the deformity correction adopts perspective transformation technology, and performs regional segmentation on the corrected image, and the regional segmentation adopts OTSU threshold segmentation method to obtain the text area image, and performs noise reduction processing on the image, and the noise reduction processing adopts median filtering method. Finally, the image is enhanced, and the enhancement processing uses contrast stretching method to enhance the contrast of the character area and extract the character image.
[0056] As a further optimization of the above scheme, the text recognition and correction module inputs the character graphics into the pre-trained character recognition model for text recognition, verifies and corrects the recognition results, and simultaneously optimizes the pre-trained character recognition model;
[0057] Based on deep learning convolutional recurrent neural network, the character model training data set is input into the character recognition pre-training model for training optimization. When the accuracy of the pre-trained character recognition model reaches the requirements of electrical test inspection, the model training is terminated.
[0058] The recognized equipment nameplate text information is compared with the key information of the locally stored electrical equipment object, and the similarity between the recognition result and the text is evaluated through the edit distance algorithm to perform text verification and correction.
[0059] As a further optimization of the above solution, the report content filling module associates the verified and corrected text information with the electrical equipment and fills in the test data and results.
[0060] The electrical equipment test data acquisition method and system based on image recognition of the present invention have the following beneficial effects:
[0061] The present invention provides an electrical equipment test data acquisition method and system based on image recognition. The electrical equipment test data acquisition system based on the image recognition method developed by the present invention helps electrical equipment test personnel to quickly identify complex electrical test data through a mobile terminal APP, detect on-site test device data, replace the traditional manual writing record mode, solve the inconvenience of on-site data transcription, avoid data errors caused by irregular writing, typos, etc. from the source, and ensure the accuracy of test technical data; compared with the original method, it reduces labor costs and improves work efficiency.
[0062] Aiming at the problems of electromagnetic interference and other obstacles to information extraction at the electrical test site, the present invention designs a targeted noise reduction method to achieve accurate collection of test data.
[0063] In view of the fact that traditional optical character recognition technology has a certain probability of typos, the present invention designs a method based on the combination of deep learning and text verification and correction to improve the accuracy of text recognition.
[0064] The present invention introduces image recognition technology into the field of electrical equipment test data collection for the first time. Aiming at the traditional mode that relies on manual recording, which has problems such as data transcription errors and omissions, an electrical equipment test data collection system based on image recognition is designed to improve the accuracy and efficiency of data collection. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 The present invention is a flow chart of an electrical equipment test data acquisition method based on image recognition;
[0066] Figure 2 It is an application flow chart of the electrical equipment test data system based on image recognition of the present invention;
[0067] Figure 3 It is the interface diagram of the electrical equipment test instrument of the present invention;
[0068] Figure 4 This is a picture correction and noise reduction effect diagram of the present invention;
[0069] Figure 5 This is a diagram showing the effect of image and text recognition in a mobile terminal according to the present invention. DETAILED DESCRIPTION
[0070] Please refer to the instruction manual Figure 1-5 The present invention provides a technical solution: a method and system for collecting test data of electrical equipment based on image recognition.
[0071] Reference Figure 1 , Attachment Figure 3 To Attachment Figure 5 As shown, the electrical equipment test data acquisition method based on image recognition includes the following steps:
[0072] 1. Obtain nameplate instrument images of electrical test equipment
[0073] Use the high-definition camera of the mobile device to take pictures of the nameplate instruments of the electrical equipment to obtain the nameplate instrument images containing the test data.
[0074] 2. Image Deformity Correction
[0075] Perspective transformation technology is used to correct the deformity of the nameplate instrument image of the test equipment. The acquired nameplate instrument image of the test equipment is processed by perspective transformation. The original image is projected and mapped and transformed to a new image plane to eliminate the distortion caused by factors such as shooting angle and equipment surface curvature, ensuring that the nameplate instrument image is consistent with the actual situation.
[0076] The perspective transformation formula is:
[0077]
[0078] Among them, the coordinate point of the source image plane before perspective transformation is (x, y, z), the three-dimensional coordinate point of the image after projection mapping is (X, Y, Z), and the coordinate point of the new image plane is (X', Y', Z'). Since we need to obtain the two-dimensional coordinates of the nameplate instrument image after projection mapping onto the new image plane, we can set Z'=1 and divide the transformed image coordinates by Z to reduce the three-dimensional image to two-dimensional, and get the following equation:
[0079]
[0080] Finally, the perspective transformation formula is obtained:
[0081]
[0082] Wherein, a in formula (1) and formula (3) represents the image scaling and translation parameters;
[0083] There are 9 parameters in the formula a ij Represents the mapping transformation matrix, so a 33 Select four coordinate points on the original image and the target image to list eight sets of equations, and the scaling and translation parameters of the test environment can be solved. Select the four vertex coordinates of the original image for calculation according to the field test environment. The perspective transformation effect diagram of the field test image is shown in the attached figure. Figure 4 shown.
[0084] 3. Image region segmentation
[0085] The corrected image to be recognized is segmented, and the OTSU threshold segmentation method is used to separate the character area from the background in the image to obtain the character area image. Threshold segmentation formula:
[0086] σ 2 =p A (t)(m A (t)-m G ) 2 +p B (t)(m B (t)-m G ) 2 (4)
[0087] The image pixel values are divided into two categories by a threshold t: character class A (less than t) and background class B (greater than or equal to t), and the inter-class variance σ 2 Expressed as a function of the segmentation threshold t, p A (t) and p B (t) are the proportions of text pixels and background pixels, m A (t) and m B (t) are the average grayscale of text and background, m Gis the overall average grayscale. By traversing pixels [0-255], the optimal threshold is determined by maximizing the inter-class variance.
[0088] The pixel values of the image to be recognized are mapped to 0-255, and the optimal segmentation threshold t is calculated to divide the image into two parts: text and background.
[0089] 4. Image Noise Reduction
[0090] The median filter method is used to remove the impulse noise in the text image and retain the edge and structural features of the characters. The median filter formula is:
[0091] g(x,y)=med{f(xi,yi)},(i,j)∈S(5)
[0092] Among them, g(x,y) is the grayscale value of the output image, f(x,y) is the grayscale value of the pixel in the neighborhood centered at (x,y) in the input image, med represents the median operation, and S is the template window (i and j represent the pixel point range of the S window respectively).
[0093] Select a 3x3 window and slide it along each pixel from left to right and from top to bottom in the row and column directions of the text image. After each slide, sort the grayscale of the pixels in the window and replace the grayscale value of the pixel at the center of the window with the middle value.
[0094] 5. Image enhancement and character image segmentation
[0095] The contrast of the character area image after noise removal is enhanced by contrast stretching method to facilitate character extraction. The contrast stretching formula is:
[0096]
[0097] Where g(x,y) is the grayscale value of the output image, f(x,y) represents the grayscale value of the pixel (x,y) in the original image; min and max are the minimum and maximum grayscale values of all pixels in the image, respectively; and L is the grayscale range after stretching.
[0098] Selecting 255 as the grayscale range maps the grayscale value of the image after noise removal to the range of 0 to 255. The pixel values in the output text image are more evenly distributed in the entire grayscale range, enhancing the contrast of the text in the image.
[0099] Adaptive thresholding is used to automatically determine the threshold according to the grayscale value of the local area of the image, thereby converting the image into a binary image in which the target text is separated from the background and the character image is saved.
[0100] 6. Character recognition model training
[0101] A training dataset of nameplates and instrument screens of electrical test devices in substations is established. The text images of these nameplates and instrument screens are segmented into single characters, and the text is annotated to complete the construction of the character model training dataset.
[0102] The pre-trained text recognition model adopts a convolutional recurrent neural network (CRNN) based on deep learning. The character model training data set is input into the character recognition pre-training model for training optimization. When the text content recognition accuracy of the pre-trained text recognition model reaches the electrical test inspection requirements, the model training is terminated.
[0103] 7. Text proofreading and correction
[0104] The optimized and trained text recognition model is applied to the electrical test data collection. The recognized equipment nameplate text information is compared with the key information of the electrical equipment object stored locally. The edit distance algorithm is used to calculate and evaluate the similarity between the recognition result and the text, and the text verification and correction are performed. The edit distance algorithm is as follows:
[0105]
[0106] The text recognition model recognizes the nameplate information string a, and the electrical equipment string name stored in the database is b, LD a,b (i,j) represents the edit distance between the first i characters of string a and the first j characters of string b. The minimum number of edit operations required to convert string a into string b is calculated. In the formula, max(i,j) represents the maximum edit distance, and min(i,j) represents the minimum edit distance. The smaller the edit distance, the greater the similarity between the two strings. If means that if the edit distance min(i,j) is 0, it means that the text is correct and does not need to be corrected. Otherwise means that in other cases, the edit distance is non-zero and less than the threshold. Then, the device name with the smallest edit distance is used to replace the image recognition result. If it is greater than the threshold, a new device is added to the database or the text recognition model is re-optimized and trained.
[0107] 8. Test data automatic entry system
[0108] The calibrated and corrected instrument information is associated with the electrical equipment test object in the database through the nameplate information and saved in the system database to realize the automatic collection of electrical equipment test data, thereby ensuring the integrity and security of the data.
[0109] Reference Figure 2 As shown in the figure, the present invention provides an automatic data collection system for electrical equipment test based on image recognition, comprising:
[0110] Photo module: Use the mobile device camera to take photos of the nameplate and instrument of the test equipment, and save the images to the specified directory;
[0111] Image preprocessing module: perform deformity correction on the image saved by taking a photo, perform region segmentation on the corrected image to obtain the text region image, perform noise reduction on the image, and finally perform image enhancement to extract the character image;
[0112] Text recognition and correction module: input character graphics into the pre-trained character recognition model for text recognition, verify and correct the recognition results, and simultaneously optimize the pre-trained character recognition model.
[0113] Report content filling module: associate the calibration and correction text information with the electrical equipment, and fill in the test data and results.
Claims
1. A method for collecting data from electrical equipment tests based on image recognition, characterized in that: The following steps are involved: The first step is to obtain the nameplate instrument image of the electrical test equipment: Use the high-definition camera of the mobile device to take pictures of the nameplate instruments of the electrical equipment to obtain the nameplate instrument images containing the test data; The second step is image distortion correction: Use perspective transformation technology to correct the deformity of the test equipment nameplate instrument image. Perform perspective transformation processing on the acquired test equipment nameplate instrument image. By projecting and mapping the original image and transforming it to the new image plane, the distortion caused by shooting angle and equipment surface curvature factors can be eliminated. The perspective transformation formula is: Among them, the coordinate point of the source image plane before perspective transformation is (x, y, z), the three-dimensional coordinate point of the image after projection mapping is (X, Y, Z), and the coordinate point of the new image plane is (X', Y', Z'). Get the two-dimensional coordinates of the nameplate instrument image after projection mapping to the new image plane, set Z'=1, and divide the transformed image coordinates by Z to reduce the three-dimensional image to two-dimensional, and get the following equation: Finally, the perspective transformation formula is obtained: Wherein, a in formula (1) and formula (3) represents the image scaling and translation parameters; the 9 parameters a in the formula ij Represents the mapping transformation matrix, let a 33 Artificially select four coordinate points on the original image and the target mapped image to list 8 sets of equations, solve the test environment parameters, and select the four vertex coordinates of the source image for calculation according to the field test environment; The third step is image region segmentation: Perform regional segmentation on the corrected image to be recognized, and use the OTSU threshold segmentation method to separate the character area from the background in the image to obtain the character area image; Step 4: Image denoising: The median filtering method is used to remove the impulse noise in the text image and retain the edge and structural features of the characters; Step 5: Image enhancement and character image segmentation: The contrast of the character area image after removing noise is enhanced by using a contrast stretching method; Step 6: Character recognition model training: Establish a training data set of nameplates and instrument screens of electrical test equipment in substations, segment the text images of these nameplates and instrument screens into individual characters, and perform text annotation to complete the construction of the character model training data set; The pre-trained text recognition model uses a convolutional recurrent neural network based on deep learning. The character model training data set is input into the character recognition pre-training model for training optimization. When the accuracy of the text content recognition of the pre-trained text recognition model reaches the requirements of the electrical test inspection, the model training is terminated. Step 7: Text verification and correction: The optimized and trained text recognition model is applied to the electrical test data collection. The recognized equipment nameplate text information is compared with the key information of the electrical equipment object stored locally. The similarity between the recognition result and the text is evaluated through the edit distance algorithm, and the text verification and correction are performed. Step 8: Automatically enter test data into the system: The calibrated and corrected instrument information is associated with the electrical equipment test object in the database through the nameplate information and saved in the system database to realize the automatic collection of electrical equipment test data.
2. The method and system for collecting data of electrical equipment tests based on image recognition according to claim 1, characterized in that: The threshold segmentation formula in the third step is: σ 2 =p A (t)(m A (t)-m G ) 2 +p B (t)(m B (t)-m G ) 2 (4) The image pixel values are divided into two categories by a threshold t; they are character class A and background class B. Character class A is less than t, and background class B is greater than or equal to t. The inter-class variance σ 2 Expressed as a function of the segmentation threshold t, p A (t) and p B (t) are the proportions of text pixels and background pixels, m A (t) and m B (t) are the average grayscale of text and background, m G is the overall average grayscale, and the optimal threshold is determined by traversing pixels [0-255] and calculating the maximum inter-class variance; The pixel values of the image to be recognized are mapped to 0-255, and the optimal segmentation threshold t is calculated to divide the image into two parts: text and background.
3. The method and system for collecting data of electrical equipment tests based on image recognition according to claim 1, characterized in that: The median filter formula in the fourth step is: g(x,y)=med{f(xi,yi)},(i,j)∈S (5) Where g(x,y) is the grayscale value of the output image, f(x,y) is the grayscale value of the pixel in the neighborhood centered at (x,y) in the input image, med represents the median operation, S is the template window, and i and j represent the pixel range of the S window respectively; Select a 3x3 window and slide it along each pixel from left to right and from top to bottom in the row and column directions of the text image. After each slide, sort the grayscale of the pixels in the window and replace the grayscale value of the pixel at the center of the window with the middle value.
4. The method and system for collecting electrical equipment test data based on image recognition according to claim 1, characterized in that: The contrast stretching formula in the fifth step is: Where g(x,y) is the grayscale value of the output image, f(x,y) represents the grayscale value of the pixel (x,y) in the original image; min and max are the minimum and maximum grayscale values of all pixels in the image respectively; L is the grayscale range after stretching; Selecting 255 as the grayscale range maps the grayscale value of the image after noise removal to the range of 0 to 255. The pixel values in the output text image are more evenly distributed in the entire grayscale range, which enhances the contrast of the text in the image. Adaptive thresholding is used to automatically determine the threshold according to the grayscale value of the local area of the image, and the image is converted into a binary image in which the target text is separated from the background, and the character image is saved.
5. The method and system for collecting data of electrical equipment tests based on image recognition according to claim 1, characterized in that: The edit distance algorithm formula in the seventh step is: The text recognition model recognizes the nameplate information string a, and the electrical equipment string name stored in the database is b, LD a,b (i,j) represents the edit distance between the first i characters of string a and the first j characters of string b. The minimum number of edit operations required to convert string a into string b is calculated. In the formula, max(i,j) represents the maximum edit distance, and min(i,j) represents the minimum edit distance. The smaller the edit distance, the greater the similarity between the two strings. If means that if the edit distance min(i,j) is 0, it means that the text is correct and no correction is required. Otherwise means that the edit distance is non-zero and less than the threshold in other cases. Then, the device name with the smallest edit distance is taken to replace the image recognition result. If it is greater than the threshold, a new device is added to the database or the text recognition model is re-optimized and trained.
6. An electrical equipment test data acquisition system based on image recognition, characterized in that: The electrical equipment test data acquisition method based on image recognition as described in any one of claims 1 to 5 is used to realize automatic acquisition of electrical equipment test data. The electrical equipment test data acquisition system based on image recognition includes a camera module, an image preprocessing module, a text recognition and correction module, and a report content filling module.
7. The electrical equipment test data acquisition system based on image recognition according to claim 6 is characterized in that: The photographing module uses the mobile device's camera to take photos of the test equipment's nameplate and instruments, and saves the images to a specified directory.
8. The electrical equipment test data acquisition system based on image recognition according to claim 6, characterized in that: The image preprocessing module performs deformity correction on the image saved by taking a photo, and the deformity correction adopts perspective transformation technology, performs regional segmentation on the corrected image, and the regional segmentation adopts OTSU threshold segmentation method to obtain the text area image, and performs noise reduction processing on the image, and the noise reduction processing adopts median filtering method. Finally, the image is enhanced, and the enhancement processing uses contrast stretching method to enhance the contrast of the character area and extract the character image.
9. The electrical equipment test data acquisition system based on image recognition according to claim 6, characterized in that: The text recognition and correction module inputs the character graphics into the pre-trained character recognition model for text recognition, verifies and corrects the recognition results, and simultaneously optimizes the pre-trained character recognition model; Based on deep learning convolutional recurrent neural network, the character model training data set is input into the character recognition pre-training model for training optimization. When the accuracy of the pre-trained character recognition model reaches the requirements of electrical test inspection, the model training is terminated. The recognized equipment nameplate text information is compared with the key information of the locally stored electrical equipment object, and the similarity between the recognition result and the text is evaluated through the edit distance algorithm to perform text verification and correction.
10. The electrical equipment test data acquisition system based on image recognition according to claim 6, characterized in that: The report content filling module associates the verified and corrected text information with the electrical equipment and fills in the test data and results.
Citation Information
Cited By
Method for collecting and analyzing video data
CN121357375A