CN114049568A - Object shape change detection method, device, equipment and medium based on image comparison - Google Patents

Object shape change detection method, device, equipment and medium based on image comparison Download PDF

Info

Publication number
CN114049568A
CN114049568A CN202111431132.6A CN202111431132A CN114049568A CN 114049568 A CN114049568 A CN 114049568A CN 202111431132 A CN202111431132 A CN 202111431132A CN 114049568 A CN114049568 A CN 114049568A
Authority
CN
China
Prior art keywords
image
optical
matrix
logarithmic difference
value
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
CN202111431132.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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202111431132.6A priority Critical patent/CN114049568A/en
Publication of CN114049568A publication Critical patent/CN114049568A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to an artificial intelligence technology, and discloses a target object deformation detection method based on image comparison, which comprises the following steps: acquiring an optical image and a reference image containing a preset target object, and performing normalization correction on the image scales of the optical image and the reference image; calculating a logarithmic difference image between the optical image and the reference image; carrying out non-down-sampling contourlet transformation on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image; performing binary classification on the multi-scale coefficient matrix, extracting a classification threshold value of the binary classification, and drawing an optical contour of the object in the optical image according to the classification threshold value; the optical contour and the standard contour of the object judge whether the object is deformed. In addition, the invention also relates to a block chain technology, and the optical image can be stored in the node of the block chain. The invention also provides a target object deformation detection device, equipment and medium based on image comparison. The invention can improve the accuracy of the deformation state identification of the targets based on remote sensing identification.

Description

Object shape change detection method, device, equipment and medium based on image comparison
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a target object deformation detection method and device based on image comparison, electronic equipment and a computer readable storage medium.
Background
In the insurance field, it is very labor-consuming to patrol the state change of a large-scale target (usually in engineering dangerous species) by business personnel alone, so the insurance field mainly monitors the target by remote sensing satellite images, for example, by comparing target images at different periods to judge whether the target is deformed or not.
The traditional remote sensing method is mainly based on the pixel difference method of two images to directly divide the change area, the principle of the methods is simple, but a large amount of noise points can be generated, and great interference is caused to change identification; in addition, most of the commonly used change area identification based on the remote sensing image is a change area identified by a difference image, a change boundary is divided according to experience, and visual interpretation is relied on, so that the accuracy of the existing deformation state identification of the target based on the remote sensing image is low.
Disclosure of Invention
The invention provides a method and a device for detecting object deformation based on image comparison and a computer readable storage medium, and mainly aims to solve the problem of low accuracy of object deformation state identification based on remote sensing identification.
In order to achieve the above object, the present invention provides a method for detecting object deformation based on image comparison, including:
acquiring an optical image containing a preset target object and a reference image corresponding to the optical image, and acquiring image data of the optical image and the reference image;
carrying out normalization correction on the image scales of the optical image and the reference image according to the image data;
calculating a logarithmic difference image between the optical image after the normalization correction and the reference image;
carrying out non-down sampling contourlet transformation on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image;
binary classification is carried out on the multi-scale coefficient matrix, a classification threshold value of the binary classification is extracted, and an optical contour of the preset target object in the optical image is drawn according to the classification threshold value;
and acquiring a standard contour of the preset target object, and judging whether the preset target object deforms or not according to the optical contour and the standard contour.
Optionally, the performing normalization correction on the image scales of the optical image and the reference image according to the image data includes:
mapping the image data of the optical image and the reference image into a pre-constructed two-dimensional coordinate system;
counting a first coordinate of the optical image in the two-dimensional coordinate system and a second coordinate of the reference image in the two-dimensional coordinate system;
and determining the scaling factor of the optical image and the reference image according to the first coordinate and the second coordinate, and scaling the optical image and the reference image to the same image size according to the scaling factor.
Optionally, the calculating a logarithmic difference image between the normalized corrected optical image and the reference image includes:
counting the pixel value of each pixel point in the optical image, and generating a first pixel matrix according to the pixel value of the pixel point in the optical image;
counting the pixel value of each pixel point in the reference image, and generating a second pixel matrix according to the pixel value of the pixel point in the reference image;
carrying out logarithmic difference operation on elements at corresponding positions in the first pixel matrix and the second pixel matrix to obtain a logarithmic difference value;
and collecting the logarithmic difference values according to the positions of the corresponding elements in the first pixel matrix or the second pixel matrix to obtain a logarithmic difference matrix, and using the value of each element in the logarithmic difference matrix as a pixel value to generate the logarithmic difference image.
Optionally, the performing non-downsampling contourlet transform on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image includes:
decomposing the logarithmic difference image in N different vector directions by utilizing Laplacian pyramid transformation to obtain a first image component in each vector direction in the N different vector directions;
decomposing the high-frequency component in each first image component in M different vector directions by using a directional filter to obtain a second image component in each vector direction in the M different vector directions;
and splicing the first image component and the second image component into a fusion component, and performing non-downsampling contourlet transform inverse transformation on the fusion component to obtain a multi-scale coefficient matrix of the logarithmic difference image.
Optionally, the performing binary classification on the multi-scale coefficient matrix and extracting a classification threshold of the binary classification includes:
randomly selecting two matrix elements from the multi-scale coefficient matrix as a first central point and a second central point, and taking the values of the two selected matrix elements as the central values of the respective central points;
selecting unselected matrix elements from the multi-scale coefficient matrix one by one as target elements, and respectively calculating the distance values between the target elements and the first central point and the second central point;
collecting the target element and a central store with a smaller distance value, calculating the average value of all elements in the collected first central point, updating the central value of the first central point by using the average value, calculating the average value of all elements in the collected second central point, and updating the central value of the second central point by using the average value;
judging whether elements exist in the multi-scale coefficient matrix and are not selected;
if the elements in the multi-scale coefficient matrix are not selected, returning to the step of selecting the matrix elements which are not selected from the multi-scale coefficient matrix one by one as target elements;
and if no element exists in the multi-scale coefficient matrix and is not selected, determining the central value of the first central point and the central value of the second central point as the classification threshold.
Optionally, the determining whether the preset object is deformed according to the optical contour and the standard contour includes:
calculating the similarity between the optical profile and the standard profile;
when the similarity is larger than a preset threshold value, determining that the preset object is not deformed;
and when the similarity is smaller than or equal to a preset threshold value, determining that the preset object deforms.
Optionally, the calculating the similarity between the optical profile and the standard profile includes:
calculating a similarity between the optical profile and the standard profile using a similarity algorithm as follows:
Figure BDA0003380168810000031
wherein Sim is said, X is said optical profile, and T is said standard profile.
In order to solve the above problem, the present invention further provides an object shape change detection apparatus based on image comparison, the apparatus including:
the image processing module is used for acquiring an optical image containing a preset target object and a reference image corresponding to the optical image, acquiring image data of the optical image and the reference image, and performing normalization correction on the image scales of the optical image and the reference image according to the image data;
the image difference module is used for calculating a logarithmic difference image between the optical image after normalization and correction and the reference image;
the matrix analysis module is used for carrying out non-down-sampling contourlet transformation on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image;
the contour dividing module is used for carrying out binary classification on the multi-scale coefficient matrix, extracting a classification threshold value of the binary classification, and drawing an optical contour of the preset target object in the optical image according to the classification threshold value;
and the deformation judging module is used for acquiring the standard contour of the preset target object and judging whether the preset target object deforms or not according to the optical contour and the standard contour.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method for detecting object form variations based on image matching.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the object form change detection method based on image matching.
The embodiment of the invention can carry out logarithmic difference processing on the optical image and the corresponding reference image, can eliminate the influence of noise points in the optical image and the reference image in a logarithmic difference mode, further improve the accuracy of whether the preset target object contained in the analysis image is deformed, and simultaneously carry out non-down sampling contour wave transformation on the logarithmic difference image and analyze whether the target object contour is deformed according to the multi-scale coefficient matrix obtained by transformation, thereby realizing multi-scale and multi-direction analysis on the image and further improving the accuracy of whether the analysis target object is deformed. Therefore, the object deformation detection method and device based on image comparison, the electronic equipment and the computer readable storage medium can solve the problem that the object deformation state identification accuracy is low based on remote sensing identification.
Drawings
Fig. 1 is a schematic flowchart of a target object deformation detection method based on image comparison according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of normalization correction according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a logarithmic difference image according to an embodiment of the present invention;
FIG. 4 is a functional block diagram of a target form change detecting apparatus based on image comparison according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device for implementing the object deformation detection method based on image comparison according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a target form change detection method based on image comparison. The subject matter of the object form change detection method based on image comparison includes, but is not limited to, at least one of the electronic devices of a server, a terminal, and the like, which can be configured to execute the method provided by the embodiments of the present application. In other words, the object shape change detection method based on image comparison may be executed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Fig. 1 is a schematic flow chart of a target form change detection method based on image comparison according to an embodiment of the present invention. In this embodiment, the object deformation detection method based on image comparison includes:
and S1, acquiring an optical image containing a preset target object and a reference image corresponding to the optical image, and acquiring image data of the optical image and the reference image.
In the embodiment of the invention, the preset object can be any building, equipment or natural scenery; the optical image may be an image of the preset object captured by any camera, for example, an image of the preset object captured by a device with a capturing function, such as a camera, a mobile phone, a remote sensing satellite, etc.; the reference image is opposite to the optical image, the reference image comprises the preset target object, but the shooting time of the reference image is before the optical image.
In detail, the optical image and the reference image may be obtained from a predetermined storage area for storing the optical image and the reference image by using a computer sentence (e.g., python fortune, java sentence, etc.) having a data capture function, wherein the storage area includes, but is not limited to, a database, a block link point, and a network cache.
Further, the image data includes coordinate information of an image when the image is captured, for example, when the optical image and the reference image are satellite remote sensing images, the image data may be three-dimensional coordinates of the image in a three-dimensional coordinate system constructed with the geocentric point as an origin.
In particular, the image data may be retrieved from a system or data store that captures the optical image and the reference image using a pre-constructed data interface.
And S2, performing normalization correction on the image scales of the optical image and the reference image according to the image data.
In one practical application scenario of the present invention, since there may be a situation of image size inconsistency between the optical image and the reference image, in order to facilitate subsequent analysis and improve the accuracy of analyzing whether a preset object is deformed, the image scales of the optical image and the reference image may be normalized and corrected according to the image data, so that the sizes of the optical image and the reference image are consistent.
In an embodiment of the present invention, referring to fig. 2, the performing normalization correction on the image scales of the optical image and the reference image according to the image data includes:
s21, mapping the image data of the optical image and the reference image into a pre-constructed two-dimensional coordinate system;
s22, counting a first coordinate of the optical image in the two-dimensional coordinate system, and counting a second coordinate of the reference image in the two-dimensional coordinate system;
and S23, determining the zoom factors of the optical image and the reference image according to the first coordinate and the second coordinate, and zooming the optical image and the reference image to the same image size according to the zoom factors.
In detail, since the optical image and the reference image may be three-dimensional images, in order to reduce the occupation of computing resources when analyzing the optical image and the reference image, the image data of the optical image and the reference image may be mapped into a pre-constructed two-dimensional coordinate system through a preset mapping function, so as to achieve unification of spatial dimensions of the optical image and the reference image, where the mapping function includes, but is not limited to, a gaussian function and a mapping function.
Furthermore, a first coordinate and a second coordinate of the optical image and the reference image in the two-dimensional coordinate system can be respectively counted, the zoom factor of the optical image and the zoom factor of the reference image are determined according to the first coordinate and the second coordinate, and the optical image and the reference image are zoomed to the same image size according to the zoom factor.
For example, if the image size of the optical image is 2x4cm according to the first coordinate of the optical image in the two-dimensional coordinate system and the image size of the reference image is 4x8cm according to the second coordinate of the reference image in the two-dimensional coordinate system, the optical image and the reference image can be determined to have the same common multiple of 4x8cm, and the optical image can be further enlarged by 2 times to obtain an optical image of 4x8cm, and the optical image and the reference image of the same size can be obtained while keeping the image size of the reference image unchanged.
And S3, calculating a logarithmic difference image between the normalized optical image and the reference image.
In one embodiment of the present application, since the optical image and the reference image are subjected to various images such as light intensity of an external environment and performance of a shooting device when being shot, the obtained optical image and the reference image may include a part of noise, and in order to avoid the noise in the image from reducing the accuracy of deformation of a preset object in a subsequent analysis image, a logarithmic difference image between the optical image and the reference image after normalization and correction can be calculated.
In an embodiment of the present invention, referring to fig. 3, the calculating a logarithmic difference image between the normalized optical image and the reference image includes:
s31, counting the pixel value of each pixel point in the optical image, and generating a first pixel matrix according to the pixel value of the pixel point in the optical image;
s32, counting the pixel value of each pixel point in the reference image, and generating a second pixel matrix according to the pixel value of the pixel point in the reference image;
s33, carrying out logarithmic difference operation on elements at corresponding positions in the first pixel matrix and the second pixel matrix to obtain a logarithmic difference value;
and S34, collecting the logarithmic difference values according to the positions of the corresponding elements in the first pixel matrix or the second pixel matrix to obtain a logarithmic difference matrix, and taking the value of each element in the logarithmic difference matrix as a pixel value to generate the logarithmic difference image.
In detail, the pixel values of each pixel in the optical image and the reference image may be counted, and then a first pixel matrix corresponding to the optical image is generated according to the pixel values, and a second pixel matrix corresponding to the reference image is generated according to the pixel values.
Specifically, since the optical image and the reference image have the same size, the number of rows and columns of the first pixel matrix and the second pixel matrix generated according to the optical image and the reference image is the same, and therefore, the logarithmic difference operation can be performed on the elements at the corresponding positions in the first pixel matrix and the second pixel matrix to obtain the difference value.
In this embodiment of the present invention, the performing a logarithmic difference operation on the elements at the corresponding positions in the first pixel matrix and the second pixel matrix to obtain a logarithmic difference value includes:
calculating the logarithmic difference value by using the following logarithmic difference algorithm:
Figure BDA0003380168810000081
wherein Xd (I, J) is a log difference value of the I row and J column elements in the first pixel matrix and the second pixel matrix10Is a base 10 pairAnd (3) performing a number operation, wherein X1(I, J) is the row I and the column J elements in the first pixel matrix, and X2(I, J) is the row I and the column J elements in the second pixel matrix.
Furthermore, each log difference value can be collected according to the position of the corresponding element of the device to obtain the log difference matrix, and the value of each element in the log difference matrix is used as a pixel value to generate the log difference image.
In the embodiment of the invention, compared with the method for directly calculating the difference between the optical image and the reference image to obtain the difference image, the logarithmic difference can eliminate the influence of noise points in the optical image and the reference image to the maximum extent, so that the accuracy of subsequently analyzing whether the preset object is deformed is improved.
And S4, carrying out non-down-sampling contourlet transformation on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image.
In the embodiment of the present invention, the non-downsampling Contourlet Transform (NSCT) performs iterative decomposition on the image by using a non-downsampling tower filter bank nspb (non-downsampled Pyramid filter bank) and a non-downsampling direction filter bank nsfb (non-downsampled Directional filter bank), so as to perform multi-Directional and multi-scale decomposition on the image, and further improve accuracy of subsequently analyzing whether a preset object is distorted.
In an embodiment of the present invention, the performing non-downsampling contourlet transform on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image includes:
decomposing the logarithmic difference image in N different vector directions by utilizing Laplacian pyramid transformation to obtain a first image component in each vector direction in the N different vector directions;
decomposing the high-frequency component in each first image component in M different vector directions by using a directional filter to obtain a second image component in each vector direction in the M different vector directions;
and splicing the first image component and the second image component into a fusion component, and performing non-downsampling contourlet transform inverse transformation on the fusion component to obtain a multi-scale coefficient matrix of the logarithmic difference image.
In detail, N and M may be equal, and the first picture component and the second picture component are numerical expressions of component images having the same image size as the differential picture.
Specifically, the log difference image is decomposed in N different vector directions by using laplacian pyramid transformation, that is, the log difference image is input into the laplacian pyramid, and the log difference image is subjected to sampling decomposition in multiple vector directions through different levels in the laplacian pyramid, so as to obtain first image components decomposed in different directions.
Furthermore, each first image component may be input into a preset directional filter, and then each first image may be subjected to sampling decomposition by using a directional filter having M different directions, so as to obtain a second image component in each vector direction of the M different vector directions.
In the embodiment of the present invention, the first image component and the second image component may be used as a single matrix element to perform matrix fusion to obtain a component matrix, and the component matrix may be subjected to inverse non-downsampling contourlet transform to obtain a multi-scale coefficient matrix of the logarithmic difference image.
In the embodiment of the invention, the difference image and the components of the difference image in different vector directions are decomposed by utilizing Laplacian pyramid transformation and a directional filter, so that the analysis of the difference image and the components in different directions can be realized under the condition of keeping the translational invariance of the difference image and the components in different directions, and the accuracy of the finally generated multi-scale coefficient matrix is improved.
S5, binary classification is carried out on the multi-scale coefficient matrix, a classification threshold value of the binary classification is extracted, and the optical contour of the preset target object in the optical image is drawn according to the classification threshold value.
In the embodiment of the invention, the multi-scale coefficient matrix comprises multi-scale and multi-direction image information in the optical image, so that the multi-scale coefficient matrix can be analyzed, and the optical profile of the preset object in the optical image is determined according to the analysis result.
In this embodiment of the present invention, the performing binary classification on the multi-scale coefficient matrix and extracting a classification threshold of the binary classification includes:
randomly selecting two matrix elements from the multi-scale coefficient matrix as a first central point and a second central point, and taking the values of the two selected matrix elements as the central values of the respective central points;
selecting unselected matrix elements from the multi-scale coefficient matrix one by one as target elements, and respectively calculating the distance values between the target elements and the first central point and the second central point;
collecting the target element and a central store with a smaller distance value, calculating the average value of all elements in the collected first central point, updating the central value of the first central point by using the average value, calculating the average value of all elements in the collected second central point, and updating the central value of the second central point by using the average value;
judging whether elements exist in the multi-scale coefficient matrix and are not selected;
if the elements in the multi-scale coefficient matrix are not selected, returning to the step of selecting the matrix elements which are not selected from the multi-scale coefficient matrix one by one as target elements;
and if no element exists in the multi-scale coefficient matrix and is not selected, determining the central value of the first central point and the central value of the second central point as the classification threshold.
For example, there are elements A, B, C and D in the multi-scale coefficient matrix, randomly choosing element A as the first center point, randomly choosing element B as the second center point, and selecting one element from the unselected elements C and D one by one, with the value of the element A as the central value of the first central point and the value of the element B as the central value of the second central point, taking the element C as a template element, respectively calculating to obtain a distance value between the element C and the first central point as 10, and calculating to obtain a distance value between the element C and the second center point as 20, wherein the distance value between the element C and the first center point is smaller than the distance value between the element C and the second center point, collecting the element C and the element A in the first central point, calculating the mean value of the element A and the element C, and updating the central value of the first central point into the mean value of the element A and the element C; and similarly, selecting the element D as a target element, and repeating the steps.
In detail, when no element in the multi-scale coefficient matrix is not selected, the central value of the first central point and the central value of the second central point at the time are determined as the classification threshold.
Further, the optical contour of the preset target object in the optical image may be drawn according to the classification threshold, that is, a larger value of the first central value and the second central value is used as an upper interval limit, a smaller value is used as a lower interval limit to construct a threshold interval, and a pixel point of a pixel value in the threshold interval in the optical image is determined to be the optical contour of the preset target object included in the optical image.
And S6, acquiring a standard contour of the preset target object, and judging whether the preset target object deforms or not according to the optical contour and the standard contour.
In an embodiment of the present invention, the standard profile is a predetermined real profile of the preset target object, for example, a profile determined by measuring, surveying, and the like at a site where the target object works.
In detail, the optical profile and the standard profile can be compared, and then whether the preset target object deforms or not can be judged according to a comparison structure.
In an embodiment of the present invention, the determining whether the preset object is deformed according to the optical contour and the standard contour includes:
calculating the similarity between the optical profile and the standard profile;
when the similarity is larger than a preset threshold value, determining that the preset object is not deformed;
and when the similarity is smaller than or equal to a preset threshold value, determining that the preset object deforms.
In detail, the calculating the similarity between the optical profile and the standard profile includes:
calculating a similarity between the optical profile and the standard profile using a similarity algorithm as follows:
Figure BDA0003380168810000111
wherein Sim is said, X is said optical profile, and T is said standard profile.
The embodiment of the invention can carry out logarithmic difference processing on the optical image and the corresponding reference image, can eliminate the influence of noise points in the optical image and the reference image in a logarithmic difference mode, further improve the accuracy of whether the preset target object contained in the analysis image is deformed, and simultaneously carry out non-down sampling contour wave transformation on the logarithmic difference image and analyze whether the target object contour is deformed according to the multi-scale coefficient matrix obtained by transformation, thereby realizing multi-scale and multi-direction analysis on the image and further improving the accuracy of whether the analysis target object is deformed. Therefore, the object deformation detection method based on image comparison provided by the invention can solve the problem of low accuracy of object deformation state identification based on remote sensing identification.
Fig. 4 is a functional block diagram of a target form change detecting apparatus based on image comparison according to an embodiment of the present invention.
The object shape change detecting device 100 based on image comparison according to the present invention can be installed in an electronic device. According to the implemented functions, the object deformation detecting device 100 based on image comparison may include an image processing module 101, an image difference module 102, a matrix analysis module 103, a contour division module 104, and a deformation judgment module 105. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the image processing module 101 is configured to obtain an optical image including a preset target object and a reference image corresponding to the optical image, obtain image data of the optical image and the reference image, and perform normalization correction on image scales of the optical image and the reference image according to the image data;
the image difference module 102 is configured to calculate a logarithmic difference image between the normalized and corrected optical image and the reference image;
the matrix analysis module 103 is configured to perform non-downsampling contourlet transformation on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image;
the contour dividing module 104 is configured to perform binary classification on the multi-scale coefficient matrix, extract a classification threshold of the binary classification, and draw an optical contour of the preset object in the optical image according to the classification threshold;
the deformation judging module 105 is configured to obtain a standard contour of the preset target object, and judge whether the preset target object deforms according to the optical contour and the standard contour.
In detail, when the modules in the target object-shape-change detecting device 100 based on image comparison according to the embodiment of the present invention are used, the same technical means as the target object-shape-change detecting method based on image comparison described in fig. 1 to 3 are adopted, and the same technical effects can be produced, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device for implementing a target object deformation detection method based on image comparison according to an embodiment of the present invention.
The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program, such as a target form change detection program based on image comparison, stored in the memory 11 and executable on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules stored in the memory 11 (for example, executing a target object shape change detection program based on image comparison, etc.), and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used to store not only application software installed in the electronic device and various types of data, such as codes of a target form change detection program based on image comparison, but also temporarily store data that has been output or will be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 5 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The object form change detection program stored in the memory 11 of the electronic device 1 based on image comparison is a combination of a plurality of instructions, and when executed in the processor 10, can realize:
acquiring an optical image containing a preset target object and a reference image corresponding to the optical image, and acquiring image data of the optical image and the reference image;
carrying out normalization correction on the image scales of the optical image and the reference image according to the image data;
calculating a logarithmic difference image between the optical image after the normalization correction and the reference image;
carrying out non-down sampling contourlet transformation on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image;
binary classification is carried out on the multi-scale coefficient matrix, a classification threshold value of the binary classification is extracted, and an optical contour of the preset target object in the optical image is drawn according to the classification threshold value;
and acquiring a standard contour of the preset target object, and judging whether the preset target object deforms or not according to the optical contour and the standard contour.
Specifically, the specific implementation method of the instruction by the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to the drawings, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
acquiring an optical image containing a preset target object and a reference image corresponding to the optical image, and acquiring image data of the optical image and the reference image;
carrying out normalization correction on the image scales of the optical image and the reference image according to the image data;
calculating a logarithmic difference image between the optical image after the normalization correction and the reference image;
carrying out non-down sampling contourlet transformation on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image;
binary classification is carried out on the multi-scale coefficient matrix, a classification threshold value of the binary classification is extracted, and an optical contour of the preset target object in the optical image is drawn according to the classification threshold value;
and acquiring a standard contour of the preset target object, and judging whether the preset target object deforms or not according to the optical contour and the standard contour.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A target object deformation detection method based on image comparison is characterized by comprising the following steps:
acquiring an optical image containing a preset target object and a reference image corresponding to the optical image, and acquiring image data of the optical image and the reference image;
carrying out normalization correction on the image scales of the optical image and the reference image according to the image data;
calculating a logarithmic difference image between the optical image after the normalization correction and the reference image;
carrying out non-down sampling contourlet transformation on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image;
binary classification is carried out on the multi-scale coefficient matrix, a classification threshold value of the binary classification is extracted, and an optical contour of the preset target object in the optical image is drawn according to the classification threshold value;
and acquiring a standard contour of the preset target object, and judging whether the preset target object deforms or not according to the optical contour and the standard contour.
2. The method of claim 1, wherein the normalizing the image dimensions of the optical image and the reference image according to the image data comprises:
mapping the image data of the optical image and the reference image into a pre-constructed two-dimensional coordinate system;
counting a first coordinate of the optical image in the two-dimensional coordinate system and a second coordinate of the reference image in the two-dimensional coordinate system;
and determining the scaling factor of the optical image and the reference image according to the first coordinate and the second coordinate, and scaling the optical image and the reference image to the same image size according to the scaling factor.
3. The method of claim 1, wherein the calculating the logarithmic difference image between the normalized corrected optical image and the reference image comprises:
counting the pixel value of each pixel point in the optical image, and generating a first pixel matrix according to the pixel value of the pixel point in the optical image;
counting the pixel value of each pixel point in the reference image, and generating a second pixel matrix according to the pixel value of the pixel point in the reference image;
carrying out logarithmic difference operation on elements at corresponding positions in the first pixel matrix and the second pixel matrix to obtain a logarithmic difference value;
and collecting the logarithmic difference values according to the positions of the corresponding elements in the first pixel matrix or the second pixel matrix to obtain a logarithmic difference matrix, and using the value of each element in the logarithmic difference matrix as a pixel value to generate the logarithmic difference image.
4. The method of claim 1, wherein the performing non-downsampling contourlet transform on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image comprises:
decomposing the logarithmic difference image in N different vector directions by utilizing Laplacian pyramid transformation to obtain a first image component in each vector direction in the N different vector directions;
decomposing the high-frequency component in each first image component in M different vector directions by using a directional filter to obtain a second image component in each vector direction in the M different vector directions;
and splicing the first image component and the second image component into a fusion component, and performing non-downsampling contourlet transform inverse transformation on the fusion component to obtain a multi-scale coefficient matrix of the logarithmic difference image.
5. The method of claim 1, wherein the binary classification of the multi-scale coefficient matrix and the extraction of the classification threshold of the binary classification comprises:
randomly selecting two matrix elements from the multi-scale coefficient matrix as a first central point and a second central point, and taking the values of the two selected matrix elements as the central values of the respective central points;
selecting unselected matrix elements from the multi-scale coefficient matrix one by one as target elements, and respectively calculating the distance values between the target elements and the first central point and the second central point;
collecting the target element and a central store with a smaller distance value, calculating the average value of all elements in the collected first central point, updating the central value of the first central point by using the average value, calculating the average value of all elements in the collected second central point, and updating the central value of the second central point by using the average value;
judging whether elements exist in the multi-scale coefficient matrix and are not selected;
if the elements in the multi-scale coefficient matrix are not selected, returning to the step of selecting the matrix elements which are not selected from the multi-scale coefficient matrix one by one as target elements;
and if no element exists in the multi-scale coefficient matrix and is not selected, determining the central value of the first central point and the central value of the second central point as the classification threshold.
6. The method for detecting object deformation based on image comparison as claimed in any one of claims 1 to 5, wherein the determining whether the preset object is deformed according to the optical contour and the standard contour comprises:
calculating the similarity between the optical profile and the standard profile;
when the similarity is larger than a preset threshold value, determining that the preset object is not deformed;
and when the similarity is smaller than or equal to a preset threshold value, determining that the preset object deforms.
7. The method of claim 6, wherein the calculating the similarity between the optical profile and the standard profile comprises:
calculating a similarity between the optical profile and the standard profile using a similarity algorithm as follows:
Figure FDA0003380168800000031
wherein Sim is said, X is said optical profile, and T is said standard profile.
8. An object shape change detection device based on image comparison, the device comprising:
the image processing module is used for acquiring an optical image containing a preset target object and a reference image corresponding to the optical image, acquiring image data of the optical image and the reference image, and performing normalization correction on the image scales of the optical image and the reference image according to the image data;
the image difference module is used for calculating a logarithmic difference image between the optical image after normalization and correction and the reference image;
the matrix analysis module is used for carrying out non-down-sampling contourlet transformation on the logarithmic difference image to obtain a multi-scale coefficient matrix of the logarithmic difference image;
the contour dividing module is used for carrying out binary classification on the multi-scale coefficient matrix, extracting a classification threshold value of the binary classification, and drawing an optical contour of the preset target object in the optical image according to the classification threshold value;
and the deformation judging module is used for acquiring the standard contour of the preset target object and judging whether the preset target object deforms or not according to the optical contour and the standard contour.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method of detecting object form changes based on image matching according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the object shape change detection method based on image matching according to any one of claims 1 to 7.
CN202111431132.6A 2021-11-29 2021-11-29 Object shape change detection method, device, equipment and medium based on image comparison Pending CN114049568A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111431132.6A CN114049568A (en) 2021-11-29 2021-11-29 Object shape change detection method, device, equipment and medium based on image comparison

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111431132.6A CN114049568A (en) 2021-11-29 2021-11-29 Object shape change detection method, device, equipment and medium based on image comparison

Publications (1)

Publication Number Publication Date
CN114049568A true CN114049568A (en) 2022-02-15

Family

ID=80211564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111431132.6A Pending CN114049568A (en) 2021-11-29 2021-11-29 Object shape change detection method, device, equipment and medium based on image comparison

Country Status (1)

Country Link
CN (1) CN114049568A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114758249A (en) * 2022-06-14 2022-07-15 深圳市优威视讯科技股份有限公司 Target object monitoring method, device, equipment and medium based on field night environment
CN116452468A (en) * 2023-06-19 2023-07-18 深圳市众翔奕精密科技有限公司 Deformation correction method and device for silica gel process

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103400383A (en) * 2013-07-22 2013-11-20 西安电子科技大学 SAR (synthetic aperture radar) image change detection method based on NSCT (non-subsampled contourlet transform) and compressed projection
CN103544707A (en) * 2013-10-31 2014-01-29 王浩然 Method for detecting change of optical remote sensing images based on contourlet transformation
CN109978855A (en) * 2019-03-26 2019-07-05 新疆大学 A kind of method for detecting change of remote sensing image and device
CN110378224A (en) * 2019-06-14 2019-10-25 香港理工大学深圳研究院 A kind of detection method of feature changes, detection system and terminal
CN110956602A (en) * 2019-12-17 2020-04-03 内蒙古工业大学 Method and device for determining change area and storage medium
CN111160199A (en) * 2019-12-23 2020-05-15 云南省交通规划设计研究院有限公司 Highway disaster information detection method based on high-resolution remote sensing image
CN111179230A (en) * 2019-12-18 2020-05-19 星际空间(天津)科技发展有限公司 Remote sensing image contrast change detection method and device, storage medium and electronic equipment
CN111539296A (en) * 2020-04-17 2020-08-14 河海大学常州校区 Method and system for identifying illegal building based on remote sensing image change detection
CN112365047A (en) * 2020-11-10 2021-02-12 山东世纪开元电子商务集团有限公司 Imposition optimization method and system
CN113569731A (en) * 2021-07-27 2021-10-29 广东电网有限责任公司 Intelligent identification method, system, equipment and medium for satellite image tower

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103400383A (en) * 2013-07-22 2013-11-20 西安电子科技大学 SAR (synthetic aperture radar) image change detection method based on NSCT (non-subsampled contourlet transform) and compressed projection
CN103544707A (en) * 2013-10-31 2014-01-29 王浩然 Method for detecting change of optical remote sensing images based on contourlet transformation
CN109978855A (en) * 2019-03-26 2019-07-05 新疆大学 A kind of method for detecting change of remote sensing image and device
CN110378224A (en) * 2019-06-14 2019-10-25 香港理工大学深圳研究院 A kind of detection method of feature changes, detection system and terminal
CN110956602A (en) * 2019-12-17 2020-04-03 内蒙古工业大学 Method and device for determining change area and storage medium
CN111179230A (en) * 2019-12-18 2020-05-19 星际空间(天津)科技发展有限公司 Remote sensing image contrast change detection method and device, storage medium and electronic equipment
CN111160199A (en) * 2019-12-23 2020-05-15 云南省交通规划设计研究院有限公司 Highway disaster information detection method based on high-resolution remote sensing image
CN111539296A (en) * 2020-04-17 2020-08-14 河海大学常州校区 Method and system for identifying illegal building based on remote sensing image change detection
CN112365047A (en) * 2020-11-10 2021-02-12 山东世纪开元电子商务集团有限公司 Imposition optimization method and system
CN113569731A (en) * 2021-07-27 2021-10-29 广东电网有限责任公司 Intelligent identification method, system, equipment and medium for satellite image tower

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114758249A (en) * 2022-06-14 2022-07-15 深圳市优威视讯科技股份有限公司 Target object monitoring method, device, equipment and medium based on field night environment
CN116452468A (en) * 2023-06-19 2023-07-18 深圳市众翔奕精密科技有限公司 Deformation correction method and device for silica gel process
CN116452468B (en) * 2023-06-19 2023-09-26 深圳市众翔奕精密科技有限公司 Deformation correction method and device for silica gel process

Similar Documents

Publication Publication Date Title
CN113283446B (en) Method and device for identifying object in image, electronic equipment and storage medium
CN112699775A (en) Certificate identification method, device and equipment based on deep learning and storage medium
CN112052850A (en) License plate recognition method and device, electronic equipment and storage medium
CN112507934A (en) Living body detection method, living body detection device, electronic apparatus, and storage medium
CN112396005A (en) Biological characteristic image recognition method and device, electronic equipment and readable storage medium
CN114049568A (en) Object shape change detection method, device, equipment and medium based on image comparison
CN114758249B (en) Target object monitoring method, device, equipment and medium based on field night environment
CN111695609A (en) Target damage degree determination method, target damage degree determination device, electronic device, and storage medium
CN111914939A (en) Method, device and equipment for identifying blurred image and computer readable storage medium
CN114241338A (en) Building measuring method, device, equipment and storage medium based on image recognition
CN113705461A (en) Face definition detection method, device, equipment and storage medium
CN113887438A (en) Watermark detection method, device, equipment and medium for face image
CN112862703B (en) Image correction method and device based on mobile photographing, electronic equipment and medium
CN117095275A (en) Asset inventory method, system, device and storage medium for data center
CN113255456B (en) Inactive living body detection method, inactive living body detection device, electronic equipment and storage medium
CN113887384A (en) Pedestrian trajectory analysis method, device, equipment and medium based on multi-trajectory fusion
CN113869385A (en) Poster comparison method, device and equipment based on target detection and storage medium
CN113792671A (en) Method and device for detecting face synthetic image, electronic equipment and medium
CN114463685A (en) Behavior recognition method and device, electronic equipment and storage medium
CN113887408A (en) Method, device and equipment for detecting activated face video and storage medium
CN114187476A (en) Vehicle insurance information checking method, device, equipment and medium based on image analysis
CN113888086A (en) Article signing method, device and equipment based on image recognition and storage medium
CN112580505A (en) Method and device for identifying opening and closing states of network points, electronic equipment and storage medium
CN114708230B (en) Vehicle frame quality detection method, device, equipment and medium based on image analysis
CN114120122B (en) Disaster damage identification method, device, equipment and storage medium based on remote sensing image

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