CN115147625A - Ammeter box image contrast model based on perspective transformation and local affine matching algorithm - Google Patents

Ammeter box image contrast model based on perspective transformation and local affine matching algorithm Download PDF

Info

Publication number
CN115147625A
CN115147625A CN202210766309.6A CN202210766309A CN115147625A CN 115147625 A CN115147625 A CN 115147625A CN 202210766309 A CN202210766309 A CN 202210766309A CN 115147625 A CN115147625 A CN 115147625A
Authority
CN
China
Prior art keywords
image
perspective transformation
matching algorithm
local affine
transformation
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
CN202210766309.6A
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.)
State Grid Shanghai Electric Power Co Ltd
Original Assignee
State Grid Shanghai Electric Power 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 State Grid Shanghai Electric Power Co Ltd filed Critical State Grid Shanghai Electric Power Co Ltd
Priority to CN202210766309.6A priority Critical patent/CN115147625A/en
Publication of CN115147625A publication Critical patent/CN115147625A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/247Aligning, centring, orientation detection or correction of the image by affine transforms, e.g. correction due to perspective effects; Quadrilaterals, e.g. trapezoids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/757Matching configurations of points or features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an electricity meter box image comparison model based on perspective transformation and a local affine matching algorithm, which comprises the following steps of: step 1, shooting and obtaining an original image; step 2, extracting components in the surface box photo by using a yolo target detection algorithm in machine learning; step 3, detecting the target in the selected range; step 4, performing perspective transformation on each extracted component, converting the picture view angle of the component into a positive view angle, removing regions which do not need to be matched, and finally calculating Euclidean distances among different SIFT feature points of the image processed in the step according to a self-adaptive local affine matching algorithm; and 5, obtaining a similarity contrast result between the images. According to the invention, through perspective transformation and a self-adaptive local affine algorithm, the factors influencing the contrast effect in the image are reduced to the minimum, and the contrast effect of the image is improved.

Description

Ammeter box image contrast model based on perspective transformation and local affine matching algorithm
Technical Field
The invention relates to an electric meter box image comparison model based on perspective transformation and local affine matching algorithm, which is used in the field of electric meter intelligent monitoring.
Background
With the development of national economy and the improvement of the living standard of people, the standardization and the intellectualization level of electric power facilities are improved. In order to guarantee the electric power facilities, the electric power department specially arranges a project team to regularly patrol the equipment, and the safe and stable operation of the electric power facilities is guaranteed. However, because the quantity of the electric power equipment is huge, especially in areas such as residential areas, the meter box is compared and judged by relying on a traditional manual method, a large amount of manpower and financial resources are consumed, and the unification of the inspection standards cannot be guaranteed. Therefore, with the help of the 5G technology, operation and maintenance personnel can shoot the on-site picture of the electric meter box through the mobile device and upload the picture to the cloud, the cloud compares the current inspection picture with the last uploaded historical picture, and whether the electric meter box is abnormal or not is judged. At present, image comparison technologies are started from the image overall situation, the focus of attention is the overall similarity, and accordingly attention comparison on local details is deficient.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides an electric meter box image comparison model based on perspective transformation and a local affine matching algorithm. And then, calculating SIFT feature points in the image by using a self-adaptive local affine matching algorithm, selecting two feature points with the minimum Euclidean distance between the feature points as matching feature point pairs, and finally obtaining the similarity between different parts through the calculation of the matching point pairs.
One technical scheme for achieving the above purpose is as follows: the electric meter box image contrast model based on perspective transformation and local affine matching algorithm comprises the following steps:
step 1, shooting and obtaining an original image;
step 2, extracting components in the surface box photo by using a yolo target detection algorithm in machine learning;
step 3, detecting the target in the selected range;
step 4, carrying out perspective transformation on each extracted component, converting the picture angle of the component into a positive angle, removing regions which do not need to be matched, and finally calculating Euclidean distances among different SIFT feature points of the image processed in the step according to a self-adaptive local affine matching algorithm;
and 5, obtaining a similarity contrast result between the images.
Furthermore, perspective transformation is utilized to correct the view angle of the electric meter box picture and eliminate irrelevant areas, the pictures are used as input of a subsequent matching algorithm, calculation and matching of feature points are conveniently carried out by the subsequent self-adaptive local affine matching algorithm, and the specific method comprises the following steps:
the correction of the distorted image by the perspective transformation needs to acquire the coordinates of a group of 4 reference points of the distorted image and the coordinates of a group of 4 reference points of the target image, and a transformation matrix of the perspective transformation is calculated through two groups of coordinate points, wherein a general transformation formula is as follows:
Figure BDA0003722283250000021
wherein u, v are pixel coordinates in the original image, the corresponding homogeneous coordinates are (u, v, w), the parameter w is 1, and the transformed image pixel coordinates are (x, y), wherein
Figure BDA0003722283250000022
Splitting the transformation matrix T into 4 parts, wherein the main function of the T1 of the upper left part is scaling and rotation; the effect of the upper right portion of T2 on the image is to produce a perspective translation; t3 of the lower left part is used for generating perspective transformation; the last part being a 33 Is 1;
Figure BDA0003722283250000023
after the transformation matrix is obtained, the transformed coordinate x and y expressions are calculated according to the following formula:
Figure BDA0003722283250000024
Figure BDA0003722283250000031
and finishing the image visual angle correction.
Furthermore, the calculated SIFT feature points are screened by using a self-adaptive local affine matching algorithm, and the node with the highest confidence coefficient is selected for matching, so that the matching precision between the electric meter photos is improved.
The ammeter box image comparison model based on the perspective transformation and the local affine matching algorithm has the advantages that ammeter images are extracted and subjected to perspective transformation according to components, useless or negative parts in the comparison process are filtered out, the visual angle of the images needing to be compared is converted into a positive visual angle, the images input into the comparison algorithm are more standard and finer, the operation amount of a subsequent self-adaptive local affine algorithm is reduced, and the self-adaptive local affine matching algorithm calculates the similarity between different components according to SIFT feature points of the input images. After perspective transformation and a self-adaptive local affine algorithm, factors influencing the contrast effect in the image are reduced to the minimum, and the contrast effect of the image is improved.
Drawings
FIG. 1 is a schematic flow chart of an electric meter box image comparison model based on perspective transformation and a local affine matching algorithm.
Detailed Description
In order to better understand the technical solution of the present invention, the following detailed description is made by specific examples:
referring to fig. 1, the electric meter box image comparison model based on perspective transformation and local affine matching algorithm of the present invention includes the following steps:
step 1, shooting and acquiring an original image.
And 2, extracting the components in the box photo by using a yolo target detection algorithm in machine learning. After an original picture is input into the model, the Yolo model is used as a target detection model, and a target object needing to be compared in the original picture is cut out.
And 3, detecting the target in the selected range.
And 4, carrying out perspective transformation on each extracted component, converting the picture angle of the component into a positive angle, removing regions which do not need to be matched, and finally calculating Euclidean distances among different SIFT feature points of the image processed in the step according to a self-adaptive local affine matching algorithm.
The perspective transformation is utilized to correct the view angle and eliminate irrelevant areas of the electric meter box photo as the input of a subsequent matching algorithm, so that the subsequent self-adaptive local affine matching algorithm can calculate and match the feature points conveniently, and the specific method comprises the following steps:
correction of the distorted image by the perspective transformation requires acquisition of the coordinates of a set of 4 fiducial points of the distorted image and a set of 4 fiducial point coordinates of the target image, and calculating a transformation matrix of perspective transformation through the two groups of coordinate points, wherein a general transformation formula is as follows:
Figure BDA0003722283250000041
wherein u, v are pixel coordinates in the original image, the corresponding homogeneous coordinates are (u, v, w), the parameter w is 1, and the transformed image pixel coordinates are (x, y), wherein
Figure BDA0003722283250000042
Splitting the transformation matrix T into 4 parts, wherein the main function of the T1 of the upper left part is scaling and rotation; the effect of the upper right portion of T2 on the image is to produce a perspective translation; t3 of the lower left part is used for generating perspective transformation; the last part being a 33 Is 1;
Figure BDA0003722283250000043
after the transformation matrix is obtained, the transformed coordinate x and y expressions are calculated according to the following formula:
Figure BDA0003722283250000044
Figure BDA0003722283250000045
thus, the image visual angle correction is completed.
After the view angle correction of the image is completed, a scale space needs to be constructed firstly to extract the SIFT feature points. The process of imaging an object on the retina when the object is far away from the object can be simulated by the blurring degree of the image, and the image is blurred when the image is larger in size as the image is closer to the object, which is a Gaussian scale space. Blurring the image (resolution invariant) by using different parameters is another representation of the scale space. The image can be blurred by convolution operation, and images with different blurring degrees can be obtained by using different 'Gaussian kernels', so that the Gaussian scale space construction of one image can be obtained by using different Gaussian convolutions. The scale space is constructed to detect feature points existing in different scale spaces. The operator that monitors the feature points is laplacian of gaussian (LoG), and although the laplacian of gaussian can detect all the feature points in the image well, the operation speed is too slow, and the laplacian of gaussian can be approximated by using Difference of gaussian (DoG). The difference gaussian calculation formula is as follows:
D(x,y,σ)=[G(x,y,kσ)-G(x,y,σ)]*I(x,y)
=L(x,y,kσ)-L(x,y,σ) (5)
after the Gaussian pyramid is constructed, the difference Gaussian pyramid can be obtained by cutting the two adjacent layers. And deleting unstable extreme points in the previous step, wherein the unstable extreme points are defined as two types: extreme points with low contrast and unstable edge response points. Thirdly, determining the main direction of the characteristic points: and calculating the argument and the amplitude of the gradient of each pixel point in the field taking the feature point as the center and the radius of 3 multiplied by 1.5 sigma, and then counting the argument of the gradient by using a histogram. Finally generating descriptors of the feature points: firstly, the direction of a characteristic point is rotated by a coordinate axis, the gradient magnitude and the direction of a pixel of a 16-by-16 window taking the characteristic point as a center divide the pixel in the window into 16 blocks, each block is histogram statistics of 8 directions in the pixel, and a 128-dimensional characteristic vector can be formed. And then, judging whether the pixel points are matched or not by calculating Euclidean distances among different feature points.
The self-adaptive local affine matching algorithm realizes screening from the calculated SIFT feature points, and selects the node with the highest confidence coefficient for matching. Firstly, according to the calculation of the Euclidean distance between different feature points, the two feature points with the minimum Euclidean distance can form and obtain initial matching, at the moment, each matching is assigned with score, and the higher the confidence coefficient is, the higher the corresponding score is. Secondly, an optimal suboptimal ratio (ratio-test) is set artificially, the optimal solution is a characteristic value with the minimum Euclidean distance from a target characteristic value, the suboptimal solution is a characteristic value with the second smallest Euclidean distance from the target characteristic value, if the ratio of the optimal solution to the suboptimal solution is larger than the artificially set optimal suboptimal ratio, the optimal matching is considered to be locally better matching, and meanwhile, the optimal suboptimal ratio is used as the current matching confidence. And finally, giving the similarity between the two images according to all the feature point matching pairs.
And 5, obtaining a similarity contrast result between the images. And connecting the matched pixel points in the original image and the contrast image by using a straight line. And calculating and counting gradient direction histogram constituent features of the local area of the image by using a directional gradient histogram feature calculation method, and calculating the Euclidean distance between the two features to obtain a similarity result.
It should be understood by those skilled in the art that the above embodiments are only for illustrating the present invention and are not to be used as a limitation of the present invention, and that the changes and modifications of the above embodiments are within the scope of the appended claims as long as they are within the true spirit of the present invention.

Claims (3)

1. The electric meter box image comparison model based on perspective transformation and local affine matching algorithm is characterized by comprising the following steps:
step 1, shooting and obtaining an original image;
step 2, extracting components in the surface box photo by using a yolo target detection algorithm in machine learning;
step 3, detecting the target in the selected range;
step 4, performing perspective transformation on each extracted component, converting the picture view angle of the component into a positive view angle, removing regions which do not need to be matched, and finally calculating Euclidean distances among different SIFT feature points of the image processed in the step according to a self-adaptive local affine matching algorithm;
and 5, obtaining a similarity contrast result between the images.
2. The ammeter box image contrast model based on perspective transformation and local affine matching algorithm as claimed in claim 1, wherein perspective transformation is utilized to correct the view angle of the ammeter box image and eliminate irrelevant areas, and the images are used as the input of the subsequent matching algorithm, so that the subsequent adaptive local affine matching algorithm can conveniently calculate and match feature points, and the specific method is as follows:
the correction of the distorted image by the perspective transformation needs to acquire the coordinates of a group of 4 reference points of the distorted image and the coordinates of a group of 4 reference points of the target image, and a transformation matrix of the perspective transformation is calculated through two groups of coordinate points, wherein a general transformation formula is as follows:
Figure FDA0003722283240000011
wherein u, v are pixel coordinates in the original image, the corresponding homogeneous coordinates are (u, v, w), the parameter w is 1, and the transformed image pixel coordinates are (x, y), wherein
Figure FDA0003722283240000012
Splitting the transformation matrix T into 4 parts, wherein the main function of the T1 of the upper left part is scaling and rotation; the effect of the upper right portion of T2 on the image is to produce a perspective translation; t3 of the lower left part is used for generating perspective transformation; the last part being a 33 Is 1;
Figure FDA0003722283240000013
after the transformation matrix is obtained, the transformed coordinate x and y expressions are calculated according to the following formula:
Figure FDA0003722283240000014
Figure FDA0003722283240000015
and finishing the image visual angle correction.
3. The ammeter box image contrast model based on perspective transformation and local affine matching algorithm as claimed in claim 1, wherein the calculated SIFT feature points are screened again by using the adaptive local affine matching algorithm, and the node with the highest confidence coefficient is selected for matching, so as to improve the matching accuracy between ammeter photos.
CN202210766309.6A 2022-06-30 2022-06-30 Ammeter box image contrast model based on perspective transformation and local affine matching algorithm Pending CN115147625A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210766309.6A CN115147625A (en) 2022-06-30 2022-06-30 Ammeter box image contrast model based on perspective transformation and local affine matching algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210766309.6A CN115147625A (en) 2022-06-30 2022-06-30 Ammeter box image contrast model based on perspective transformation and local affine matching algorithm

Publications (1)

Publication Number Publication Date
CN115147625A true CN115147625A (en) 2022-10-04

Family

ID=83410263

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210766309.6A Pending CN115147625A (en) 2022-06-30 2022-06-30 Ammeter box image contrast model based on perspective transformation and local affine matching algorithm

Country Status (1)

Country Link
CN (1) CN115147625A (en)

Similar Documents

Publication Publication Date Title
CN109086714B (en) Form recognition method, recognition system and computer device
CN106856002B (en) Unmanned aerial vehicle shooting image quality evaluation method
CN109410207A (en) A kind of unmanned plane line walking image transmission line faultlocating method based on NCC feature
CN110543878A (en) pointer instrument reading identification method based on neural network
CN109961398B (en) Fan blade image segmentation and grid optimization splicing method
CN114549981A (en) Intelligent inspection pointer type instrument recognition and reading method based on deep learning
CN112613097A (en) BIM rapid modeling method based on computer vision
CN113888461A (en) Method, system and equipment for detecting defects of hardware parts based on deep learning
CN113313107B (en) Intelligent detection and identification method for multiple types of diseases on cable surface of cable-stayed bridge
CN113657423A (en) Target detection method suitable for small-volume parts and stacked parts and application thereof
CN113971669A (en) Three-dimensional detection system applied to pipeline damage identification
CN112750104A (en) Method and device for automatically matching optimal camera by monitoring ship through multiple cameras
CN116228780A (en) Silicon wafer defect detection method and system based on computer vision
CN115841633A (en) Power tower and power line associated correction power tower and power line detection method
CN115222884A (en) Space object analysis and modeling optimization method based on artificial intelligence
CN115115950A (en) Unmanned aerial vehicle image duplicate checking method based on image histogram features
CN114612412A (en) Processing method of three-dimensional point cloud data, application of processing method, electronic device and storage medium
CN113052234A (en) Jade classification method based on image features and deep learning technology
CN116580419A (en) AI-based building model testing method
CN109544608B (en) Unmanned aerial vehicle image acquisition characteristic registration method
CN115147625A (en) Ammeter box image contrast model based on perspective transformation and local affine matching algorithm
CN113670268B (en) Binocular vision-based unmanned aerial vehicle and electric power tower distance measurement method
CN115953678A (en) Pavement damage detection method based on local gray extreme point and feature fusion
CN114648507A (en) Method for carrying out online detection on aggregate, readable storage medium and terminal equipment
CN112949641A (en) Image segmentation method, electronic device and computer-readable 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