Image registration detection method, electronic device and storage medium
By calculating the similarity of pixels in two images with different resolutions, a similarity image is constructed, which solves the problem that existing technology cannot detect the registration of images with differences in resolution, and achieves effective detection and accurate registration of these images. .
Patent Information
- Application Number
- CN202210379455.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2042-04-12
AI Technical Summary
The prior art cannot effectively detect the registration status of two registered images with different resolution strengths, and detection cannot be achieved.
By calculating the similarity between each pixel in the first image and the corresponding pixel in the second image, a third image used to characterize the similarity of each pixel is obtained, and the registration detection results of the two images are determined based on the third image. .
It realizes the detection of two registered images with different resolutions and improves the accuracy of image registration detection.
Smart Images

Figure CN114882079B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine vision technology, and in particular to an image registration detection method, an electronic device and a storage medium. Background Art
[0002] Image registration technology is a technology that uses a certain method and based on a certain evaluation standard to optimally map one or more images to a target image. It is the basis of image fusion. Image fusion is widely used in target detection, model reconstruction, motion estimation, feature matching, tumor detection, lesion localization, angiography, geological exploration, aerial reconnaissance and other fields. Since the correctness of the image registration results directly affects the quality of subsequent image fusion, it is necessary to detect the image registration results. At present, the existing image registration detection method is only applicable to two registered images with basically the same resolution, but is not applicable to two registered images with different resolutions, and detection cannot be achieved. Summary of the invention
[0003] The embodiments of the present application provide an image registration detection method, an electronic device, and a storage medium to solve the technical problem in the prior art that registration detection cannot be performed for two registration images with different resolutions.
[0004] According to a first aspect of the present application, an image registration detection method is disclosed, the method comprising:
[0005] Receiving a first image and a second image that have completed registration, wherein the resolution of the first image is greater than the resolution of the second image;
[0006] Calculating the similarity between each pixel in the first image and the pixel at the corresponding position in the second image to obtain a third image used to characterize the similarity of each pixel;
[0007] A registration detection result of the first image and the second image is determined according to the third image.
[0008] According to a second aspect of the present application, an image registration detection device is disclosed, the device comprising:
[0009] A receiving module, configured to receive a first image and a second image that have completed registration, wherein the resolution of the first image is greater than the resolution of the second image;
[0010] A first calculation module, used to calculate the similarity between each pixel in the first image and the pixel at the corresponding position in the second image, to obtain a third image used to characterize the similarity of each pixel;
[0011] A determination module is used to determine a registration detection result of the first image and the second image according to the third image.
[0012] According to a third aspect of the present application, an electronic device is disclosed, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the image registration detection method as in the first aspect.
[0013] According to a fourth aspect of the present application, a computer-readable storage medium is disclosed, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the image registration detection method as in the first aspect is implemented.
[0014] According to a fifth aspect of the present application, a computer program product is disclosed, comprising a computer program / instruction, which implements the image registration detection method in the first aspect when executed by a processor.
[0015] In the embodiment of the present application, for two registered images with different resolutions, it is possible to determine whether there is a problem in the registration between the two registered images based on a third image formed by the similarity between the pixels in the two registered images. Compared with the prior art, in the embodiment of the present application, since the similarity of the pixels can largely reflect the degree of registration of the two images with different resolutions, it is possible to detect the two registered images with different resolutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of an image registration detection method provided in an embodiment of the present application;
[0017] Figure 2 is an example diagram of a third image provided in an embodiment of the present application;
[0018] Figure 3 is another example diagram of the third image provided in the embodiment of the present application;
[0019] Figure 4 is a flow chart of another image registration detection method provided in an embodiment of the present application;
[0020] Figure 5 is an example diagram of the fourth image provided in the embodiment of the present application;
[0021] Figure 6 is another example diagram of the fourth image provided in the embodiment of the present application;
[0022] Figure 7 is a structural schematic diagram of an image registration detection device provided in an embodiment of the present application;
[0023] Figure 8 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0025] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0026] In recent years, research on computer vision, deep learning, machine learning, image processing, image recognition and other technologies based on artificial intelligence has made important progress. Artificial Intelligence (AI) is an emerging science and technology that studies and develops theories, methods, technologies and application systems for simulating and extending human intelligence. Artificial intelligence is a comprehensive discipline involving many types of technologies such as chips, big data, cloud computing, the Internet of Things, distributed storage, deep learning, machine learning, neural networks, etc. Computer vision, as an important branch of artificial intelligence, specifically allows machines to recognize the world. Computer vision technology usually includes face recognition, liveness detection, fingerprint recognition and anti-counterfeiting verification, biometric recognition, face detection, pedestrian detection, target detection, pedestrian recognition, image processing, image recognition, image semantic understanding, image retrieval, text recognition, video processing, video content recognition, behavior recognition, 3D reconstruction, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), computational photography, robot navigation and positioning and other technologies. With the research and advancement of artificial intelligence technology, this technology has been applied in many fields, such as security, urban management, traffic management, building management, park management, facial access, facial attendance, logistics management, warehouse management, robots, intelligent marketing, computational photography, mobile phone imaging, cloud services, smart homes, wearable devices, unmanned driving, automatic driving, smart medical care, facial payment, facial unlocking, fingerprint unlocking, identity verification, smart screens, smart TVs, cameras, mobile Internet, live streaming, beauty, makeup, medical beauty, and smart temperature measurement.
[0027] The embodiments of the present application provide an image registration detection method, an electronic device, and a storage medium.
[0028] To facilitate understanding, some concepts involved in the embodiments of the present application are first explained.
[0029] Resolution, also known as image resolution, is the ability to distinguish the details of the original object. It is a physical quantity used to describe the ability of the microphotographic system to reproduce the subtle parts of the original object. It is an important indicator for evaluating the image resolution. The longer the focal length of the camera, the higher the resolution and the higher the image resolution; conversely, the shorter the focal length of the camera, the lower the resolution and the lower the image resolution.
[0030] Gaussian blur, also known as Gaussian smoothing, is a processing effect widely used in image processing software such as Adobe Photoshop, GIMP and Paint.NET. It is usually used to reduce image noise and reduce the level of detail. The image generated by this blurring technology has a visual effect like observing the image through a frosted glass.
[0031] SSIM (Structural Similarity) is an indicator to measure the similarity between two images.
[0032] Next, an image registration detection method provided in an embodiment of the present application is introduced.
[0033] Figure 1 is a flow chart of an image registration detection method provided in an embodiment of the present application, such as Figure 1 As shown, the method may include the following steps: step 101, step 102 and step 103, wherein:
[0034] In step 101, a first image and a second image that have been registered are received, wherein the resolution of the first image is greater than that of the second image.
[0035] In the embodiment of the present application, for two images to be registered with different resolutions, the image with high resolution can be registered to the image with low resolution, or the image with low resolution can be registered to the image with high resolution.
[0036] In an embodiment of the present application, two images to be registered with different resolutions may come from two cameras. For example, one image to be registered comes from a wide-angle camera, and the other image to be registered comes from a telephoto camera. Since the focal lengths of the two cameras are different, the resolutions of the two images taken are also quite different. When taking pictures of the same object, the image taken by the telephoto camera has a high resolution, and the texture in the image can be clearly seen, while the image taken by the wide-angle camera has a low resolution, and only the approximate outline can be seen in the image, but the texture cannot be seen clearly.
[0037] For two images to be registered with different resolutions, after the registration is completed, a first image and a second image that have been registered are obtained, the first image is a high-resolution image, and the second image is a low-resolution image. In the embodiment of the present application, the accuracy of the registration result between the first image and the second image will be detected.
[0038] In the embodiment of the present application, the resolution of the first image may be much greater than that of the second image, or may be slightly greater than that of the second image.
[0039] In step 102, the similarity between each pixel in the first image and the pixel at the corresponding position in the second image is calculated to obtain a third image for representing the similarity of each pixel.
[0040] In some embodiments, to ensure the accuracy of similarity calculation between two images, a structural similarity calculation method may be used to calculate the similarity between each pixel in the first image and the pixel at the corresponding position in the second image. Alternatively, other similarity calculation methods such as histogram calculation methods may also be used, which are not limited here.
[0041] In some embodiments, the pixel value of each pixel in the third image is: a similarity value between a pixel at a corresponding position in the first image and a pixel at a corresponding position in the second image.
[0042] When the structural similarity calculation method is used to calculate the similarity between each pixel in the first image and the pixel at the corresponding position in the second image, the third image is a grayscale image, and the pixel value of each pixel in the third image is: the SSIM value of the pixel at the corresponding position in the first image and the pixel at the corresponding position in the second image.
[0043] For a certain pixel in the third image, if the SSIM value of the pixel is higher, it means that the first image and the second image are more similar at the pixel position, otherwise they are more dissimilar. Dissimilar positions often indicate that there is no registration, that is, errors will occur after registration. The performance of SSIM in the third image is: the higher the SSIM value of a certain pixel, the brighter the color at the pixel position, otherwise it is darker.
[0044] In some embodiments, since the grayscale image directly constructed by the similarity values of the pixel points at corresponding positions in the first image and the pixel points at corresponding positions in the second image has a relatively wide distribution of pixel values (0 to 255), it is difficult to process. For ease of processing, after calculating the similarity between each pixel point in the first image and the pixel points at corresponding positions in the second image, the calculated similarities of each pixel point can be binarized to obtain the binarized similarity results of each pixel point in the first image and the pixel points at corresponding positions in the second image, and the third image is constructed using the binarized similarity results of each pixel point.
[0045] Correspondingly, the third image is a binary image, and the pixel value of each pixel in the third image is: the binarization result of the similarity between the pixel at the corresponding position in the first image and the pixel at the corresponding position in the second image.
[0046] When binarizing the similarity between each pixel in the first image and the pixel at the corresponding position in the second image, a threshold thr1 (for example, 0.5) can be set, and the binarization result of the pixel whose similarity is less than thr1 is set to 255, and the binarization result of the pixel whose similarity is not less than thr is set to 0. Alternatively, the opposite processing idea can be adopted: the binarization result of the pixel whose similarity is less than thr1 is set to 0, and the binarization result of the pixel whose similarity is not less than thr is set to 255, which is not limited in the embodiment of the present application. For the convenience of subsequent description, the subsequent binarization processing is explained by taking the image obtained by the previous binarization processing strategy as an example.
[0047] In order to facilitate the understanding of the above two different forms of the third image, the example diagram in the attached figure is used for description. When the structural similarity calculation method is used to calculate the similarity between each pixel in the first image and the pixel at the corresponding position in the second image, the pixel value of each pixel in the third image is: the SSIM value of the pixel at the corresponding position in the first image and the pixel at the corresponding position in the second image, such as Figure 2 As shown, the third image is a grayscale image.
[0048] When the pixel value of each pixel in the third image is: the similarity binarization result of the pixel at the corresponding position in the first image and the pixel at the corresponding position in the second image, such as Figure 3 As shown, the third image is a binary image.
[0049] In step 103, a registration detection result of the first image and the second image is determined according to the third image.
[0050] In some embodiments, the registration detection result may be determined by the connected region information in the image, and the above step 103 may specifically include the following steps:
[0051] It is detected whether there is a connected area in the third image. If there is a connected area in the third image, it is determined that there is an error in the registration between the first image and the second image, wherein the registration error area is the connected area.
[0052] The third image is Figure 3 Take the image shown as an example. Figure 3 The third image shown is subjected to connected area detection, and the detection finds that there are multiple connected areas (i.e., multiple white areas) in the third image, and determines that there is an error in the registration between the first image and the second image, and the registration error area is the white area in the third image.
[0053] As can be seen from the above embodiment, in this embodiment, for two registered images with different resolutions, it is possible to determine whether there is a problem in the registration between the two registered images based on a third image formed by the similarity between the pixels in the two registered images. Compared with the prior art, in the embodiment of the present application, since the similarity of the pixel points can largely reflect the degree of registration of the two images with different resolutions, it is possible to detect the two registered images with different resolutions.
[0054] Figure 4 is a flow chart of another image registration detection method provided in an embodiment of the present application. In the embodiment of the present application, in order to improve the accuracy of the registration detection, the image that has completed the registration can be blurred, and the registration detection result can be guided by the blurred image to reduce the false detection caused by the difference in resolution. Figure 4 As shown, the method may include the following steps: step 401, step 402, step 403, step 404 and step 405, wherein:
[0055] In step 401, a first image and a second image that have been registered are received, wherein the resolution of the first image is greater than that of the second image.
[0056] In step 402, the similarity between each pixel in the first image and the pixel at the corresponding position in the second image is calculated to obtain a third image for representing the similarity of each pixel.
[0057] Steps 401 and 402 in the embodiment of the present application are Figure 1 Steps 101 and 102 in the illustrated embodiment are similar and will not be described in detail herein.
[0058] In step 403, blur processing is performed on at least the first image.
[0059] In order to reduce the difference in resolution between the first image and the second image, thereby reducing the interference of the dissimilar textures of the two images after registration on the detection results, in an embodiment of the present application, it is necessary to blur at least the first image with high resolution.
[0060] In some embodiments, only the high-resolution first image may be blurred.
[0061] In some embodiments, both the first image and the second image may be blurred, wherein the blurring degree of the first image is not less than the blurring degree of the second image.
[0062] When blurring an image, in order to achieve a uniform blurring effect, a Gaussian blurring algorithm may be used for blurring, or other blurring algorithms, such as a mean blurring algorithm, may be used, which is not limited here.
[0063] In step 404, if the first image is blurred, the similarity between each pixel in the blurred image and the pixel at the corresponding position in the second image is calculated to obtain a fourth image used to characterize the similarity of each pixel; if both the first image and the second image are blurred, the similarity between each pixel in the two blurred images is calculated to obtain a fourth image used to characterize the similarity of each pixel, and the blur degree of the first image is not lower than that of the second image.
[0064] In the embodiment of the present application, similar to the two representation forms of the third image, the fourth image can also have two representation forms, one of which is a grayscale image. Figure 5 As shown, another form of expression is a binary image such as Figure 6 shown.
[0065] It should be noted that when the third image and the fourth image are both binary images, their corresponding binarization strategies should be the same.
[0066] In step 405, a registration detection result of the first image and the second image is determined according to the third image and the fourth image.
[0067] In some embodiments, since the fourth image further eliminates the influence of texture dissimilarity caused by the difference in resolution, the fourth image can be used to guide the registration detection result of the third image. At this time, the above step 405 can specifically include the following steps (not shown in the figure): step 4051 and step 4052, wherein,
[0068] In step 4051, it is detected whether there is a connected area in the third image. If there is a connected area in the third image, the pixel value of each pixel point at the corresponding position in the fourth image is obtained;
[0069] In step 4052, the registration detection result of the first image and the second image is determined according to the pixel value of each pixel point at the corresponding position in the connected area in the third image and the fourth image.
[0070] In the embodiment of the present application, taking the third image and the fourth image as binary images as an example, the connected area in the third image (i.e., the binary image corresponding to the clear first and second images) is an area where registration errors may exist. In order to determine whether the area is a real registration error or a false detection caused by correct registration itself but due to texture dissimilarity, further judgment will be made in combination with the pixel points at the corresponding position in the fourth image (i.e., the binary image corresponding to the blurred first and second images).
[0071] In some embodiments, when further determination is made in combination with the pixel points at corresponding positions in the fourth image (i.e., the binary image corresponding to the blurred first and second images), the above step 4052 may specifically include the following steps:
[0072] For at least one connected region in the third image, the registration detection result between the first image and the second image is adjusted according to the pixel value of each pixel point at the corresponding position in the fourth image.
[0073] If the pixel values of the pixels at the corresponding positions in the fourth image are the same as the pixel values of the pixels in the connected region, the connected region is determined to be a registration error region;
[0074] If the pixel values of the pixels at the corresponding positions in the fourth image are different from the pixel values of the pixels in the connected region, the connected region is determined to be a correctly registered region.
[0075] In the embodiment of the present application, since the fourth image has eliminated the interference caused by texture dissimilarity, if the area at the corresponding position in the fourth image is also detected as a registration error area, it is determined that the connected area in the third image is a real registration error area. If the area at the corresponding position in the fourth image is detected not to be a registration error area, it is determined that the connected area in the third image is a misdetection caused by texture dissimilarity despite correct registration.
[0076] In some embodiments, in order to reduce some interference caused by the detection itself, for example, there may be some connected areas with very small areas (also called interference points) in the image. In order to reduce the interference of this part on the detection result, the image can be subjected to an island removal operation to remove the interference points in the image. At this time, the fourth image is an image composed of the similarities of each pixel in the two images calculated after blur processing, and is obtained after island removal processing; wherein, the island removal processing includes: eliminating isolated small areas in the image, the pixel values of the pixels in the small areas are the same as the pixel values of the pixels in the connected areas, and the number of pixels in the small areas is less than a preset number.
[0077] In some embodiments, in order for maintenance personnel to have an intuitive understanding of the registration error, the registration error area in the image may be marked and output, which is explained below with reference to an example.
[0078] In obtaining Figure 3 The third image shown and Figure 6After the fourth image shown, the third image is detected to have multiple white areas, i.e., connected areas, in the third image. Taking a relatively large white area A in the third image as an example, the white area A is an area where there may be a registration error. In order to determine whether the area A is a real registration error or a misdetection caused by texture dissimilarity, it is necessary to combine the fourth image for further judgment. Since the fourth image has eliminated the interference caused by texture dissimilarity, if there are also white pixels in the area at the corresponding position in the fourth image, it means that area A is indeed a real registration error area. If there are no white pixels in the area at the corresponding position in the fourth image, it means that area A is correctly registered but misdetected due to texture dissimilarity. At this time, the pixel value of the pixel in area A is changed from 255 to 0. The above processing is performed for each white area in the third image to obtain the final output image, wherein if there are still white areas in the output image, the white areas are registration error areas.
[0079] It can be seen from the above embodiments that in this embodiment, since the image with higher resolution in the two registered images is blurred, the difference in resolution between the two images can be narrowed, and the interference of the dissimilar textures of the two images after registration on the detection results can be reduced. Therefore, the registration results of the two registered images are detected in combination with the blurred image, which can solve the problem of false detection caused by the large difference in resolution between the two registered images and improve the accuracy of image registration detection.
[0080] In order to improve the accuracy of the registration detection result and eliminate the false detection caused by the difference in resolution, in another embodiment provided in the embodiment of the present application, the two registered images can be firstly blurred, and then the registration detection is performed based on the two blurred images. Figure 1 Steps 102 and 103 in the illustrated embodiment are similar and will not be described in detail herein.
[0081] In some embodiments, the first image is a blurred image, that is, only the image with a higher resolution among the two registered images may be blurred.
[0082] In some embodiments, both the first image and the second image are blurred images, that is, the two registered images may be blurred.
[0083] Figure 7 is a schematic diagram of the structure of the image registration detection device provided in the embodiment of the present application, such as Figure 7 As shown, the image registration detection device 700 may include: a receiving module 701, a first calculation module 702 and a determination module 703, wherein:
[0084] A receiving module 701 is configured to receive a first image and a second image that have been registered, wherein the resolution of the first image is greater than the resolution of the second image;
[0085] A first calculation module 702, used to calculate the similarity between each pixel in the first image and the pixel at the corresponding position in the second image, to obtain a third image used to characterize the similarity of each pixel;
[0086] The determination module 703 is used to determine the registration detection result of the first image and the second image according to the third image.
[0087] As can be seen from the above embodiment, in this embodiment, for two registered images with different resolutions, it is possible to determine whether there is a problem in the registration between the two registered images based on a third image formed by the similarity between the pixels in the two registered images. Compared with the prior art, in the embodiment of the present application, since the similarity of the pixel points can largely reflect the degree of registration of the two images with different resolutions, it is possible to detect the two registered images with different resolutions.
[0088] Optionally, as an embodiment, the determining module 703 may include:
[0089] A detection submodule, used to detect whether there is a connected area in the third image;
[0090] The first determination submodule is configured to determine that there is an error in the registration between the first image and the second image if a connected area exists in the third image.
[0091] Optionally, as an embodiment, the image registration detection device 700 may further include:
[0092] A blur processing module, used for at least blurring the first image;
[0093] A second calculation module, configured to calculate the similarity between each pixel in the blurred image and the pixel at the corresponding position in the second image if the first image is blurred, so as to obtain a fourth image for representing the similarity of each pixel;
[0094] a third calculation module, configured to calculate the similarity between the pixels in the two images obtained by the blurring process if the blurring process is performed on both the first image and the second image, so as to obtain a fourth image used to characterize the similarity of the pixels, wherein the blurring degree of the first image is not less than the blurring degree of the second image;
[0095] The determining module 703 may include:
[0096] The second determination submodule is used to determine the registration detection result of the first image and the second image according to the third image and the fourth image.
[0097] Optionally, as an embodiment, the second determining submodule may include:
[0098] A detection unit, used to detect whether there is a connected area in the third image;
[0099] an acquisition unit, configured to acquire pixel values of pixels at corresponding positions in the fourth image if a connected area exists in the third image;
[0100] A determination unit is used to determine the registration detection result of the first image and the second image according to the connected area in the third image and the pixel value of each pixel point at the corresponding position in the fourth image.
[0101] Optionally, as an embodiment, the determining unit may include:
[0102] A determination subunit is used to adjust the registration detection result between the first image and the second image according to the pixel value of each pixel point at a corresponding position in the fourth image for at least one connected area in the third image.
[0103] Optionally, as an embodiment, the determining subunit is specifically used to:
[0104] If the pixel values of the pixels at the corresponding positions in the fourth image are the same as the pixel values of the pixels in the connected region, then determining that the connected region is a registration error region;
[0105] If the pixel values of the pixels at the corresponding positions in the fourth image are different from the pixel values of the pixels in the connected region, the connected region is determined to be a correctly registered region.
[0106] Optionally, as an embodiment, the fourth image is an image formed by similarities of pixels in two images calculated after blurring, and obtained by performing island removal processing;
[0107] The island removal process includes: eliminating isolated small areas in the image, the pixel values of the pixels in the small areas are the same as the pixel values of the pixels in the connected areas, and the number of pixels in the small areas is less than a preset number.
[0108] Optionally, as an embodiment, the first image is a blurred image.
[0109] Any step in the embodiment of the image registration detection method provided in the present application and the specific operation in any step can be completed by the corresponding module in the image registration detection device. The process of the corresponding operation completed by each module in the image registration detection device refers to the process of the corresponding operation described in the embodiment of the image registration detection method.
[0110] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0111] Figure 8 8 is a block diagram of an electronic device according to an embodiment of the present application. The electronic device includes a processing component 822, which further includes one or more processors, and a memory resource represented by a memory 832 for storing instructions executable by the processing component 822, such as an application. The application stored in the memory 832 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 822 is configured to execute instructions to perform the above method.
[0112] The electronic device may also include a power supply component 826 configured to perform power management of the electronic device, a wired or wireless network interface 850 configured to connect the electronic device to a network, and an input / output (I / O) interface 858. The electronic device may operate based on an operating system stored in the memory 832, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™ or the like.
[0113] According to another embodiment of the present application, the present application further provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps in the image registration detection method as described in any of the above embodiments.
[0114] According to another embodiment of the present application, the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in the image registration detection method described in any of the above embodiments.
[0115] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0116] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0118] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0119] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0120] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0121] The above is a detailed introduction to an image registration detection method, electronic device and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An image registration detection method, characterized in that: The method comprises: Receiving a first image and a second image that have completed registration, wherein the resolution of the first image is greater than the resolution of the second image; Calculating the similarity between each pixel in the first image and the pixel at the corresponding position in the second image to obtain a third image used to characterize the similarity of each pixel; At least blur the first image; If the first image is blurred, then the similarity between each pixel in the blurred image and the pixel at the corresponding position in the second image is calculated to obtain a fourth image for representing the similarity of each pixel; If both the first image and the second image are blurred, then the similarity between the pixels in the two blurred images is calculated to obtain a fourth image used to characterize the similarity of the pixels, and the blur degree of the first image is not less than that of the second image; Determining, according to the third image, a registration detection result of the first image and the second image; The step of determining the registration detection result of the first image and the second image according to the third image includes: A registration detection result of the first image and the second image is determined according to the third image and the fourth image.
2. The method according to claim 1, characterized in that The step of determining the registration detection result of the first image and the second image according to the third image includes: Detecting whether there is a connected area in the third image; If there is a connected area in the third image, it is determined that there is an error in the registration between the first image and the second image.
3. The method according to claim 1, characterized in that The step of determining a registration detection result of the first image and the second image according to the third image and the fourth image includes: Detecting whether there is a connected area in the third image; If there is a connected area in the third image, obtaining the pixel value of each pixel point at the corresponding position in the fourth image; The registration detection result of the first image and the second image is determined according to the connected area in the third image and the pixel value of each pixel point at the corresponding position in the fourth image.
4. The method according to claim 3, characterized in that The step of determining the registration detection result between the first image and the second image according to the connected area in the third image and the pixel value of each pixel point at the corresponding position in the fourth image comprises: For at least one connected region in the third image, the registration detection result between the first image and the second image is adjusted according to the pixel value of each pixel point at a corresponding position in the fourth image.
5. The method according to claim 4, characterized in that The adjusting the registration detection result between the first image and the second image according to the pixel value of each pixel point at the corresponding position in the fourth image includes: If the pixel values of the pixels at the corresponding positions in the fourth image are the same as the pixel values of the pixels in the connected region, then determining that the connected region is a registration error region; If the pixel values of the pixels at the corresponding positions in the fourth image are different from the pixel values of the pixels in the connected region, the connected region is determined to be a correctly registered region.
6. The method according to any one of claims 2 to 5, characterized in that: The fourth image is an image obtained by removing islands from an image formed by similarities of pixels in the two images calculated after blurring; The island removal process includes: eliminating isolated small areas in the image, the pixel values of the pixels in the small areas are the same as the pixel values of the pixels in the connected areas, and the number of pixels in the small areas is less than a preset number.
7. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and device for obtaining image diversity factor result
CN103186897A