CN116194963A - Nameplate image correction method, device and computer readable storage medium - Google Patents

Nameplate image correction method, device and computer readable storage medium Download PDF

Info

Publication number
CN116194963A
CN116194963A CN202080105177.1A CN202080105177A CN116194963A CN 116194963 A CN116194963 A CN 116194963A CN 202080105177 A CN202080105177 A CN 202080105177A CN 116194963 A CN116194963 A CN 116194963A
Authority
CN
China
Prior art keywords
image
nameplate
channel
corrected
coordinates
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
CN202080105177.1A
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.)
Siemens AG
Original Assignee
Siemens AG
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 Siemens AG filed Critical Siemens AG
Publication of CN116194963A publication Critical patent/CN116194963A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • G06T5/80
    • 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/146Aligning or centring of the image pick-up or image-field
    • G06V30/1475Inclination or skew detection or correction of characters or of image to be recognised
    • 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/18Extraction of features or characteristics of the image
    • G06V30/1801Detecting partial patterns, e.g. edges or contours, or configurations, e.g. loops, corners, strokes or intersections
    • G06V30/18067Detecting partial patterns, e.g. edges or contours, or configurations, e.g. loops, corners, strokes or intersections by mapping characteristic values of the pattern into a parameter space, e.g. Hough transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables

Abstract

A method (100), apparatus (500) and computer readable storage medium for correction of nameplate images. The method comprises the following steps: converting a nameplate image containing a nameplate into a grayscale image (101); performing edge detection on the grayscale image to determine an edge (102) of the nameplate; determining a perspective transformation matrix (103) based on vertex coordinates of a quadrilateral surrounding the edge and vertex coordinates of a rectified image of the nameplate image; a rectified image (104) of the nameplate image is generated based on the perspective transformation matrix. The method can correct the nameplate image containing the nameplate, and improves the correction accuracy.

Description

Nameplate image correction method, device and computer readable storage medium Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and apparatus for correcting a nameplate image, and a computer readable storage medium.
Background
The name plate (nameplate) is also called a sign, and is mainly used for recording technical data of equipment manufacturers and rated working conditions so as to be used correctly without damaging equipment. Materials for making the nameplate generally comprise metals and non-metals, wherein the metals comprise zinc alloy, copper, iron, aluminum or stainless steel and the like; the nonmetal is plastic, acrylic organic board, PVC, PC or paper.
Electronic devices typically have a nameplate attached to them that records various attribute information of the electronic device. For example, a transformer nameplate attached to a transformer typically records many of the electrical properties of the transformer. Currently, nameplates can be photographed to obtain nameplate images, and then content (e.g., text) in the nameplate images can be automatically extracted using optical character recognition (Optical Character Recognition, OCR) techniques. However, when the angle at which the nameplate is photographed is inclined, the nameplate in the nameplate image has an inclination angle accordingly, and at this time, it is difficult for the OCR technology to accurately extract the content of the nameplate.
Currently, hough transform (Hough transform) is generally used to determine a rotation angle of a nameplate in a nameplate image, and then the nameplate is transformed to a proper position based on the rotation angle, so that the nameplate image is corrected. However, the hough transform can only determine the straight line direction in the correcting process, and the length information of the line segments is lost, so that the image distortion is easy, and the correcting effect is poor.
Disclosure of Invention
The embodiment of the invention provides a method and a device for correcting nameplate images and a computer-readable storage medium.
The technical scheme of the embodiment of the invention is as follows:
a method of correcting an image of a nameplate, the method comprising:
converting a nameplate image containing a nameplate into a gray image;
performing edge detection on the grayscale image to determine an edge of the nameplate;
determining a perspective transformation matrix based on vertex coordinates of a quadrilateral surrounding the edge and vertex coordinates of a rectified image of the nameplate image;
and generating a correction image of the nameplate image based on the perspective transformation matrix.
Therefore, in the embodiment of the invention, the perspective transformation matrix is determined based on the nameplate edge determined by edge detection, and the perspective transformation matrix is utilized to generate the corrected image of the nameplate image, so that the nameplate image in the corrected image after perspective transformation is unchanged, the distortion defect of Hough transformation is overcome, and the correction accuracy can be improved.
In one embodiment, between converting a nameplate image containing a nameplate to a grayscale image and performing edge detection on the grayscale image to determine an edge of the nameplate, the method further comprises:
increasing the contrast of the gray scale image;
and performing noise reduction processing on the gray level image with increased contrast.
Therefore, in the embodiment of the invention, the quality of the gray image can be improved by increasing the contrast of the gray image and the noise reduction processing, thereby improving the correction accuracy.
In one embodiment, the generating a rectified image of the nameplate image based on the perspective transformation matrix includes:
determining coordinates of each pixel point in the quadrangle;
determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix;
each pixel is copied to a respective transformed coordinate to generate the rectified image.
It can be seen that in the embodiment of the present invention, by converting coordinates of each pixel point in a quadrangle surrounding an edge of a name plate, a corrected image having a gray scale corresponding to the quadrangle can be generated.
In one embodiment, the generating a rectified image of the nameplate image based on the perspective transformation matrix includes:
determining coordinates of each pixel point in the nameplate image;
determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix;
separating the nameplate image into an R channel, a G channel and a B channel;
determining a corrected R channel generated by copying each pixel point in the R channel to a respective post-conversion coordinate, a corrected G channel generated by copying each pixel point in the G channel to a respective post-conversion coordinate, and a corrected B channel generated by copying each pixel point in the B channel to a respective post-conversion coordinate;
and combining the corrected R channel, the corrected G channel and the corrected B channel into the corrected image.
It can be seen that in the embodiment of the present invention, by converting coordinates of each pixel point in the R, G, and B channels of the nameplate image, a corrected image having RGB colors corresponding to the nameplate image can be generated.
In one embodiment, the perimeter of the quadrilateral is the shortest in the set of quadrilaterals surrounding the edge.
Therefore, the quadrangle determined by the embodiment of the invention has the minimum circumference, so that the workload of coordinate conversion can be reduced.
An orthotic device for an image of a nameplate, the device comprising:
the gray conversion module is used for converting a nameplate image containing a nameplate into a gray image;
an edge detection module for performing edge detection on the grayscale image to determine an edge of the nameplate;
a matrix determining module for determining a perspective transformation matrix based on vertex coordinates of a quadrangle surrounding the edge and vertex coordinates of a corrected image of the nameplate image;
and the correction module is used for generating a correction image of the nameplate image based on the perspective transformation matrix.
Therefore, in the embodiment of the invention, the perspective transformation matrix is determined based on the nameplate edge determined by edge detection, and the perspective transformation matrix is utilized to generate the corrected image of the nameplate image, so that the nameplate image in the corrected image after perspective transformation is unchanged, the distortion defect of Hough transformation is overcome, and the correction accuracy can be improved.
In one embodiment, between the gray conversion module and the edge detection module, further comprising:
a preprocessing module for increasing the contrast of the gray image; and performing noise reduction processing on the gray level image with increased contrast.
Therefore, in the embodiment of the invention, the quality of the gray image can be improved by increasing the contrast of the gray image and the noise reduction processing, thereby improving the correction accuracy.
In one embodiment, a correction module is configured to determine coordinates of each pixel point in the quadrilateral; determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix; each pixel is copied to a respective transformed coordinate to generate the rectified image.
It can be seen that in the embodiment of the present invention, by converting coordinates of each pixel point in a quadrangle surrounding an edge of a name plate, a corrected image having a gray scale corresponding to the quadrangle can be generated.
In one embodiment, a correction module is used for determining coordinates of each pixel point in the nameplate image; determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix; separating the nameplate image into an R channel, a G channel and a B channel; determining a corrected R channel generated by copying each pixel point in the R channel to a respective post-conversion coordinate, a corrected G channel generated by copying each pixel point in the G channel to a respective post-conversion coordinate, and a corrected B channel generated by copying each pixel point in the B channel to a respective post-conversion coordinate; and combining the corrected R channel, the corrected G channel and the corrected B channel into the corrected image.
It can be seen that in the embodiment of the present invention, by converting coordinates of each pixel point in the R, G, and B channels of the nameplate image, a corrected image having RGB colors corresponding to the nameplate image can be generated.
In one embodiment, the perimeter of the quadrilateral is the shortest in the set of quadrilaterals surrounding the edge.
Therefore, the quadrangle determined by the embodiment of the invention has the minimum circumference, so that the workload of coordinate conversion can be reduced.
An orthotic device for an image of a nameplate, comprising: a processor and a memory;
wherein the memory has stored therein an application executable by the processor for causing the processor to perform the method of correcting a nameplate image as described in any of the preceding claims.
Therefore, the embodiment of the invention also provides a correction device with a processor-processor architecture, the nameplate graph in the corrected image after perspective transformation is unchanged, the distortion defect of Hough transformation is overcome, and the correction accuracy can be improved.
A computer readable storage medium having stored therein computer readable instructions for performing the method of correcting a nameplate image as claimed in any of the preceding claims.
Therefore, the embodiment of the invention also provides a computer readable storage medium containing computer readable instructions, the nameplate graph in the corrected image after perspective transformation is unchanged, the distortion defect of Hough transformation is overcome, and the correction accuracy can be improved.
Drawings
Fig. 1 is a flowchart of a method for correcting an image of a nameplate according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a correction process of a nameplate image according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a transformer nameplate image before correction in accordance with an embodiment of the present invention.
Fig. 4 is a schematic diagram of a corrected transformer nameplate image according to an embodiment of the present invention.
Fig. 5 is a block diagram of an apparatus for correcting an image of a tag according to an embodiment of the present invention.
Fig. 6 is a block diagram of an orthotic device for a nameplate image with a memory-processor architecture, according to an embodiment of the present invention.
Wherein, the reference numerals are as follows:
reference numerals Meaning of
100 Nameplate image correction method
101~104 Step (a)
20 Edge of nameplate
500 Correction device for nameplate image
501 Gray level conversion module
502 Pretreatment module
503 Edge detection module
504 Matrix determination module
505 Correction module
600 Correction device for nameplate image
601 Processor and method for controlling the same
602 Memory device
Detailed Description
In order to make the technical scheme and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the detailed description is intended to illustrate the invention and is not intended to limit the scope of the invention.
For simplicity and clarity of description, the following description sets forth aspects of the invention by describing several exemplary embodiments. Numerous details in the embodiments are provided solely to aid in the understanding of the invention. It will be apparent, however, that the embodiments of the invention may be practiced without limitation to these specific details. Some embodiments are not described in detail in order to avoid unnecessarily obscuring aspects of the present invention, but rather only to present a framework. Hereinafter, "comprising" means "including but not limited to", "according to … …" means "according to at least … …, but not limited to only … …". The term "a" or "an" is used herein to refer to a number of components, either one or more, or at least one, unless otherwise specified.
Considering the defect of correcting the nameplate image by Hough transformation, the embodiment of the invention provides a technical scheme for correcting the nameplate image based on perspective transformation, which can improve the correction accuracy.
Fig. 1 is a flowchart of a method for correcting an image of a nameplate according to an embodiment of the present invention.
As shown in fig. 1, the method includes:
step 101: the nameplate Image containing the nameplate is converted to a Gray Scale Image (Gray Scale Image).
Here, the nameplate image is a captured image for the nameplate. Technical data of equipment manufacturers and rated working conditions are recorded in the nameplate. For example, when the nameplate is specifically a transformer nameplate, the nameplate can record: a connection mode; phase information; rated voltage; rated power; a frequency; dry or wet transformers; an insulating medium; a cooling mode; normal operating temperature range; technical data, etc.
In particular, the nameplate image may be an image taken at the site of the device, or obtained from a database (such as a local database or cloud database at the cloud) or a third party storage medium. The nameplate image is typically an RGB color image. In an RGB color image, one color is mixed by three primary colors of red (R), green (G) and blue (B) in proportion.
Here, the nameplate image may be converted into the grayscale image by a floating point method, an integer method, a shift method, an average method, a green-only method, a Gamma correction algorithm, or the like. The gray image is represented by black of different saturation for each image point.
If a color of a certain point in the RGB color image is RGB (R, G, B), it can be converted into Gray (Gray) by the following exemplary method.
(1) Floating point method: gray=r 0.3+g 0.59+b 0.11;
(2) Integer method: gray= (r×30+g×59+b×11)/100;
(3) Shift method: gray= (r×77+g×151+b×28) >8;
(4) Average method: gray= (r+g+b)/3;
(5) Only green method: gray=g;
(6) Gamma correction algorithm:
Figure PCTCN2020116310-APPB-000001
the foregoing exemplary description describes exemplary methods for converting a nameplate image containing a nameplate to a grayscale image, and those skilled in the art will recognize that this description is exemplary only and is not intended to limit the scope of embodiments of the present invention.
Step 102: edge detection (contour detection) is performed on the grayscale image to determine an edge of the nameplate.
The purpose of edge detection is to identify points in the image where the brightness change is significant. Significant changes in image attributes typically reflect important events and changes in the attributes. By performing edge detection on the grayscale image, the edge of the nameplate contained in the grayscale image can be determined. Specifically, an edge refers to a collection of pixels whose surrounding pixel gray level changes sharply. Edges exist between the object, background and region, so edges are the basis on which image segmentation depends. Since edges are marks of positions and are insensitive to changes in gray scale, edges are also important features of image matching. After performing edge detection on the gray image, a plurality of sub-edges (for example, the edges of a certain area in the nameplate) can be returned, and the sub-edges are combined into a whole edge, namely, the edge of the nameplate.
Currently, there are many methods for edge detection, which can be broadly divided into two categories: based on searches and based on zero crossings. In search-based edge detection methods, edge intensities are first calculated, typically represented by first derivatives, such as gradient modes; then, the local direction of the edge is estimated by calculation, usually using the direction of the gradient, and using this direction to find the maximum of the local gradient modes. In the zero-crossing based approach, the zero-crossing of the second derivative derived from the image is found to locate the edge. Typically with zero crossing points of either the laplace operator or the nonlinear differential equation. Currently, commonly used edge detection templates are Laplacian operators, roberts operators, sobel operators, log (Laplacian-Gauss) operators, kirsch operators, and Prewitt operators, among others.
While the above exemplary descriptions of exemplary methods of performing edge detection, those skilled in the art will recognize that such descriptions are exemplary only and are not intended to limit the scope of embodiments of the present invention.
Step 103: a perspective transformation matrix is determined based on vertex coordinates of the quadrilateral surrounding the edge and vertex coordinates of the rectified image of the nameplate image.
Here, a quadrangle surrounding the edge is first established. Preferably, the perimeter of the quadrilateral is the shortest among all the sets of quadrilaterals surrounding the edge.
Furthermore, a perspective transformation matrix is determined based on vertex coordinates of the quadrangle surrounding the edge and vertex coordinates of the corrected image of the nameplate image.
First, perspective transformation (Perspective Transformation) will be described.
The perspective transformation is to make the shadow bearing surface rotate around the trace (perspective axis) for a certain angle according to the perspective rotation law by utilizing the condition that the perspective center, the image point and the target point are collinear, and destroy the original projection light beam, and still keep the projection geometric figure on the shadow bearing surface unchanged.
In perspective transformation, there is the following formula:
Figure PCTCN2020116310-APPB-000002
Figure PCTCN2020116310-APPB-000003
wherein:
[ x, y ] is the two-dimensional coordinates of the pixel point in the rectified image; [ u, v, w ] is the three-dimensional coordinates of the pixel point before transformation, and w is generally equal to 1; the three-dimensional coordinates of the pixel points in the rectified image may be defined as [ x, y,1].
Figure PCTCN2020116310-APPB-000004
I.e. a perspective transformation matrix, where a 33 1.
The rectified image of the nameplate image is generally rectangular. Also, the 4 vertex coordinates of the corrected image are known, such as (0, 1), (0, h, 1), (w, h, 1), and (w, 0, 1), respectively, where w is the width of the corrected image and h is the height of the corrected image.
Therefore, based on the four vertex coordinates (known) of the quadrangle surrounding the edge and the 4 vertex coordinates (known) of the corrected image of the nameplate image, 8 equations can be constructed according to the formula (3), thereby calculating a 11 、a 12 、a 13 、a 21 、a 22 、a 23 、a 31 And a 32 Is a value of (2). When calculating a 11 、 a 12 、a 13 、a 21 、a 22 、a 23 、a 31 And a 32 After the values of (a), the perspective transformation matrix can be uniquely determined
Figure PCTCN2020116310-APPB-000005
Wherein a is 33 1.
Step 104: and generating a correction image of the nameplate image based on the perspective transformation matrix.
Here, a correction image of the nameplate image is generated based on the perspective transformation matrix determined in step 103, so that correction for the nameplate image is achieved.
In one embodiment, generating a corrected image of the nameplate image based on the perspective transformation matrix in step 104 includes: determining coordinates (three-dimensional coordinates, wherein w is set to 1) of each pixel point in the quadrangle; determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix; each pixel is copied to a respective transformed coordinate to generate the rectified image.
It can be seen that in the embodiment of the present invention, by converting coordinates of each pixel point in a quadrangle surrounding an edge of a name plate, a corrected image having a gray scale corresponding to the quadrangle can be generated. Therefore, the embodiment of the invention also realizes a corrected image in the form of a gray scale.
In one embodiment, generating a corrected image of the nameplate image based on the perspective transformation matrix in step 104 includes: determining coordinates of each pixel point in the nameplate image; determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix; separating the nameplate image into an R channel, a G channel and a B channel; determining a corrected R channel generated by copying each pixel point in the R channel to a respective post-conversion coordinate, a corrected G channel generated by copying each pixel point in the G channel to a respective post-conversion coordinate, and a corrected B channel generated by copying each pixel point in the B channel to a respective post-conversion coordinate; and combining the corrected R channel, the corrected G channel and the corrected B channel into the corrected image.
Specifically, the transformed coordinates of the coordinates of each pixel point in the nameplate image are first determined based on the product of the coordinates of each pixel point in the nameplate image and the perspective transformation matrix. Then, the nameplate image is separated into an R channel, a G channel, and a B channel, and each pixel in the R channel is copied to a respective transformed coordinate to generate a corrected R channel, each pixel in the G channel is copied to a respective transformed coordinate to generate a corrected G channel, and each pixel in the B channel is copied to a respective transformed coordinate to generate a corrected B channel. Then, the corrected R channel, the corrected G channel, and the corrected B channel are combined into a corrected image. Wherein, the pixel points at the same positions of the R channel, the G channel and the B channel respectively have the same transformed coordinates.
For example, assume that colored nameplate image A needs to be rectified. First, the transformed coordinates of the coordinates of each pixel point in the nameplate image a are determined based on the product of the coordinates of each pixel point in the nameplate image a and the perspective transformation matrix. For example, the nameplate image a includes 100 pixels, wherein the coordinates of the pixel 1 correspond to the transformed coordinates K1, the coordinates of the pixel 2 correspond to the transformed coordinates K1, the coordinates of the pixel 3 correspond to the transformed coordinates K3 … …, and the coordinates of the pixel 100 correspond to the transformed coordinates K100.
Then, the nameplate image A is separated into three channels, namely an R channel of the nameplate image A, a G channel of the nameplate image A and a B channel of the nameplate image A.
Each pixel in the R-channel of nameplate image a is then copied to a respective transformed coordinate in the corrected R-channel to generate the corrected R-channel. Specifically, pixel 1 in the R channel of nameplate image a is copied to the corrected R channel at the converted coordinate K1, pixel 2 in the R channel of nameplate image a is copied to the corrected R channel at the converted coordinate K2, pixel 3 in the R channel of nameplate image a is copied to the corrected R channel at the converted coordinate K3, … …, and pixel 100 in the R channel of nameplate image a is copied to the corrected R channel at the converted coordinate K100, thereby forming a corrected R channel.
Each pixel in the G channel of nameplate image a is copied to a respective transformed coordinate in the corrected G channel to generate the corrected G channel. Specifically, pixel 1 in the G channel of the nameplate image a is copied to the corrected G channel at the converted coordinate K1, pixel 2 in the G channel of the nameplate image a is copied to the corrected G channel at the converted coordinate K2, pixel 3 in the G channel of the nameplate image a is copied to the corrected G channel at the converted coordinate K3, … …, and pixel 100 in the G channel of the nameplate image a is copied to the corrected G channel at the converted coordinate K100, thereby forming the corrected G channel.
Each pixel in the B channel of nameplate image a is copied to a respective transformed coordinate in the corrected G channel to generate the corrected B channel. Specifically, pixel 1 in the B-channel of the nameplate image a is copied to the corrected B-channel at the converted coordinate K1, pixel 2 in the B-channel of the nameplate image a is copied to the corrected B-channel at the converted coordinate K2, pixel 3 in the B-channel of the nameplate image a is copied to the corrected B-channel at the converted coordinate K3 … …, and pixel 100 in the B-channel of the nameplate image a is copied to the corrected B-channel at the converted coordinate K100, thereby forming the corrected B-channel.
And finally, merging the corrected R channel, the corrected G channel and the corrected B channel into the corrected image.
It can be seen that in the embodiment of the present invention, by converting coordinates of each pixel point in the R, G, and B channels of the nameplate image, a corrected image having RGB colors corresponding to the nameplate image can be generated. Therefore, the embodiment of the invention also realizes a correction image in the form of RGB colors.
In one embodiment, between converting the nameplate image containing the nameplate to a grayscale image in step 101 and performing edge detection on the grayscale image to determine an edge of the nameplate in step 102, the method further comprises: increasing the contrast of the gray scale image; noise reduction processing is performed on the gradation image after the contrast is increased.
In particular, the contrast of the gray image can be increased by adopting an image enhancement mode based on histogram equalization, and the basic idea is to map gray points in the image so that the gray of the whole image approximately accords with uniform distribution.
Fig. 2 is a schematic diagram of a correction process of a nameplate image according to an embodiment of the present invention.
After the outline 20 of the tag 20 is determined, the shortest perimeter quadrilateral among the set of quadrilaterals surrounding the edge 20 (which contains all quadrilaterals surrounding the edge 20) is determined, assuming a quadrilateral JKMN (typically a trapezoid). After the quadrangle JKMN is determined, coordinates of the 4 vertices J, K, M, N are determined. The rectified image is rectangular of a predetermined size. The coordinates of the four vertices A, B, C and D of the rectified image are determined. Thus, based on the correspondence between the coordinates of J, K, M, N and the coordinates of A, B, C and D, a perspective transformation conversion matrix can be calculated. Then, with the perspective transformation matrix, each pixel point in the quadrangular JKMN can be transformed to the corresponding coordinate of the corrected image ABCD, thereby realizing correction.
The process shown in fig. 1 can be applied to various application environments, such as correction of nameplate images for transformers.
Fig. 3 is a schematic diagram of a transformer nameplate image before correction in accordance with an embodiment of the present invention. Fig. 4 is a schematic diagram of a corrected transformer nameplate image according to an embodiment of the present invention. The transformer nameplate in fig. 3 is arranged on the transformer housing, the transformer nameplate image having an oblique angle and comprising the background environment of the housing. The tilt angle of the transformer nameplate image in fig. 4 is corrected and does not include a background environment, thus facilitating subsequent OCR operations.
The embodiments of the present invention are described above using correction of a transformer nameplate image as an example. Those skilled in the art will appreciate that this description is exemplary only and is not intended to limit the scope of embodiments of the invention. In fact, the embodiments of the present invention may be applied to correction processing for any type of nameplate image, and in particular to correction for nameplate images of electronic devices, in particular transformers.
Based on the above description, the embodiment of the invention also provides a correction device for nameplate images.
Fig. 5 is a block diagram of an apparatus for correcting an image of a nameplate in accordance with an embodiment of the present invention.
As shown in fig. 5, the correction device 500 for a nameplate image includes:
the gray conversion module 501 is used for converting a nameplate image containing a nameplate into a gray image;
an edge detection module 503, configured to perform edge detection on the grayscale image to determine an edge of the nameplate;
a matrix determining module 504 for determining a perspective transformation matrix based on vertex coordinates of a quadrilateral surrounding the edge and vertex coordinates of a rectified image of the nameplate image;
a correction module 505 for generating a corrected image of the nameplate image based on the perspective transformation matrix.
In one embodiment, between the gray conversion module 501 and the edge detection module 503, further includes:
a preprocessing module 502, configured to increase the contrast of the gray-scale image; and performing noise reduction processing on the gray level image with increased contrast.
In one embodiment, a correction module 505 is configured to determine coordinates of each pixel point in the quadrilateral; determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix; each pixel is copied to a respective transformed coordinate to generate the rectified image.
In one embodiment, a correction module 505 is configured to determine coordinates of each pixel in the nameplate image; determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix; separating the nameplate image into an R channel, a G channel and a B channel; determining a corrected R channel generated by copying each pixel point in the R channel to a respective post-conversion coordinate, a corrected G channel generated by copying each pixel point in the G channel to a respective post-conversion coordinate, and a corrected B channel generated by copying each pixel point in the B channel to a respective post-conversion coordinate; and combining the corrected R channel, the corrected G channel and the corrected B channel into the corrected image.
Based on the above description, the embodiment of the invention also provides a correction device of nameplate images with a memory-processor architecture.
Fig. 6 is a block diagram of an orthotic device for a nameplate image with a memory-processor architecture according to an embodiment of the present invention.
As shown in fig. 6, the orthotic device 600 includes a processor 601, a memory 602, and a computer program stored on the memory 602 and executable on the processor 601, which when executed by the processor 601, implements a method of correcting an image of a nameplate as described above.
The memory 602 may be implemented as a variety of storage media such as an electrically erasable programmable read-only memory (EEPROM), a Flash memory (Flash memory), a programmable read-only memory (PROM), and the like. Processor 601 may be implemented to include one or more central processors or one or more field programmable gate arrays that integrate one or more central processor cores. In particular, the central processor or central processor core may be implemented as a CPU or MCU or DSP, etc.
It should be noted that not all the steps and modules in the above processes and the structure diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution sequence of the steps is not fixed and can be adjusted as required. The division of the modules is merely for convenience of description and the division of functions adopted in the embodiments, and in actual implementation, one module may be implemented by a plurality of modules, and functions of a plurality of modules may be implemented by the same module, and the modules may be located in the same device or different devices.
The hardware modules in the various embodiments may be implemented mechanically or electronically. For example, a hardware module may include specially designed permanent circuits or logic devices (e.g., special purpose processors such as FPGAs or ASICs) for performing certain operations. A hardware module may also include programmable logic devices or circuits (e.g., including a general purpose processor or other programmable processor) temporarily configured by software for performing particular operations. As regards implementation of the hardware modules in a mechanical manner, either by dedicated permanent circuits or by circuits that are temporarily configured (e.g. by software), this may be determined by cost and time considerations.
The present invention also provides a machine-readable storage medium storing instructions for causing a machine to perform a method as described herein. Specifically, a system or apparatus provided with a storage medium on which a software program code realizing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or apparatus may be caused to read out and execute the program code stored in the storage medium. Further, some or all of the actual operations may be performed by an operating system or the like operating on a computer based on instructions of the program code. The program code read out from the storage medium may also be written into a memory provided in an expansion board inserted into a computer or into a memory provided in an expansion unit connected to the computer, and then, based on instructions of the program code, a CPU or the like mounted on the expansion board or the expansion unit may be caused to perform part or all of actual operations, thereby realizing the functions of any of the above embodiments. Storage medium implementations for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (e.g., CD-ROMs, CD-R, CD-RWs, DVD-ROMs, DVD-RAMs, DVD-RWs, DVD+RWs), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or cloud by a communications network.
The foregoing is merely a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

  1. A method (100) of correcting an image of a nameplate, the method (100) comprising:
    converting a nameplate image containing a nameplate into a grayscale image (101);
    performing edge detection on the grayscale image to determine an edge (102) of the nameplate;
    determining a perspective transformation matrix (103) based on vertex coordinates of a quadrilateral surrounding the edge and vertex coordinates of a rectified image of the nameplate image;
    a rectified image (104) of the nameplate image is generated based on the perspective transformation matrix.
  2. The method (100) of correcting a nameplate image of claim 1, further comprising, between converting a nameplate image containing a nameplate to a grayscale image (101) and performing edge detection on the grayscale image to determine an edge (102) of the nameplate:
    increasing the contrast of the gray scale image;
    and performing noise reduction processing on the gray level image with increased contrast.
  3. The method (100) of correcting a nameplate image of claim 1, wherein the generating a corrected image (104) of the nameplate image based on the perspective transformation matrix includes:
    determining coordinates of each pixel point in the quadrangle;
    determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix;
    each pixel is copied to a respective transformed coordinate to generate the rectified image.
  4. The method (100) of correcting a nameplate image of claim 1, wherein the generating a corrected image (104) of the nameplate image based on the perspective transformation matrix includes:
    determining coordinates of each pixel point in the nameplate image;
    determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix;
    separating the nameplate image into an R channel, a G channel and a B channel;
    determining a corrected R channel generated by copying each pixel point in the R channel to a respective post-conversion coordinate, a corrected G channel generated by copying each pixel point in the G channel to a respective post-conversion coordinate, and a corrected B channel generated by copying each pixel point in the B channel to a respective post-conversion coordinate;
    and combining the corrected R channel, the corrected G channel and the corrected B channel into the corrected image.
  5. The method (100) of correcting a nameplate image of any of claims 1-4,
    of the set of quadrilaterals surrounding the edge, the quadrilaterals have the shortest perimeter.
  6. A correction device (500) for an image of a nameplate, the device (500) comprising:
    a gray conversion module (501) for converting a nameplate image containing a nameplate into a gray image;
    an edge detection module (503) for performing edge detection on the grayscale image to determine an edge of the nameplate;
    a matrix determination module (504) for determining a perspective transformation matrix based on vertex coordinates of a quadrilateral surrounding the edge and vertex coordinates of a rectified image of the nameplate image;
    a correction module (505) for generating a corrected image of the nameplate image based on the perspective transformation matrix.
  7. The device (500) for correcting an image of a nameplate of claim 6, further including, between the grayscale conversion module (501) and the edge detection module (503):
    a preprocessing module (502) for increasing the contrast of the gray scale image; and performing noise reduction processing on the gray level image with increased contrast.
  8. The name plate image correction device (500) of claim 6,
    a correction module (505) for determining coordinates of each pixel point in the quadrilateral; determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix; each pixel is copied to a respective transformed coordinate to generate the rectified image.
  9. The name plate image correction device (500) of claim 6,
    a correction module (505) for determining coordinates of each pixel point in the nameplate image; determining transformed coordinates of the coordinates of each pixel point based on a product of the coordinates of each pixel point and the perspective transformation matrix; separating the nameplate image into an R channel, a G channel and a B channel; determining a corrected R channel generated by copying each pixel point in the R channel to a respective post-conversion coordinate, a corrected G channel generated by copying each pixel point in the G channel to a respective post-conversion coordinate, and a corrected B channel generated by copying each pixel point in the B channel to a respective post-conversion coordinate; and combining the corrected R channel, the corrected G channel and the corrected B channel into the corrected image.
  10. The correction device (500) for a nameplate image of any of claims 6-9, wherein the perimeter of the quadrilateral is the shortest in a set of quadrilaterals surrounding the edge.
  11. A correction device (600) for an image of a nameplate, comprising: a processor (601) and a memory (602);
    wherein the memory (602) has stored therein an application executable by the processor (601) for causing the processor (601) to perform the method (100) of correcting a nameplate image as claimed in any of claims 1 to 5.
  12. A computer readable storage medium having stored therein computer readable instructions for performing the method (100) of correcting a nameplate image of any of claims 1 to 5.
CN202080105177.1A 2020-09-18 2020-09-18 Nameplate image correction method, device and computer readable storage medium Pending CN116194963A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/116310 WO2022056872A1 (en) 2020-09-18 2020-09-18 Method and device for correcting nameplate image, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN116194963A true CN116194963A (en) 2023-05-30

Family

ID=80777407

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080105177.1A Pending CN116194963A (en) 2020-09-18 2020-09-18 Nameplate image correction method, device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN116194963A (en)
WO (1) WO2022056872A1 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2135240A1 (en) * 1993-12-01 1995-06-02 James F. Frazier Automated license plate locator and reader
CN106203433A (en) * 2016-07-13 2016-12-07 西安电子科技大学 In a kind of vehicle monitoring image, car plate position automatically extracts and the method for perspective correction
CN110414309A (en) * 2019-05-27 2019-11-05 上海眼控科技股份有限公司 A kind of automatic identifying method of vehicle nameplate

Also Published As

Publication number Publication date
WO2022056872A1 (en) 2022-03-24

Similar Documents

Publication Publication Date Title
US8494297B2 (en) Automatic detection and mapping of symmetries in an image
US20060262960A1 (en) Method and device for tracking objects in a sequence of images
US20070058850A1 (en) Method for automatic construction of 2d statistical shape model for the lung regions
CN108230376B (en) Remote sensing image processing method and device and electronic equipment
Urban et al. Finding a good feature detector-descriptor combination for the 2D keypoint-based registration of TLS point clouds
JP6188052B2 (en) Information system and server
CN110263778A (en) A kind of meter register method and device based on image recognition
CN109977910B (en) Rapid bill positioning method and system based on color line segments
CN109977959B (en) Train ticket character area segmentation method and device
EP2536123A1 (en) Image processing method and image processing apparatus
CN110827189A (en) Method and system for removing watermark of digital image or video
JPH05181411A (en) Map information collation and update system
JPH10149449A (en) Picture division method, picture identification method, picture division device and picture identification device
CN116134481A (en) Nameplate image segmentation method, nameplate image segmentation device and computer readable storage medium
CN109840951A (en) The method and device of augmented reality is carried out for plane map
CN109635679B (en) Real-time target paper positioning and loop line identification method
CN116194963A (en) Nameplate image correction method, device and computer readable storage medium
WO2022056873A1 (en) Method and apparatus for updating transformer attribute information, and computer-readable storage medium
Zhang et al. A combined approach to single-camera-based lane detection in driverless navigation
WO2022056876A1 (en) Method and apparatus for recognizing electric motor nameplate, and computer-readable storage medium
CN114359147A (en) Crack detection method, crack detection device, server and storage medium
CN110310223B (en) Fusion method of ultraviolet light and visible light image
CN111898402A (en) Intelligent typesetting system
Dong et al. Damage recognition of road auxiliary facilities based on deep convolution network for segmentation and image region correction
CN114092695B (en) ROI extraction method and device based on segmentation model

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