CN116977308A - Quality detection method and device for meter image and storage medium - Google Patents

Quality detection method and device for meter image and storage medium Download PDF

Info

Publication number
CN116977308A
CN116977308A CN202310953805.7A CN202310953805A CN116977308A CN 116977308 A CN116977308 A CN 116977308A CN 202310953805 A CN202310953805 A CN 202310953805A CN 116977308 A CN116977308 A CN 116977308A
Authority
CN
China
Prior art keywords
image
meter image
meter
original
detected
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
CN202310953805.7A
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.)
China Southern Power Grid Co Ltd
Original Assignee
China Southern Power Grid 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 China Southern Power Grid Co Ltd filed Critical China Southern Power Grid Co Ltd
Priority to CN202310953805.7A priority Critical patent/CN116977308A/en
Publication of CN116977308A publication Critical patent/CN116977308A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a quality detection method and device for a meter image and a storage medium. The method comprises the following steps: acquiring an original meter image, determining a meter image to be detected based on the original meter image, and determining original coding features corresponding to the meter image to be detected; acquiring reference coding features corresponding to a plurality of reference images, and determining target coding features corresponding to the meter images to be detected based on the plurality of reference coding features; performing image reconstruction based on the target coding features to obtain a reconstructed meter image; and determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected. The method solves the problem of lower reliability of the quality detection result of the meter image, and achieves the beneficial effect of improving the reliability and accuracy of the quality detection result of the meter image.

Description

Quality detection method and device for meter image and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and apparatus for detecting quality of a meter image, and a storage medium.
Background
In an industrial digital construction scene, a camera is required to be installed to shoot video images of related meters, and then an algorithm is adopted to automatically identify and read data of the meters.
In an actual scene, the quality of a shot meter image is poor due to reasons such as meter damage, uneven shot illumination, camera shake and the like, so that the reliability of an algorithm automatic identification result is low.
Disclosure of Invention
The invention provides a quality detection method, a quality detection device and a storage medium for a meter image, which are used for solving the problem of low reliability of a recognition result caused by the fact that a low-quality meter image enters a recognition link.
According to an aspect of the present invention, there is provided a quality detection method of a gauge image, the quality detection method of the gauge image including:
acquiring an original meter image, determining a meter image to be detected based on the original meter image, and determining original coding features corresponding to the meter image to be detected;
acquiring reference coding features corresponding to a plurality of reference images, and determining target coding features corresponding to the meter images to be detected based on the plurality of reference coding features;
performing image reconstruction based on the target coding features to obtain a reconstructed meter image;
and determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected.
According to another aspect of the present invention, there is provided a quality detection apparatus of a gauge image, the quality detection apparatus of the gauge image including:
the image characteristic acquisition module is used for acquiring an original meter image, determining a meter image to be detected based on the original meter image, and determining original coding characteristics corresponding to the meter image to be detected;
the coding feature correction module is used for acquiring reference coding features corresponding to a plurality of reference images and determining target coding features corresponding to the meter images to be detected based on the plurality of reference coding features;
the meter image reconstruction module is used for reconstructing an image based on the target coding features to obtain a reconstructed meter image;
and the image quality determining module is used for determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the gauge image quality detection method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute the method for quality detection of gauge images according to any of the embodiments of the present invention.
According to the technical scheme, an original meter image is obtained, a meter image to be detected is determined based on the original meter image, and original coding features corresponding to the meter image to be detected are determined; accurately establishing the relation between the meter image to be detected and the original feature codes; then, acquiring reference coding features corresponding to a plurality of reference images, and determining target coding features corresponding to the meter images to be detected based on the plurality of reference coding features; accurately determining target coding features corresponding to the meter image to be detected in the reference coding features; performing image reconstruction based on the target coding features to obtain a reconstructed meter image; to obtain a high quality reconstructed meter image; and finally, determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected, solving the problem of lower reliability of the quality detection result of the meter image, and achieving the beneficial effects of improving the reliability and accuracy of the quality detection result of the meter image.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for quality detection of a meter image according to a first embodiment of the present invention;
FIG. 2a is a flowchart of a method for detecting quality of a meter image according to a second embodiment of the present invention;
FIG. 2b is a flowchart of an alternative example of a quality detection method for a meter image according to a second embodiment of the invention
Fig. 3 is a schematic structural diagram of a quality detection device for gauge images according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a method for detecting quality of a meter image according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a method for detecting quality of a meter image according to an embodiment of the present invention, where the method may be performed by a device for detecting quality of a meter image, and the device for detecting quality of a meter image may be implemented in hardware and/or software, and the device for detecting quality of a meter image may be configured in an electronic device. As shown in fig. 1, the method includes:
s110, acquiring an original meter image, determining a meter image to be detected based on the original meter image, and determining original coding features corresponding to the meter image to be detected.
The original meter image can be understood as an unprocessed meter image captured by the image capturing device. The meter image to be detected can be understood as a meter image to be subjected to image feature extraction. The original encoding features may be understood as information contained in the original gauge image.
Specifically, the captured meter image can be obtained through the fixed camera, and the obtained meter image is used as the meter image to be detected. The original coding features in the marker graph to be detected are extracted by an encoder.
Optionally, the determining the meter image to be detected based on the original meter image includes: performing image detection on the original meter image, and determining edge information of a target meter contained in the original meter image; and cutting the original meter image based on the edge information to obtain a meter image to be detected.
Image detection is understood to be image edge detection, among other things. The edge information may be understood as the outer contour information of the target gauge.
Specifically, the external contour edge information of the original meter and the target meter in the image is determined by performing image detection and preset image processing operations on the original meter image. The preset image processing operation comprises at least one of image sharpening, image smoothing, image filtering and image denoising. And cutting the background image outside the edge based on the acquired edge information of the target meter, thereby obtaining the meter image to be detected containing the target meter.
Optionally, determining a target reserved area in the original meter image based on the edge information, and cutting off an image area outside the target reserved area, so as to obtain the meter image. The target reservation area includes edge information, that is, the target meter is located in the target reservation area. The target reserve area may be an area determined by a circumscribed rectangle corresponding to edge information of the target meter, for example. The target retention area includes a circumscribed rectangle. In the embodiment of the invention, the redundant background image is cut by detecting the edge information of the original meter to obtain the meter image to be detected which only comprises the target meter, so that the subsequent detection of the image is facilitated, and the accuracy of meter image detection and the reliability of detection results are improved.
S120, acquiring reference coding features corresponding to a plurality of reference images, and determining target coding features corresponding to the meter images to be detected based on the plurality of reference coding features.
The reference image is understood to be a standard gauge image as a reference. Reference to coding features may be understood as standard coding features.
Specifically, standard coding features corresponding to a standard meter image with a plurality of standards as references are acquired. And searching standard coding features corresponding to the meter image to be detected in the plurality of standard coding features based on the plurality of standard coding features, and taking the standard coding features corresponding to the meter image to be detected as target coding features.
Optionally, the determining, based on the plurality of reference coding features, a target coding feature corresponding to the meter image to be detected includes: calculating the similarity of the original coding feature and the reference coding feature aiming at each reference coding feature, and weighting the reference coding feature corresponding to the similarity by taking the similarity as a weight; and carrying out summation operation on the plurality of weighted reference coding features to obtain target coding features corresponding to the meter images to be detected.
Specifically, for each reference coding feature, calculating the similarity between the original coding feature and the reference coding feature one by one. And taking the obtained similarity as weight, carrying out weighted summation operation on each reference coding feature, and taking the obtained result as a target coding feature corresponding to the to-be-detected meter image. Illustratively, the similarity may employ cosine similarity.
In the present embodiment, the original encoding feature f and the reference encoding feature { f } are calculated one by one i Each reference code feature f in } i Similarity a of (a) i . Similarity a i As a weight, to f i The weighted summation results in a corrected target coding feature f'. The specific formula is as follows:
f′=a 1 f 1 +a 2 f 2 +…+a n f n
wherein f' is the target coding feature, a i Is the similarity. f (f) i Is a reference encoding feature.
S130, performing image reconstruction based on the target coding features to obtain a reconstructed meter image.
Wherein reconstructing the gauge image may be understood as a characteristic reconstructed image.
Specifically, image reconstruction is performed based on corrected target coding features corresponding to the meter image to be detected, and a high-quality reconstructed meter image corresponding to the meter image to be detected is obtained. In the embodiment of the invention, the accuracy of the subsequent determination of the quality of the original meter image is improved by reconstructing the high-quality reconstructed meter image.
And S140, determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected.
Wherein the image quality includes a high quality image and a low quality image.
Specifically, determining a quality score corresponding to the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected, if the quality score is higher, indicating that the meter image of the original meter image is clearly distinguishable and the meter position of the original meter image is not damaged, and corresponding to a high-quality image; otherwise, if the quality score is lower, the image with damage, uneven illumination, blurring and other conditions at the position of the meter in the original meter image is indicated to be low-score, and the low-quality image is corresponding to the image. The quality score corresponding to the image quality of the original gauge image may preset a scoring rule and scoring content (e.g., definition of the gauge image, whether there is a breakage in the gauge position, and brightness of the image) according to experience, which is not limited in this embodiment.
Optionally, after determining the image quality of the original meter image, screening out the meter image determined to be low-quality, and deleting the low-quality meter image, so as to avoid image recognition of the low-quality image and reduce the accuracy of image recognition. And storing and transmitting the meter position and/or the camera position corresponding to the low-quality meter image to a worker, so that the worker can timely confirm whether the meter is damaged and/or whether the camera lens has stains or not based on the meter position and/or the camera position, and the worker can timely repair the meter. If the high-quality meter images corresponding to the same meter comprise more than one high-quality meter image, randomly selecting one high-quality meter image for image recognition, or recognizing all the high-quality meter images corresponding to the meter, or manually selecting a preset number of high-quality meter images for image recognition, wherein the embodiment is not limited.
In the embodiment of the invention, the original meter image with low quality is deleted by determining the image quality of the original meter image, so that the accuracy of the identification of the subsequent meter image is improved.
According to the technical scheme, an original meter image is obtained, a meter image to be detected is determined based on the original meter image, and original coding features corresponding to the meter image to be detected are determined; accurately establishing the relation between the meter image to be detected and the original feature codes; then, acquiring reference coding features corresponding to a plurality of reference images, and determining target coding features corresponding to the meter images to be detected based on the plurality of reference coding features; accurately determining target coding features corresponding to the meter image to be detected in the reference coding features; performing image reconstruction based on the target coding features to obtain a reconstructed meter image; to obtain a high quality reconstructed meter image; and finally, determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected, solving the problem of lower reliability of the quality detection result of the meter image, and achieving the beneficial effects of improving the reliability and accuracy of the quality detection result of the meter image.
Example two
Fig. 2a is a flowchart of a quality detection method for a meter image according to a second embodiment of the present invention, where the embodiment is further refinement of how the relationship between the above embodiments determines the original coding feature corresponding to the meter image to be detected, and optionally, the determining the original coding feature corresponding to the meter image to be detected includes:
and extracting the characteristics of the meter image to be detected by a characteristic encoder in the self-encoder trained in advance to obtain the original coding characteristics corresponding to the meter image to be detected.
As shown in fig. 2a, the method comprises:
s210, acquiring an original meter image, determining a meter image to be detected based on the original meter image, and extracting features of the meter image to be detected through a feature encoder in a pre-trained self-encoder to obtain original coding features corresponding to the meter image to be detected.
Specifically, the feature encoder is used for extracting original coding features from the meter image to be detected. Illustratively, the meter image to be detected is I, which is transformed by the Encoder into the original encoded feature f, formulated as follows:
f=Encoder(I)
where f is the original encoding feature. I is the meter image to be detected.
S220, acquiring reference coding features corresponding to a plurality of reference images, and determining target coding features corresponding to the meter images to be detected based on the plurality of reference coding features.
Optionally, the acquiring the reference coding features corresponding to the plurality of reference images includes: inputting a plurality of reference images into a feature encoder in a pre-trained self-encoder to respectively obtain reference coding features corresponding to each reference image, wherein the reference images are images with predetermined image quality meeting the preset quality conditions for screening high-quality images.
The preset quality condition of the high-quality image may be preset empirically, and the present embodiment does not limit the same. Specifically, a plurality of images meeting the preset quality conditions for screening high-quality images are used as reference images and sequentially input into a feature encoder in a pre-trained self-encoder to obtain the corresponding reference coding features of the images meeting the preset quality conditions for screening the high-quality images.
And S230, performing image reconstruction based on the target coding features to obtain a reconstructed meter image.
Optionally, the performing image reconstruction based on the target coding feature to obtain a reconstructed meter image includes: and inputting the target coding features into a feature decoder in the self-encoder to reconstruct images to obtain reconstructed meter images.
Wherein the feature decoder is for reconstructing an image based on the target encoding features.
Illustratively, the Decoder performs image reconstruction based on the target encoding feature f 'to obtain a reconstructed meter image I'. The reconstructed image is an image that is both close to the original image and close to the high quality sample.
Optionally, the method further comprises: acquiring a sample meter image and a pre-constructed self-encoder, wherein the self-encoder comprises a characteristic encoder and a characteristic decoder; inputting the sample meter image into the feature encoder to obtain sample image features; inputting even sample image features into the feature decoder for image reconstruction to obtain a model reconstruction image; model parameters of the feature encoder and the feature decoder are adjusted based on image errors between the sample gauge image and the model reconstructed image to obtain a pre-trained self-encoder.
Specifically, the self-encoder is trained using high quality images. Wherein the network structure of the self-encoder comprises two parts: a feature Encoder, an image Decoder. The feature encoder mainly extracts features from the image, and the feature decoder mainly reconstructs the image according to the features. The parameters of the feature encoder and the feature decoder may be optimized from the encoder by minimizing the mean square error between the input image and the reconstructed image. For example, the input image is x, the Encoder transforms the input image x into a feature f, i.e., f=encoder (x), and the Decoder reconstructs the image x from the feature f, resulting in x ', i.e., x' =encoder (f) =encoder (x)).
Optionally, the image error e is the original input image x and the duplicateMean square error e= ii x-x' ii between the building images x L2 . Selecting a preset number of high-quality meter image samples { I } i I=1, 2, respectively inputting the characteristic self-Encoder, obtaining corresponding sample image characteristics after passing through the characteristic Encoder of the self-Encoder, and forming a reference coding characteristic { f) based on the sample image characteristics i }。f i =Encoder(I i ) I=1, 2,..n. And inputting even sample image features into the feature decoder to perform image reconstruction, so as to obtain a model reconstruction image.
Further, calculating an image error e between the sample meter image and the model reconstruction image, if the image error e is larger than a preset error interval, adjusting the image error to be within the preset error interval or to the maximum limit value of the preset error interval, adjusting model parameters of the feature encoder and the feature decoder based on the image error e, and taking the adjusted self-encoder as an applied self-encoder.
S240, determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected.
Optionally, the determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected includes:
and determining an image error between the reconstructed meter image and the meter image to be detected, and determining the image quality of the original meter image based on the image error.
Specifically, the error E between the meter image I to be detected and the reconstructed meter image I' is calculated by the following formula:
E=‖I-I′‖ Li2
wherein E is the image error. I is the meter image to be detected. I' is a reconstructed meter image. The larger the image error E, the poorer the image quality of the original gauge image I is considered. The smaller the image error E, the better the image quality of the original gauge image I is considered.
Optionally, the image quality of the original gauge image is determined based on a relationship of the image error to a preset image error threshold. For example, if the image error is less than the preset image error threshold, determining that the image quality of the original gauge image is a high quality image; otherwise, if the image error is greater than the preset image error threshold, determining that the image quality of the original meter image is a low-quality image. The preset image error threshold may be preset empirically, which is not limited in this embodiment.
According to the technical scheme, the feature extraction is carried out on the meter image to be detected through the feature encoder in the pre-trained self-encoder, so that original coding features corresponding to the meter image to be detected are obtained; accurately obtaining original coding features in the meter image to be detected, and then inputting the target coding features into a feature decoder in the self-encoder for image reconstruction to obtain a reconstructed meter image; performing image reconstruction based on the target coding features to obtain a reconstructed meter image; to obtain a high quality reconstructed meter image; the method is convenient for the follow-up accurate determination of the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected, solves the problem of lower reliability of the quality detection result of the meter image, and achieves the beneficial effects of improving the reliability and accuracy of the quality detection result of the meter image.
Fig. 2b provides a flowchart of an alternative example of a quality detection method for a meter image. As shown in fig. 2b, the quality detection method of the gauge image specifically includes the following steps:
(1) Model training
The self-encoder is trained with high quality images. Wherein, the network structure of the self-encoder comprises two parts: a feature Encoder, a feature Decoder. The feature encoder mainly extracts features from the image, and the feature decoder mainly reconstructs the image according to the features. The parameters of the feature encoder and the feature decoder may be optimized from the encoder by minimizing the mean square error between the input image and the reconstructed image. For example, the input image is x, the feature Encoder transforms the input image x into a feature f, i.e., f=encoder (x), and the feature Decoder reconstructs the image x from the feature f, in effectTo x ', i.e., x' =decoder (f) =decoder (Encoder (x)). The image error e is the mean square error e= iix-x 'iibetween the original input image x and the reconstructed image x' L2 . The training objective is to minimize e.
(2) Reference coding feature construction
Selecting a preset number of high-quality meter image samples { I } i I=1, 2,., N are respectively input to the feature self-Encoder, and the corresponding features are obtained after passing through the feature Encoder of the self-Encoder:
f i =Encoder(I i ) I=1, 2,..n, constitutes the reference coding feature { f i }。
(3) Image quality assessment
1) When inputting a meter image I to be detected, the feature Encoder Encoder transforms the meter image I to be detected into an original encoded feature f, expressed as follows:
f=Encoder(I)
where f is the original encoding feature. I is the meter image to be detected.
Then f and { f are calculated one by one i Each f in } i Similarity a of (a) i
2) The obtained similarity { a } i As a weight, pair { f i Weighted summation to obtain corrected features:
f′=a 1 f 1 +a 2 f 2 +…+a n f n
3) The corrected target coding feature f ' is input into a feature Decoder, and the reconstructed target coding feature f ' is a reconstructed meter image I ' which is close to the original image and close to high quality.
4) Calculating an image error E between the reconstructed meter image I 'and the meter image I to be detected, specifically, calculating an error E between the meter image I to be detected and the reconstructed meter image I', wherein the error E can be calculated by the following formula:
E=‖I-I′‖ L2
wherein E is the image error. I is the meter image to be detected. I' is a reconstructed meter image. The larger the image error E, the poorer the image quality of the original gauge image I is considered. The smaller the image error E, the better the image quality of the original gauge image I is considered.
According to the technical scheme, the feature encoder in the pre-trained self-encoder is used for extracting the features of the meter image to be detected, the meter image is reconstructed based on the corrected target coding features, and the problem that the reliability of the quality detection result of the meter image is low is solved based on the error between the meter image to be detected and the reconstructed meter image, so that the beneficial effects of improving the reliability and accuracy of the quality detection result of the meter image are achieved.
Example III
Fig. 3 is a schematic structural diagram of a gauge image quality detecting device according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: an image feature acquisition module 310, an encoding feature correction module 320, a gauge image reconstruction module 330, and an image quality determination module 340.
The image feature acquiring module 310 is configured to acquire an original meter image, determine a meter image to be detected based on the original meter image, and determine an original coding feature corresponding to the meter image to be detected; the coding feature correction module 320 is configured to obtain reference coding features corresponding to a plurality of reference images, and determine target coding features corresponding to the meter image to be detected based on the plurality of reference coding features; a gauge image reconstruction module 330, configured to reconstruct an image based on the target coding feature, to obtain a reconstructed gauge image; an image quality determination module 340 for determining an image quality of the original gauge image based on the reconstructed gauge image and the gauge image to be detected.
According to the technical scheme, an original meter image is acquired through an image characteristic acquisition module, a meter image to be detected is determined based on the original meter image, and original coding characteristics corresponding to the meter image to be detected are determined; accurately establishing the relation between the meter image to be detected and the original feature codes; then, a coding feature correction module is used for obtaining reference coding features corresponding to a plurality of reference images, and determining target coding features corresponding to the meter images to be detected based on the plurality of reference coding features; accurately determining target coding features corresponding to the meter image to be detected in the reference coding features; then, through a meter image reconstruction module, performing image reconstruction based on the target coding features to obtain a reconstructed meter image; to obtain a high quality reconstructed meter image; and finally, determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected through an image quality determining module, solving the problem of lower reliability of a quality detection result of the meter image, and achieving the beneficial effects of improving the reliability and the accuracy of the quality detection result of the meter image.
Optionally, the image feature acquisition module is configured to:
and extracting the characteristics of the meter image to be detected by a characteristic encoder in the self-encoder trained in advance to obtain the original coding characteristics corresponding to the meter image to be detected.
Optionally, the gauge image reconstruction module is configured to:
and inputting the target coding features into a feature decoder in the self-encoder to reconstruct images to obtain reconstructed meter images.
Optionally, the apparatus further includes:
the image and encoder acquisition module is used for acquiring the sample meter image and a pre-constructed self-encoder, wherein the self-encoder comprises a characteristic encoder and a characteristic decoder;
the sample image characteristic acquisition module is used for inputting the sample meter image into the characteristic encoder to obtain sample image characteristics;
the model reconstruction image acquisition module is used for inputting even sample image features into the feature decoder to carry out image reconstruction so as to obtain a model reconstruction image;
and the self-encoder acquisition module is used for adjusting model parameters of the feature encoder and the feature decoder based on image errors between the sample meter image and the model reconstruction image so as to obtain a pre-trained self-encoder.
Optionally, the encoding feature correction module is configured to:
inputting a plurality of reference images into a feature encoder in a pre-trained self-encoder to respectively obtain reference coding features corresponding to each reference image, wherein the reference images are images with predetermined image quality meeting the preset quality conditions for screening high-quality images.
Optionally, the coding feature correction module includes:
the weighting processing unit is used for calculating the similarity between the original coding feature and the reference coding feature according to each reference coding feature, and weighting the reference coding feature corresponding to the similarity by taking the similarity as a weight;
and the characteristic calculation unit is used for carrying out summation operation on the plurality of weighted reference coding characteristics to obtain target coding characteristics corresponding to the meter image to be detected.
Optionally, the image quality determining module is configured to:
and determining an image error between the reconstructed meter image and the meter image to be detected, and determining the image quality of the original meter image based on the image error.
Optionally, the image feature acquisition module includes:
the edge information determining unit is used for performing image detection on the original meter image and determining edge information of a target meter contained in the original meter image;
and the to-be-detected meter image acquisition unit is used for cutting the original meter image based on the edge information to obtain the to-be-detected meter image.
The quality detection device for the meter image provided by the embodiment of the invention can execute the quality detection method for the meter image provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as quality detection of the methodological gauge image.
In some embodiments, the quality detection of the method meter image may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the above-described method meter image quality detection may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform quality detection of the recipe meter image by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for quality detection of a gauge image, comprising:
acquiring an original meter image, determining a meter image to be detected based on the original meter image, and determining original coding features corresponding to the meter image to be detected;
acquiring reference coding features corresponding to a plurality of reference images, and determining target coding features corresponding to the meter images to be detected based on the plurality of reference coding features;
performing image reconstruction based on the target coding features to obtain a reconstructed meter image;
and determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected.
2. The method of claim 1, wherein the determining the original coded features corresponding to the meter image to be detected comprises:
and extracting the characteristics of the meter image to be detected by a characteristic encoder in the self-encoder trained in advance to obtain the original coding characteristics corresponding to the meter image to be detected.
3. The method of claim 2, wherein reconstructing the image based on the target encoding features results in a reconstructed meter image, comprising:
and inputting the target coding features into a feature decoder in the self-encoder to reconstruct images to obtain reconstructed meter images.
4. A method according to claim 3, further comprising:
acquiring a sample meter image and a pre-constructed self-encoder, wherein the self-encoder comprises a characteristic encoder and a characteristic decoder;
inputting the sample meter image into the feature encoder to obtain sample image features;
inputting even sample image features into the feature decoder for image reconstruction to obtain a model reconstruction image;
model parameters of the feature encoder and the feature decoder are adjusted based on image errors between the sample gauge image and the model reconstructed image to obtain a pre-trained self-encoder.
5. The method of claim 2, wherein the obtaining reference encoded features corresponding to the plurality of reference pictures comprises:
inputting a plurality of reference images into a feature encoder in a pre-trained self-encoder to respectively obtain reference coding features corresponding to each reference image, wherein the reference images are images with predetermined image quality meeting the preset quality conditions for screening high-quality images.
6. The method of claim 1, wherein the determining target encoding features corresponding to the meter image to be detected based on a plurality of the reference encoding features comprises:
calculating the similarity of the original coding feature and the reference coding feature aiming at each reference coding feature, and weighting the reference coding feature corresponding to the similarity by taking the similarity as a weight;
and carrying out summation operation on the plurality of weighted reference coding features to obtain target coding features corresponding to the meter images to be detected.
7. The method of claim 1, wherein the determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected comprises:
and determining an image error between the reconstructed meter image and the meter image to be detected, and determining the image quality of the original meter image based on the image error.
8. The method of claim 1, wherein the determining a meter image to be detected based on the original meter image comprises:
performing image detection on the original meter image, and determining edge information of a target meter contained in the original meter image;
and cutting the original meter image based on the edge information to obtain a meter image to be detected.
9. A gauge image quality detection apparatus comprising:
the image characteristic acquisition module is used for acquiring an original meter image, determining a meter image to be detected based on the original meter image, and determining original coding characteristics corresponding to the meter image to be detected;
the coding feature correction module is used for acquiring reference coding features corresponding to a plurality of reference images and determining target coding features corresponding to the meter images to be detected based on the plurality of reference coding features;
the meter image reconstruction module is used for reconstructing an image based on the target coding features to obtain a reconstructed meter image;
and the image quality determining module is used for determining the image quality of the original meter image based on the reconstructed meter image and the meter image to be detected.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the method of quality detection of gauge images of any of claims 1-7.
CN202310953805.7A 2023-07-31 2023-07-31 Quality detection method and device for meter image and storage medium Pending CN116977308A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310953805.7A CN116977308A (en) 2023-07-31 2023-07-31 Quality detection method and device for meter image and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310953805.7A CN116977308A (en) 2023-07-31 2023-07-31 Quality detection method and device for meter image and storage medium

Publications (1)

Publication Number Publication Date
CN116977308A true CN116977308A (en) 2023-10-31

Family

ID=88479239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310953805.7A Pending CN116977308A (en) 2023-07-31 2023-07-31 Quality detection method and device for meter image and storage medium

Country Status (1)

Country Link
CN (1) CN116977308A (en)

Similar Documents

Publication Publication Date Title
CN112633384B (en) Object recognition method and device based on image recognition model and electronic equipment
CN111275040B (en) Positioning method and device, electronic equipment and computer readable storage medium
CN108318773B (en) Transmission conductor strand breakage detection method and system
CN115471476A (en) Method, device, equipment and medium for detecting component defects
CN114549904B (en) Visual processing and model training method, device, storage medium and program product
CN116596854A (en) Equipment defect identification method, device, equipment and medium
CN116952958A (en) Defect detection method, device, electronic equipment and storage medium
CN116703925B (en) Bearing defect detection method and device, electronic equipment and storage medium
CN117611483A (en) Image acquisition method, device, equipment and storage medium
CN117333443A (en) Defect detection method and device, electronic equipment and storage medium
CN114724144B (en) Text recognition method, training device, training equipment and training medium for model
CN115482248B (en) Image segmentation method, device, electronic equipment and storage medium
CN116761020A (en) Video processing method, device, equipment and medium
CN116977308A (en) Quality detection method and device for meter image and storage medium
CN116012859A (en) Text image rejection judgment method, device and equipment based on definition index
CN116363444A (en) Fuzzy classification model training method, fuzzy image recognition method and device
CN113628192A (en) Image blur detection method, device, apparatus, storage medium, and program product
Zhang et al. Estimation algorithm of atmospheric light based on ant colony optimization
CN116260973B (en) Time domain filtering method and device, electronic equipment and storage medium
CN117275006A (en) Image processing method and device, electronic equipment and storage medium
CN117746069B (en) Graph searching model training method and graph searching method
CN115361584B (en) Video data processing method and device, electronic equipment and readable storage medium
CN114501026B (en) Video coding method, device, equipment and storage medium
CN117725614A (en) License plate desensitizing method and device, electronic equipment and storage medium
CN117994297A (en) Image registration method, device, electronic equipment and storage medium

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