CN117079294A - Method, device, equipment and medium for generating standard template of broken code screen of ammeter - Google Patents

Method, device, equipment and medium for generating standard template of broken code screen of ammeter Download PDF

Info

Publication number
CN117079294A
CN117079294A CN202311128890.XA CN202311128890A CN117079294A CN 117079294 A CN117079294 A CN 117079294A CN 202311128890 A CN202311128890 A CN 202311128890A CN 117079294 A CN117079294 A CN 117079294A
Authority
CN
China
Prior art keywords
picture
code
target
character
screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311128890.XA
Other languages
Chinese (zh)
Inventor
李云水
张志豪
蒋金豪
厉小润
孟舰
俞建淼
赵浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HANGZHOU DECHUANG ELECTRONICS CO Ltd
Original Assignee
HANGZHOU DECHUANG ELECTRONICS CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by HANGZHOU DECHUANG ELECTRONICS CO Ltd filed Critical HANGZHOU DECHUANG ELECTRONICS CO Ltd
Priority to CN202311128890.XA priority Critical patent/CN117079294A/en
Publication of CN117079294A publication Critical patent/CN117079294A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/1914Determining representative reference patterns, e.g. averaging or distorting patterns; Generating dictionaries, e.g. user dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/19007Matching; Proximity measures
    • G06V30/19013Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/02Recognising information on displays, dials, clocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/06Recognition of objects for industrial automation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Abstract

The application discloses a method, a device, equipment and a medium for generating an ammeter code-breaking screen standard template, which relate to the field of image processing and comprise the following steps: acquiring an initial ammeter picture and intercepting a to-be-processed broken code screen area picture from the initial ammeter picture; determining a broken code screen boundary in a broken code screen region picture to be processed so as to determine a forward target broken code screen region picture based on the broken code screen boundary; sliding each character picture to be matched in a preset character picture library on a target code-breaking screen area picture to perform character matching so as to determine each target character picture matched with the target code-breaking screen area picture, and determining target position coordinates of each target character picture in the target code-breaking screen area picture; each character picture to be matched corresponding to different types of ammeter exists in a preset character picture library; and drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture. The method can quickly and simply generate the standard templates of the ammeter code-breaking screen of different types of ammeter.

Description

Method, device, equipment and medium for generating standard template of broken code screen of ammeter
Technical Field
The invention relates to the field of image processing, in particular to a method, a device, equipment and a medium for generating an ammeter code-breaking screen standard template.
Background
With the development of the power industry and the large-scale construction of smart grids, the usage scale of smart meters is rapidly increasing. The code breaking screen is one of important components of the intelligent ammeter, and can display the electricity consumption of a user and various information of a power grid on the screen. In actual production of the ammeter, because the problems of non-display, virtual display and the like of character stroke segments of the broken code screen exist, the power consumption information is displayed in error, and strict defect detection is required to be carried out on the character display of the broken code screen before the ammeter is used.
Defect detection methods are mainly classified into two categories: (1) manual detection; (2) automatic detection. The manual detection speed is slow, the efficiency is low, and the human resource consumption is large. The method used for automatic detection is usually template matching, and the similarity between the character image to be detected and the standard template image is calculated to judge whether the character has defects or not by comparing the character image to be detected with the standard template. Therefore, the premise of detecting the defects of the broken code screen of the ammeter is to manufacture an ammeter standard template. At present, the standard template manufacturing method of the ammeter mainly comprises the step of manually manufacturing, namely manually cutting out images of different characters to manufacture a standard image template. However, there are three main problems associated with manually making templates: (1) A great deal of manpower and time are needed, the efficiency is low, and the production cost is high; (2) The normalization of the template can be influenced by human factors, so that erroneous judgment or missed detection can be caused; (3) The template has insufficient universality and cannot be used for electric meters of different types and models.
In summary, how to quickly and simply generate the standard templates of the code breaking screen of the electric meters of different types is a current urgent problem to be solved.
Disclosure of Invention
In view of the above, the present application aims to provide a method, a device and a medium for generating a standard template of an ammeter code-breaking screen, which can quickly and simply generate standard templates of ammeter code-breaking screens of different types of ammeter, and the specific scheme is as follows:
in a first aspect, the application discloses a method for generating a standard template of an ammeter code-breaking screen, which comprises the following steps:
acquiring an initial ammeter picture, and intercepting a to-be-processed broken code screen area picture from the initial ammeter picture;
determining a broken code screen boundary in the to-be-processed broken code screen region picture so as to determine a forward target broken code screen region picture based on the broken code screen boundary;
sliding each character picture to be matched in a preset character picture library on the target code-breaking screen region picture to perform character matching so as to determine each target character picture matched with the target code-breaking screen region picture, and determining target position coordinates of each target character picture in the target code-breaking screen region picture; each character picture to be matched corresponding to different types of ammeter exists in the preset character picture library;
And drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture.
Optionally, the capturing the to-be-processed broken code screen area picture from the initial ammeter picture includes:
gray processing is carried out on the initial ammeter picture to obtain a gray ammeter picture, and a code-breaking screen area picture to be processed is intercepted from the gray ammeter picture;
correspondingly, the determining the broken code screen boundary in the to-be-processed broken code screen region picture comprises the following steps:
determining an edge map in the to-be-processed broken code screen area picture by using a Canny edge detection algorithm; the edge map comprises character edges and code breaking screen edges;
determining a gray value non-zero region in the edge map, and determining a minimum circumscribed rectangle corresponding to the gray value non-zero region;
and taking the boundary of the minimum circumscribed rectangle as the broken code screen boundary, and determining the angular point position coordinates of four angular points of the broken code screen boundary in the image of the broken code screen area to be processed.
Optionally, the determining the forward target code breaking screen area picture based on the code breaking screen boundary includes:
taking one corner with the largest ordinate in the corner position coordinates of the four corners as a zeroth corner, or taking one corner with smaller abscissa in two corners with the largest ordinate in the corner position coordinates of the four corners as the zeroth corner;
Sequentially determining the rest corner points as a first corner point, a second corner point and a third corner point according to the anticlockwise direction by taking the zeroth corner point as a starting point;
calculating a rotation angle based on the corner position coordinates of the zeroth corner and the corner position coordinates of the third corner;
and taking a picture center point of the to-be-processed code breaking screen region picture as a rotation center, rotating the to-be-processed code breaking screen region picture anticlockwise based on the rotation angle to obtain a forward reference code breaking screen region picture, and acquiring a target code breaking screen region picture from the reference code breaking screen region picture based on the four rotated corner points.
Optionally, the sliding each character picture to be matched in the preset character picture library on the target code-breaking screen area picture to perform character matching to determine each target character picture matched with the target code-breaking screen area picture, and determining a target position coordinate of each target character picture in the target code-breaking screen area picture, including:
sliding each character picture to be matched in a preset character picture library on the target code-breaking screen area picture for carrying out character matching for a plurality of times, and calculating a first character matching degree of each matching;
Determining the highest matching degree of the first character corresponding to each character picture to be matched;
and if the highest first character matching degree corresponding to the character picture to be matched is not smaller than a matching degree threshold, taking the character picture to be matched as a target character picture matched with the target code-breaking screen region picture, and taking the matching position coordinate of the first character picture when the first character matching degree is highest as the target position coordinate of the target character picture in the target code-breaking screen region picture so as to determine the target position coordinate of each target character picture in the target code-breaking screen region picture.
Optionally, after determining the target position coordinate of each target character picture in the target broken code screen area picture, the method further includes:
if a plurality of first single character areas which are not successfully matched exist in the target code breaking screen area picture, manually selecting the first single character areas to obtain a plurality of single character pictures;
sliding each character picture to be matched in a preset character picture library on each single character picture for carrying out character matching for a plurality of times, and calculating a second character matching degree of each matching;
Determining the highest second character matching degree corresponding to each character picture to be matched on each single character picture;
if the highest second character matching degree of the character picture to be matched on the single character picture is not smaller than the matching degree threshold, taking the character picture to be matched as one target character picture corresponding to the single character picture in the target code-breaking screen area picture, and taking the matching position coordinate of the second character matching degree as the temporary position coordinate of the target character picture in the single character picture so as to determine the target character picture corresponding to each single character picture and the temporary coordinate position of each target character picture in the corresponding single character picture;
and determining the target position coordinate of each target character picture in the target code-breaking screen region picture based on the temporary position coordinate and the reference coordinate position of each single character picture in the target code-breaking screen region picture.
Optionally, if the determining, based on the temporary position coordinates and the reference coordinate position of each single character picture in the target code-breaking screen area picture, that the target position coordinates of each target character picture in the target code-breaking screen area picture are later, the second single character area which is not successfully matched still exists in the target code-breaking screen area picture, then the drawing a target ammeter code-breaking screen standard template based on the target position coordinates and the target character picture includes:
And drawing an initial ammeter code-breaking screen standard template based on the target position coordinates and the target character picture, and manually drawing a character frame corresponding to the second single character area in the initial ammeter code-breaking screen standard template to obtain the target ammeter code-breaking screen standard template.
Optionally, sliding each character picture to be matched in the preset character picture library on the target code-breaking screen area picture for a plurality of times to perform character matching, and calculating a first character matching degree of each matching, including:
the pixel values of all pixel points in each character picture in a preset character picture library are expressed as a first vector according to a target sequence;
determining the unified picture width and the unified picture height of each character picture in the preset character picture library;
constructing a plurality of sliding windows by taking a basic coordinate position as the left upper corner coordinate of the sliding window and based on the unified picture width and the unified picture height; the basic coordinate position comprises any coordinate combination of an x-axis coordinate range and a y-axis coordinate range; the x coordinate range is zero to the difference between the target picture width and the unified picture width; the y-axis coordinate range is zero to the difference between the target picture height and the unified picture height; the width and the height of the target picture are the width and the height of the target code-breaking screen region picture;
The pixel values of all the pixel points in the sliding windows are expressed as second vectors according to the target sequence, so that the second vectors corresponding to each sliding window are obtained;
and sliding each character picture to be matched in a preset character picture library on the target code-breaking screen area picture, and calculating the first character matching degree based on the first vector of the character picture to be matched and the second vector of the sliding window when the character picture to be matched slides to the sliding window so as to obtain the first character matching degree between each character picture to be matched and each sliding window.
In a second aspect, the application discloses an ammeter code-breaking screen standard template generating device, which comprises:
the first picture acquisition module is used for acquiring an initial ammeter picture and intercepting a code-breaking screen area picture to be processed from the initial ammeter picture;
the second image acquisition module is used for determining a broken code screen boundary in the broken code screen region image to be processed so as to determine a forward target broken code screen region image based on the broken code screen boundary;
the third picture acquisition module is used for sliding each character picture to be matched in a preset character picture library on the target code-breaking screen region picture to perform character matching so as to determine each target character picture matched with the target code-breaking screen region picture and determine the target position coordinate of each target character picture in the target code-breaking screen region picture; each character picture to be matched corresponding to different types of ammeter exists in the preset character picture library;
And the template drawing module is used for drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the method for generating the standard template of the broken code screen of the ammeter.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; the method for generating the standard template of the ammeter code-breaking screen is characterized in that the computer program is executed by a processor.
Obtaining an initial ammeter picture, and intercepting a code-breaking screen area picture to be processed from the initial ammeter picture; determining a broken code screen boundary in the to-be-processed broken code screen region picture so as to determine a forward target broken code screen region picture based on the broken code screen boundary; sliding each character picture to be matched in a preset character picture library on the target code-breaking screen region picture to perform character matching so as to determine each target character picture matched with the target code-breaking screen region picture, and determining target position coordinates of each target character picture in the target code-breaking screen region picture; each character picture to be matched corresponding to different types of ammeter exists in the preset character picture library; and drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture. According to the method, each character picture to be matched in the preset character picture library is subjected to character matching with the target code-breaking screen area picture to determine each target character picture matched with the target code-breaking screen area picture, so that an ammeter code-breaking screen standard template is constructed; in addition, because the character pictures to be matched corresponding to the electric meters of different types exist in the preset character picture library, the method can generate the standard templates of the code breaking screen of the electric meters of different types.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a standard template generation method for an ammeter code-breaking screen;
fig. 2 is a schematic view of a cut-out area for cutting out a picture of a code-breaking screen to be processed according to the present application;
FIG. 3 is a schematic diagram of a region picture of a broken code screen to be processed according to the present application;
FIG. 4 is an edge pictorial view of the present disclosure;
FIG. 5 is a schematic view of a reference code-breaking screen region picture according to the present disclosure;
FIG. 6 is a schematic diagram of a target code-breaking screen area picture according to the present disclosure;
FIG. 7 is a schematic diagram of three character pictures to be matched in a preset character picture library according to the present application;
FIG. 8 is a flowchart of a specific method for generating a standard template for an ammeter code-breaking screen according to the present application
FIG. 9 is a schematic diagram of a standard template generating device for an ammeter code-breaking screen;
fig. 10 is a block diagram of an electronic device according to the present disclosure.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Defect detection methods are mainly classified into two categories: (1) manual detection; (2) automatic detection. The manual detection speed is slow, the efficiency is low, and the human resource consumption is large. The method used for automatic detection is usually template matching, and the similarity between the character image to be detected and the standard template image is calculated to judge whether the character has defects or not by comparing the character image to be detected with the standard template. Therefore, the premise of detecting the defects of the broken code screen of the ammeter is to manufacture an ammeter standard template. At present, the standard template manufacturing method of the ammeter mainly comprises the step of manually manufacturing, namely manually cutting out images of different characters to manufacture a standard image template. However, there are three main problems associated with manually making templates: (1) A great deal of manpower and time are needed, the efficiency is low, and the production cost is high; (2) The normalization of the template can be influenced by human factors, so that erroneous judgment or missed detection can be caused; (3) The template has insufficient universality and cannot be used for electric meters of different types and models.
Therefore, the embodiment of the application provides a standard template generation scheme for the broken code screen of the ammeter, which can quickly, simply and conveniently generate standard templates for broken code screens of the ammeter of different types.
The embodiment of the application discloses a method for generating a standard template of an ammeter code-breaking screen, which is shown in fig. 1, and comprises the following steps:
step S11: and acquiring an initial ammeter picture, and intercepting a to-be-processed broken code screen area picture from the initial ammeter picture.
In this embodiment, the initial ammeter picture is an ammeter image with normal display of broken code screen area characters; the initial electricity meter image may be an electricity meter image of various types of electricity meters.
In this embodiment, the to-be-processed broken code screen area picture is a larger-range black area slightly larger than the broken code screen area but not exceeding the periphery of the broken code screen area, as shown in fig. 2, and is a schematic view of an intercepting area for intercepting the to-be-processed broken code screen area picture (the inside of the square frame is an area to be intercepted); referring to fig. 3, a schematic diagram of a region of a broken code screen to be processed is shown.
In this embodiment, the capturing the to-be-processed broken code screen area picture from the initial ammeter picture includes: and carrying out gray processing on the initial ammeter picture to obtain a gray ammeter picture, and intercepting a to-be-processed broken code screen area picture from the gray ammeter picture.
In one embodiment, the camera that takes the initial ammeter picture may be 200 ten thousand pixels in resolution, 0.5m in imaging height, and imaged vertically.
Step S12: and determining a broken code screen boundary in the to-be-processed broken code screen region picture so as to determine a forward target broken code screen region picture based on the broken code screen boundary.
In this embodiment, the determining the broken code screen boundary in the to-be-processed broken code screen area picture includes: determining an edge map corresponding to the to-be-processed broken code screen area picture by using a Canny edge detection algorithm; the edge map comprises character edges and code breaking screen edges; determining a gray value non-zero region in the edge map, and determining a minimum circumscribed rectangle corresponding to the gray value non-zero region; and taking the boundary of the minimum circumscribed rectangle as the broken code screen boundary, and determining the angular point position coordinates of four angular points of the broken code screen boundary in the image of the broken code screen area to be processed. It should be noted that, when the position coordinates of the corner points are determined, the upper left corner of the to-be-processed broken code screen area picture is taken as the origin of coordinates. Referring to fig. 4, an edge map is shown.
It should be noted that determining, by using a Canny edge detection algorithm, an edge map corresponding to the to-be-processed broken code screen area picture specifically includes: carrying out Gaussian filtering on the picture of the code breaking screen area to be processed to smooth the image and remove noise to obtain a smoothed picture; calculating a horizontal direction gradient component and a vertical direction gradient component of the smoothed picture by utilizing a Sobel operator (Sobel operator), and calculating a gradient amplitude and a gradient direction according to the horizontal direction gradient component and the vertical direction gradient component; non-maximum suppression is carried out, non-boundary points are removed, specifically, pixel points are traversed one by one, whether the current pixel point is a local maximum value with the same or opposite gradient directions in surrounding pixel points is judged, and whether the point is suppressed is determined according to a judging result: if the gradient amplitude of the point is the local maximum in the same or opposite gradient direction, reserving the point, namely an edge pixel, otherwise, suppressing the point (namely setting the gradient amplitude of the point to zero); and setting a high threshold and a low threshold for further determining an edge, marking the edge pixel as a strong edge and reserving the edge pixel if the gradient amplitude is greater than or equal to the high threshold, marking the edge pixel as a virtual edge and reserving the edge pixel to be further resolved if the gradient amplitude is between the high threshold and the low threshold, and suppressing the edge pixel if the gradient amplitude is less than or equal to the low threshold. For the virtual edge, whether the virtual edge needs to be reserved or not is determined by judging whether the virtual edge is connected with the strong edge or not: if connected with a strong edge, the edge is preserved, otherwise it is suppressed. It should be noted that the edges detected by the edge detection algorithm include the edges of the code breaking screen and the edges of the characters in the code breaking screen area, but the edges of the code breaking screen are at the outermost periphery, and the edges of the characters are enclosed. It should be noted that the final edge map is a binary image, the gray value of the non-edge background area is 0, and the gray value of the edge pixel is 255. It should be noted that the double threshold (high threshold and low threshold) of the Canny edge detection algorithm is set manually according to the actual situation.
In a specific embodiment, the high threshold of the Canny edge detection algorithm may be set to 100, and the low threshold may be set to 0; a non-0 point set may be derived using a cv2.findnonzero () function, a minimum bounding rectangle for the non-0 point set is drawn using a cv2.minarea rect () function, and its four corner coordinates are derived using a cv2.boxpoints () function.
In this embodiment, the determining the forward target code-breaking screen area picture based on the code-breaking screen boundary includes: taking one corner with the largest ordinate in the corner position coordinates of the four corners as a zeroth corner, or taking one corner with smaller abscissa in two corners with the largest ordinate in the corner position coordinates of the four corners as the zeroth corner; sequentially determining the rest corner points as a first corner point, a second corner point and a third corner point according to the anticlockwise direction by taking the zeroth corner point as a starting point; calculating a rotation angle based on the corner position coordinates of the zeroth corner and the corner position coordinates of the third corner; and taking a picture center point of the to-be-processed code breaking screen region picture as a rotation center, rotating the to-be-processed code breaking screen region picture anticlockwise based on the rotation angle to obtain a forward reference code breaking screen region picture, and acquiring a target code breaking screen region picture from the reference code breaking screen region picture based on the four rotated corner points. Referring to fig. 5, a schematic diagram of a reference broken code screen area picture is shown; referring to fig. 6, a schematic diagram of a target code-breaking screen area is shown. It should be noted that, the process of obtaining the target code-breaking screen region picture from the reference code-breaking screen region picture removes the unexpected black portion of the code-breaking screen boundary of the reference code-breaking screen region picture.
It should be noted that, when the picture of the code breaking screen area to be processed is a forward direction, the rotation angle is 0.
In a specific embodiment, the cv2.getrotation matrix2d () function may be used to obtain a rotated mapping matrix, and then the cv2.warp affine () function is used to complete mapping from the source image to the rotated image, so as to implement rotation of the image.
It should be noted that, specifically, a non-0 point set is obtained according to a gray value of non-0Solving the non-0 point set +.>The minimum circumscribed rectangle of (a) is the broken code screen area boundary, and four corner coordinates (x ri ,y ri ),i=0,1,2,3。
It should be noted that, specifically, according to the coordinate values of four corner points, the ordinate y is calculated ri The corner with the largest value is designated as corner 0 (zeroth corner), and its coordinates are (x) ri ,y ri ) If two corner points y ri If the values are the same, the corner with smaller abscissa is named as corner 0, and then the remaining three corners are named as corner 1 (first corner), corner 2 (second corner) and corner 3 (third corner) in turn anticlockwise, wherein the coordinate values are respectively (x r1 ,y r1 )、(x r2 ,y r2 )、(x r3 ,y r3 ). Calculating the rotation angle of the minimum circumscribed rectangle according to the corner point 0 and the corner point 3
It should be noted that if the size of the picture of the broken code screen area to be processed is (w, h), where w is the width and h is the height, the coordinates of the picture center point are (w/2,h/2), the picture center point is taken as the rotation center, the picture of the broken code screen area is rotated counterclockwise by θ, the image is not scaled, the original size (w, h) is maintained, and the missing part after rotation is performed by using the boundary pixel value of the gray-scale image after rotation Filling. After the rotation is completed, the code-breaking screen area is corrected, and four corner coordinates (x ri ,y ri ) I=0, 1,2,3 is converted into (x' ri ,y′ ri ) I=0, 1,2 and 3, and dividing the code-breaking screen area, namely the target code-breaking screen area picture, according to the coordinates of four corner points of the boundary rectangle of the rotated code-breaking screen area.
It should be noted that, because the dividing is performed according to the outer edge, the divided code-breaking screen area inevitably contains non-background pixels of the partial code-breaking screen edge, and the non-background pixels are removed to determine the target code-breaking screen area picture as a fixed size, specifically, the four sides of the divided code-breaking screen area are all cut to a certain width, so that the divided code-breaking screen area is changed into a uniform size, and the non-background pixels contained in the divided code-breaking screen area are removed. It should be noted that the fixed size needs to be changed as the conditions of the type of electricity meter, the camera parameters, the imaging height, etc. are changed. However, when the same type and model of ammeter is under the same imaging condition, the fixed size is kept unchanged, namely, the size is fixed in the single template manufacturing process.
Step S13: sliding each character picture to be matched in a preset character picture library on the target code-breaking screen region picture to perform character matching so as to determine each target character picture matched with the target code-breaking screen region picture, and determining target position coordinates of each target character picture in the target code-breaking screen region picture; and each character picture to be matched corresponding to different types of electric meters exists in the preset character picture library.
Referring to fig. 7, a schematic diagram of three character pictures to be matched in a preset character picture library is shown.
In this embodiment, the preset character picture library is manufactured manually, and each character on the code screen is manually framed and divided to separate a character picture only containing a single character. It should be noted that one character may have a plurality of character pictures, and character pictures may be made on different types of code-breaking screen electric meters, so as to be applied to template generation of multiple types of code-breaking screen electric meters.
It should be noted that, because the character pictures to be matched corresponding to the electric meters of different types exist in the preset character picture library, the method can construct the code breaking screen standard templates of various electric meters of different types.
It should be noted that, when the target position coordinate is determined, the upper left corner of the target code-breaking screen region picture is taken as the origin of coordinates, and the target position coordinate is the coordinate of the upper left corner of the target character picture on the target code-breaking screen region picture.
Step S14: and drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture.
Obtaining an initial ammeter picture, and intercepting a code-breaking screen area picture to be processed from the initial ammeter picture; determining a broken code screen boundary in the to-be-processed broken code screen region picture so as to determine a forward target broken code screen region picture based on the broken code screen boundary; sliding each character picture to be matched in a preset character picture library on the target code-breaking screen region picture to perform character matching so as to determine each target character picture matched with the target code-breaking screen region picture, and determining target position coordinates of each target character picture in the target code-breaking screen region picture; each character picture to be matched corresponding to different types of ammeter exists in the preset character picture library; and drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture. According to the method, each character picture to be matched in the preset character picture library is subjected to character matching with the target code-breaking screen area picture to determine each target character picture matched with the target code-breaking screen area picture, so that an ammeter code-breaking screen standard template is constructed; in addition, because the character pictures to be matched corresponding to the electric meters of different types exist in the preset character picture library, the method can generate the standard templates of the code breaking screen of the electric meters of different types.
The embodiment of the application discloses a specific ammeter code-breaking screen standard template generation method, which further describes and optimizes a technical scheme relative to the previous embodiment. Referring to fig. 8, the method specifically includes:
step S21: and acquiring an initial ammeter picture, and intercepting a to-be-processed broken code screen area picture from the initial ammeter picture.
For more specific processing in step S21, reference may be made to the corresponding content disclosed in the foregoing embodiment, and a detailed description is omitted herein.
Step S22: and determining a broken code screen boundary in the to-be-processed broken code screen region picture so as to determine a forward target broken code screen region picture based on the broken code screen boundary.
For more specific processing in step S22, reference may be made to the corresponding content disclosed in the foregoing embodiment, and a detailed description is omitted here.
Step S23: and sliding each character picture to be matched in a preset character picture library on the target code-breaking screen area picture for carrying out character matching for a plurality of times, and calculating the first character matching degree of each matching.
In this embodiment, sliding each character picture to be matched in the preset character picture library on the target code-breaking screen area picture for several times, and calculating a first character matching degree of each matching includes: the pixel values of all pixel points in each character picture in a preset character picture library are expressed as a first vector according to a target sequence; determining the unified picture width and the unified picture height of each character picture in the preset character picture library; constructing a plurality of sliding windows by taking a basic coordinate position as the left upper corner coordinate of the sliding window and based on the unified picture width and the unified picture height; the basic coordinate position comprises any coordinate combination of an x-axis coordinate range and a y-axis coordinate range; the x coordinate range is zero to the difference between the target picture width and the unified picture width; the y-axis coordinate range is zero to the difference between the target picture height and the unified picture height; the width and the height of the target picture are the width and the height of the target code-breaking screen region picture; the pixel values of all the pixel points in the sliding windows are expressed as second vectors according to the target sequence, so that the second vectors corresponding to each sliding window are obtained; and sliding each character picture to be matched in a preset character picture library on the target code-breaking screen area picture, and calculating the first character matching degree based on the first vector of the character picture to be matched and the second vector of the sliding window when the character picture to be matched slides to the sliding window so as to obtain the first character matching degree between each character picture to be matched and each sliding window.
It should be noted that the target sequence is that each row of pixel values is determined as a vector from left to right, the vectors corresponding to the rows of pixel values are arranged from top to bottom to obtain a corresponding first vector or second vector, and it should be noted that the rightmost value of the last row of vectors is connected with the leftmost value of the current row of vectors.
It should be noted that the picture width and the picture height of each character picture in the preset character picture library may not be uniform, and when the matching operation is performed on each character picture in the preset character picture library, a separate sliding window needs to be set for the character picture separately.
In a specific embodiment, when matching a character, the size of the corresponding character picture T is set to be w t ×h t Then there is w t ×h t Each pixel point, the gray values of all the pixel points are expressed as a vector according to the target sequenceSetting the I size of the picture to be matched as w i ×h i In w t ×h t For the sliding window size, matching the character picture with the sliding window to calculate the matching degree, so that a size w is taken from the (x, y) position of the picture I t ×h t The gray scale values of all pixel points in the sliding window are expressed as a vector in sequence>The degree of matching is:
wherein (x, y) represents the coordinates of the upper left corner of the sliding window on picture I, x=0, 1..w i -w t ;y=0,1...h i -h t The method comprises the steps of carrying out a first treatment on the surface of the T (x ', y') represents the pixel gradation value at (x ', y') on the character picture T; i (x+x ', y+y') represents the pixel gray value at (x+x ', y+y') on picture I. It should be noted that the degree of matching δ (x, y) ∈ [ -1,1]The closer delta (x, y) to 1 indicates the better matching effect.
Step S24: and determining the highest matching degree of the first character corresponding to each character picture to be matched.
For more specific processing in step S24, reference may be made to the corresponding content disclosed in the foregoing embodiment, and a detailed description is omitted herein.
Step S25: and if the highest first character matching degree corresponding to the character picture to be matched is not smaller than a matching degree threshold, taking the character picture to be matched as a target character picture matched with the target code-breaking screen region picture, and taking the matching position coordinate of the first character picture when the first character matching degree is highest as the target position coordinate of the target character picture in the target code-breaking screen region picture so as to determine the target position coordinate of each target character picture in the target code-breaking screen region picture.
In this embodiment, the matching degree threshold is determined according to practical situations, and is not limited herein, and in a specific embodiment, the matching degree threshold may be 0.8.
In this embodiment, after determining the target position coordinates of each target character picture in the target code-breaking screen region picture, if there are no first single character regions that are not successfully matched in the target code-breaking screen region picture, directly drawing to obtain a standard template.
In this embodiment, there are a plurality of first single character areas that are not successfully matched in the target broken code screen area picture, and then, matching operation needs to be performed on each first single character area, specifically, after determining the target position coordinates of each target character picture in the target broken code screen area picture, the method further includes: if a plurality of first single character areas which are not successfully matched exist in the target code breaking screen area picture, manually selecting the first single character areas to obtain a plurality of single character pictures; sliding each character picture to be matched in a preset character picture library on each single character picture for carrying out character matching for a plurality of times, and calculating a second character matching degree of each matching; determining the highest second character matching degree corresponding to each character picture to be matched on each single character picture; if the highest second character matching degree of the character picture to be matched on the single character picture is not smaller than the matching degree threshold, taking the character picture to be matched as one target character picture corresponding to the single character picture in the target code-breaking screen area picture, and taking the matching position coordinate of the second character matching degree as the temporary position coordinate of the target character picture in the single character picture so as to determine the target character picture corresponding to each single character picture and the temporary coordinate position of each target character picture in the corresponding single character picture; and determining the target position coordinate of each target character picture in the target code-breaking screen region picture based on the temporary position coordinate and the reference coordinate position of each single character picture in the target code-breaking screen region picture.
It should be noted that the manual box menu character area does not strictly frame the single character, should be slightly larger than the character picture of the character, allowing the surrounding character portions to be box-selected.
In this embodiment, after the matching operation is performed on each first single character region, if there is no second single character region that is not successfully matched in the target code-breaking screen region picture, a standard template is directly drawn.
Step S26: and drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture.
In this embodiment, if the determining, based on the temporary position coordinates and the reference coordinate position of each single character picture in the target code-breaking screen area picture, that the target position coordinates of each target character picture in the target code-breaking screen area picture are later, the second single character area which is not successfully matched still exists in the target code-breaking screen area picture, then the drawing a target ammeter code-breaking screen standard template based on the target position coordinates and the target character picture includes: and drawing an initial ammeter code-breaking screen standard template based on the target position coordinates and the target character picture, and manually drawing a character frame corresponding to the second single character area in the initial ammeter code-breaking screen standard template to obtain the target ammeter code-breaking screen standard template.
In this embodiment, manually drawing the character frame refers to manually selecting the character as a character template of the character, and the character frame requiring manual drawing can only include the character and should not be selected into the surrounding character frames.
It should be noted that in most cases, all characters are automatically matched successfully.
The method comprises the steps of obtaining an initial ammeter picture, and intercepting a to-be-processed broken code screen area picture from the initial ammeter picture; determining a broken code screen boundary in the to-be-processed broken code screen region picture so as to determine a forward target broken code screen region picture based on the broken code screen boundary; sliding each character picture to be matched in a preset character picture library on the target code-breaking screen area picture for carrying out character matching for a plurality of times, and calculating a first character matching degree of each matching; determining the highest matching degree of the first character corresponding to each character picture to be matched; if the highest first character matching degree corresponding to the character picture to be matched is not smaller than a matching degree threshold, taking the character picture to be matched as a target character picture matched with the target code-breaking screen region picture, and taking the matching position coordinate of the first character matching degree as the target position coordinate of the target character picture in the target code-breaking screen region picture so as to determine the target position coordinate of each target character picture in the target code-breaking screen region picture; and drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture. According to the method, each character picture to be matched in the preset character picture library is subjected to character matching with the target code-breaking screen area picture to determine each target character picture matched with the target code-breaking screen area picture, so that an ammeter code-breaking screen standard template is constructed; in addition, because the character pictures to be matched corresponding to the electric meters of different types exist in the preset character picture library, the application can generate the standard templates of the code breaking screen of the electric meters of different types; in addition, the application can carry out secondary matching after the primary matching is unsuccessful, and can manually draw the character frame of the second single character picture which is unsuccessful in matching after the secondary matching is unsuccessful, thereby ensuring the integrity of the standard template of the code breaking screen of the target ammeter.
Correspondingly, the embodiment of the application also discloses a standard template generating device of the ammeter code-breaking screen, which is shown in fig. 9, and comprises the following steps:
the first picture acquisition module 11 is used for acquiring an initial ammeter picture and intercepting a to-be-processed broken code screen area picture from the initial ammeter picture;
a second image obtaining module 12, configured to determine a broken code screen boundary in the broken code screen area image to be processed, so as to determine a forward target broken code screen area image based on the broken code screen boundary;
a third image obtaining module 13, configured to slide each character image to be matched in a preset character image library on the target code-breaking screen area image to perform character matching, so as to determine each target character image matched with the target code-breaking screen area image, and determine a target position coordinate of each target character image in the target code-breaking screen area image; each character picture to be matched corresponding to different types of ammeter exists in the preset character picture library;
and the template drawing module 14 is used for drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture.
The more specific working process of each module may refer to the corresponding content disclosed in the foregoing embodiment, and will not be described herein.
The method comprises the steps of obtaining an initial ammeter picture, and intercepting a to-be-processed broken code screen area picture from the initial ammeter picture; determining a broken code screen boundary in the to-be-processed broken code screen region picture so as to determine a forward target broken code screen region picture based on the broken code screen boundary; sliding each character picture to be matched in a preset character picture library on the target code-breaking screen region picture to perform character matching so as to determine each target character picture matched with the target code-breaking screen region picture, and determining target position coordinates of each target character picture in the target code-breaking screen region picture; each character picture to be matched corresponding to different types of ammeter exists in the preset character picture library; and drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture. According to the method, each character picture to be matched in the preset character picture library is subjected to character matching with the target code-breaking screen area picture to determine each target character picture matched with the target code-breaking screen area picture, so that an ammeter code-breaking screen standard template is constructed; in addition, because the character pictures to be matched corresponding to the electric meters of different types exist in the preset character picture library, the method can generate the standard templates of the code breaking screen of the electric meters of different types.
Further, the embodiment of the application also provides electronic equipment. Fig. 10 is a block diagram of an electronic device 20, according to an exemplary embodiment, and the contents of the diagram should not be construed as limiting the scope of use of the present application in any way.
Fig. 10 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 is configured to store a computer program, where the computer program is loaded and executed by the processor 21 to implement relevant steps in the method for generating an ammeter code screen standard template disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 26 is used to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 24 is used for obtaining external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application needs, which is not limited herein.
The memory 22 may be a read-only memory, a random access memory, a magnetic disk, an optical disk, or the like, and the resources stored thereon may include the computer program 221, which may be stored in a temporary or permanent manner. The computer program 221 may further include a computer program for performing other specific tasks in addition to the computer program for performing the method for generating the standard template for the breaking code screen of the ammeter executed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, the embodiment of the application also discloses a computer readable storage medium for storing a computer program; the method for generating the standard template of the ammeter code-breaking screen is characterized in that the computer program is executed by a processor.
The specific steps of the method may be referred to as corresponding matters disclosed in the foregoing embodiments, and will not be described herein.
In the present disclosure, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between the embodiments refer to each other, that is, for the device disclosed in the embodiments, since the device corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The method, the device, the equipment and the storage medium for generating the standard template of the broken code screen of the ammeter provided by the application are described in detail, and specific examples are applied to the explanation of the principle and the implementation mode of the application, and the explanation of the above examples is only used for helping to understand the method and the core idea of the application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. The method for generating the standard template of the code breaking screen of the ammeter is characterized by comprising the following steps of:
acquiring an initial ammeter picture, and intercepting a to-be-processed broken code screen area picture from the initial ammeter picture;
determining a broken code screen boundary in the to-be-processed broken code screen region picture so as to determine a forward target broken code screen region picture based on the broken code screen boundary;
sliding each character picture to be matched in a preset character picture library on the target code-breaking screen region picture to perform character matching so as to determine each target character picture matched with the target code-breaking screen region picture, and determining target position coordinates of each target character picture in the target code-breaking screen region picture; each character picture to be matched corresponding to different types of ammeter exists in the preset character picture library;
And drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture.
2. The method for generating the standard template of the broken code screen of the electric meter according to claim 1, wherein the step of intercepting the picture of the area of the broken code screen to be processed from the initial electric meter picture comprises the following steps:
gray processing is carried out on the initial ammeter picture to obtain a gray ammeter picture, and a code-breaking screen area picture to be processed is intercepted from the gray ammeter picture;
correspondingly, the determining the broken code screen boundary in the to-be-processed broken code screen region picture comprises the following steps:
determining an edge map in the to-be-processed broken code screen area picture by using a Canny edge detection algorithm; the edge map comprises character edges and code breaking screen edges;
determining a gray value non-zero region in the edge map, and determining a minimum circumscribed rectangle corresponding to the gray value non-zero region;
and taking the boundary of the minimum circumscribed rectangle as the broken code screen boundary, and determining the angular point position coordinates of four angular points of the broken code screen boundary in the image of the broken code screen area to be processed.
3. The method for generating the standard template of the broken code screen of the electric meter according to claim 2, wherein the determining the forward target broken code screen area picture based on the broken code screen boundary comprises:
Taking one corner with the largest ordinate in the corner position coordinates of the four corners as a zeroth corner, or taking one corner with smaller abscissa in two corners with the largest ordinate in the corner position coordinates of the four corners as the zeroth corner;
sequentially determining the rest corner points as a first corner point, a second corner point and a third corner point according to the anticlockwise direction by taking the zeroth corner point as a starting point;
calculating a rotation angle based on the corner position coordinates of the zeroth corner and the corner position coordinates of the third corner;
and taking a picture center point of the to-be-processed code breaking screen region picture as a rotation center, rotating the to-be-processed code breaking screen region picture anticlockwise based on the rotation angle to obtain a forward reference code breaking screen region picture, and acquiring a target code breaking screen region picture from the reference code breaking screen region picture based on the four rotated corner points.
4. The method for generating the standard template of the electric meter code-breaking screen according to claim 1, wherein the step of sliding each character picture to be matched in the preset character picture library on the target code-breaking screen area picture to perform character matching so as to determine each target character picture matched with the target code-breaking screen area picture, and determining the target position coordinate of each target character picture in the target code-breaking screen area picture includes:
Sliding each character picture to be matched in a preset character picture library on the target code-breaking screen area picture for carrying out character matching for a plurality of times, and calculating a first character matching degree of each matching;
determining the highest matching degree of the first character corresponding to each character picture to be matched;
and if the highest first character matching degree corresponding to the character picture to be matched is not smaller than a matching degree threshold, taking the character picture to be matched as a target character picture matched with the target code-breaking screen region picture, and taking the matching position coordinate of the first character picture when the first character matching degree is highest as the target position coordinate of the target character picture in the target code-breaking screen region picture so as to determine the target position coordinate of each target character picture in the target code-breaking screen region picture.
5. The method for generating a standard template for an electric meter code-breaking screen according to claim 4, wherein the determining the target position coordinate of each target character picture in the target code-breaking screen area picture further comprises:
if a plurality of first single character areas which are not successfully matched exist in the target code breaking screen area picture, manually selecting the first single character areas to obtain a plurality of single character pictures;
Sliding each character picture to be matched in a preset character picture library on each single character picture for carrying out character matching for a plurality of times, and calculating a second character matching degree of each matching;
determining the highest second character matching degree corresponding to each character picture to be matched on each single character picture;
if the highest second character matching degree of the character picture to be matched on the single character picture is not smaller than the matching degree threshold, taking the character picture to be matched as one target character picture corresponding to the single character picture in the target code-breaking screen area picture, and taking the matching position coordinate of the second character matching degree as the temporary position coordinate of the target character picture in the single character picture so as to determine the target character picture corresponding to each single character picture and the temporary coordinate position of each target character picture in the corresponding single character picture;
and determining the target position coordinate of each target character picture in the target code-breaking screen region picture based on the temporary position coordinate and the reference coordinate position of each single character picture in the target code-breaking screen region picture.
6. The method for generating a standard template for an electric meter code-breaking screen according to claim 5, wherein if the determining that there is still an unmatched second single character area in the target code-breaking screen area picture after determining the target position coordinate of each target character picture in the target code-breaking screen area picture based on the temporary position coordinate and the reference coordinate position of each single character picture in the target code-breaking screen area picture, the drawing a standard template for an electric meter code-breaking screen based on the target position coordinate and the target character picture includes:
and drawing an initial ammeter code-breaking screen standard template based on the target position coordinates and the target character picture, and manually drawing a character frame corresponding to the second single character area in the initial ammeter code-breaking screen standard template to obtain the target ammeter code-breaking screen standard template.
7. The method for generating the standard template of the broken code screen of the electric meter according to any one of claims 4 to 6, wherein sliding each character picture to be matched in the preset character picture library on the target broken code screen area picture for a plurality of times to perform character matching, and calculating a first character matching degree of each matching, includes:
The pixel values of all pixel points in each character picture in a preset character picture library are expressed as a first vector according to a target sequence;
determining the unified picture width and the unified picture height of each character picture in the preset character picture library;
constructing a plurality of sliding windows by taking a basic coordinate position as the left upper corner coordinate of the sliding window and based on the unified picture width and the unified picture height; the basic coordinate position comprises any coordinate combination of an x-axis coordinate range and a y-axis coordinate range; the x coordinate range is zero to the difference between the target picture width and the unified picture width; the y-axis coordinate range is zero to the difference between the target picture height and the unified picture height; the width and the height of the target picture are the width and the height of the target code-breaking screen region picture;
the pixel values of all the pixel points in the sliding windows are expressed as second vectors according to the target sequence, so that the second vectors corresponding to each sliding window are obtained;
and sliding each character picture to be matched in a preset character picture library on the target code-breaking screen area picture, and calculating the first character matching degree based on the first vector of the character picture to be matched and the second vector of the sliding window when the character picture to be matched slides to the sliding window so as to obtain the first character matching degree between each character picture to be matched and each sliding window.
8. The utility model provides an ammeter broken code screen standard template generating device which characterized in that includes:
the first picture acquisition module is used for acquiring an initial ammeter picture and intercepting a code-breaking screen area picture to be processed from the initial ammeter picture;
the second image acquisition module is used for determining a broken code screen boundary in the broken code screen region image to be processed so as to determine a forward target broken code screen region image based on the broken code screen boundary;
the third picture acquisition module is used for sliding each character picture to be matched in a preset character picture library on the target code-breaking screen region picture to perform character matching so as to determine each target character picture matched with the target code-breaking screen region picture and determine the target position coordinate of each target character picture in the target code-breaking screen region picture; each character picture to be matched corresponding to different types of ammeter exists in the preset character picture library;
and the template drawing module is used for drawing a standard template of the code breaking screen of the target ammeter based on the target position coordinates and the target character picture.
9. An electronic device, comprising:
a memory for storing a computer program;
A processor for executing the computer program to implement the ammeter code screen standard template generation method as defined in any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the method for generating an ammeter code screen standard template according to any one of claims 1 to 7.
CN202311128890.XA 2023-09-01 2023-09-01 Method, device, equipment and medium for generating standard template of broken code screen of ammeter Pending CN117079294A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311128890.XA CN117079294A (en) 2023-09-01 2023-09-01 Method, device, equipment and medium for generating standard template of broken code screen of ammeter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311128890.XA CN117079294A (en) 2023-09-01 2023-09-01 Method, device, equipment and medium for generating standard template of broken code screen of ammeter

Publications (1)

Publication Number Publication Date
CN117079294A true CN117079294A (en) 2023-11-17

Family

ID=88702246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311128890.XA Pending CN117079294A (en) 2023-09-01 2023-09-01 Method, device, equipment and medium for generating standard template of broken code screen of ammeter

Country Status (1)

Country Link
CN (1) CN117079294A (en)

Similar Documents

Publication Publication Date Title
CN111028213B (en) Image defect detection method, device, electronic equipment and storage medium
CN109978839B (en) Method for detecting wafer low-texture defects
US10187546B2 (en) Method and device for correcting document image captured by image pick-up device
RU2631765C1 (en) Method and system of correcting perspective distortions in images occupying double-page spread
US8897565B1 (en) Extracting documents from a natural scene image
US20220172337A1 (en) Character defect detection method and device
JP2012243307A (en) Method for detecting strain in input image, device for detecting strain in input image and computer readable medium
WO2019041842A1 (en) Image processing method and device, storage medium and computer device
CN111797766B (en) Identification method, identification device, computer-readable storage medium, and vehicle
US20120320433A1 (en) Image processing method, image processing device and scanner
CN111881659B (en) Processing method and system of table picture, readable storage medium and computer equipment
CN111462098A (en) Method, device, equipment and medium for detecting overlapping of shadow areas of object to be detected
JP2021165888A (en) Information processing apparatus, information processing method of information processing apparatus, and program
JP2017500662A (en) Method and system for correcting projection distortion
CN112733855B (en) Table structuring method, table recovering device and device with storage function
CN117095417A (en) Screen shot form image text recognition method, device, equipment and storage medium
JP2010011450A (en) Image-forming device and image processing method
CN117079294A (en) Method, device, equipment and medium for generating standard template of broken code screen of ammeter
US20230071008A1 (en) Computer-readable, non-transitory recording medium containing therein image processing program for generating learning data of character detection model, and image processing apparatus
CN115601616A (en) Sample data generation method and device, electronic equipment and storage medium
WO2022056875A1 (en) Method and apparatus for segmenting nameplate image, and computer-readable storage medium
CN114663681A (en) Method for reading pointer type meter and related product
CN113591846A (en) Image distortion coefficient extraction method, distortion correction method and system, and electronic device
CN112508024A (en) Intelligent identification method for embossed seal font of electrical nameplate of transformer
CN111476800A (en) Character region detection method and device based on morphological operation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination