WO2016033967A1 - 对齐图像的方法和装置 - Google Patents

对齐图像的方法和装置 Download PDF

Info

Publication number
WO2016033967A1
WO2016033967A1 PCT/CN2015/075823 CN2015075823W WO2016033967A1 WO 2016033967 A1 WO2016033967 A1 WO 2016033967A1 CN 2015075823 W CN2015075823 W CN 2015075823W WO 2016033967 A1 WO2016033967 A1 WO 2016033967A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
image
column vector
dimensional column
image block
Prior art date
Application number
PCT/CN2015/075823
Other languages
English (en)
French (fr)
Inventor
沈小勇
贾佳亚
洪国伟
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2016033967A1 publication Critical patent/WO2016033967A1/zh
Priority to US15/448,799 priority Critical patent/US10127679B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/32Determination of transform parameters for the alignment of images, i.e. image registration using correlation-based methods
    • G06T3/147
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/41Analysis of texture based on statistical description of texture
    • G06T7/44Analysis of texture based on statistical description of texture using image operators, e.g. filters, edge density metrics or local histograms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10032Satellite or aerial image; Remote sensing
    • G06T2207/10036Multispectral image; Hyperspectral image

Definitions

  • the present invention relates to the field of image processing and, more particularly, to a method and apparatus for aligning images.
  • Image alignment technology is the basic technology in the field of image processing. With the rapid development of digital images, a series of applications based on image alignment technology have emerged. These applications include the generation of panoramas, the generation of high dynamic maps, the fusion of information between two images, etc., for example, the use of infrared images to repair color images, the use of noisy images to remove blurring of another color map, and the like.
  • FIG. 1 shows four common multimodal multispectral images, from left to right: Group 1 is images of different exposures, Group 2 is color and depth images, Group 3 is color and near-infrared images, Group 4 is an image that turns on the flash and does not turn on the flash. As can be seen from Figure 1, there are mainly the following differences between multimodal multispectral images:
  • SIFT Scale-invariant Feature Transform
  • the technique matches the images that need to be aligned by looking for SIFT feature points.
  • the image alignment method of the sign points first extracts the SIFT feature point vector of the two images, and finds the nearest neighbor by the Euclidean distance of the vector, thereby obtaining the correspondence between the two images.
  • the SIFT feature points have a great relationship with the gradient direction of the image. That is to say, the image alignment technique based on SIFT feature points largely depends on the consistency of the image structure similar regions in the gradient size direction.
  • the multi-modal multi-spectral image has a large contrast in the gradient direction of the structural similar region. Therefore, the image alignment technique based on SIFT feature points is not suitable for multi-modal multi-spectral images. Align.
  • Embodiments of the present invention provide a method and apparatus for aligning images, which can improve the accuracy of image alignment.
  • a method for aligning images includes: acquiring image information of two images to be aligned, wherein image information of the first image includes coordinates of pixel points in the first image in the selected coordinate system a pixel value of a pixel in the first image, and a pixel value gradient of the pixel in the first image, the image information of the second image includes: a pixel value of the pixel in the second image, and the a pixel value gradient of a pixel point in the second image, wherein the two images are located in the coordinate system; determining a first coordinate offset by using a cross-correlation metric model according to image information of the two images, The first coordinate offset is used to indicate a positional deviation of pixel points to be aligned between the two images in the coordinate system; according to coordinate coordinates of pixel points in the coordinate system in the first image The first coordinate offset amount aligns the two images.
  • the method before determining the first coordinate offset by using the cross-correlation metric model according to the image information of the two images, the method further includes: acquiring the first Image information of the third image, the image information of the third image includes: a pixel value of a pixel point in the third image, and a pixel value gradient of the pixel point in the third image, wherein the third image is located In the coordinate system, the first image and the third image are initial images to be aligned; according to the image information of the initial image, determined by the cross-correlation metric model a coordinate transformation matrix, configured to indicate a spatial positional relationship of pixel points to be aligned between the initial images in the coordinate system; determining a second coordinate offset according to the coordinate transformation matrix, a second coordinate offset is used to indicate a positional deviation of the pixel to be aligned between the initial images in the coordinate system; according to the second coordinate offset and a pixel of a pixel in the third image Value, the second image
  • an apparatus for aligning an image includes: a first acquiring unit, configured to acquire image information of two images to be aligned, wherein image information of the first image includes pixels in the first image a coordinate in the selected coordinate system, a pixel value of the pixel in the first image, and a pixel value gradient of the pixel in the first image, and the image information of the second image includes: a pixel in the second image a pixel value, and a pixel value gradient of the pixel in the second image, wherein the two images are located in the coordinate system; a first determining unit, configured to use image information of the two images, Determining, by the cross-correlation metric model, a first coordinate offset, the first coordinate offset being used to indicate a positional deviation of the pixel points to be aligned between the two images in the coordinate system; And aligning the two images according to coordinates of the pixel points in the coordinate system and the first coordinate offset according to the first image.
  • the device further includes: a second acquiring unit, configured to acquire image information of the third image, where the image information of the third image includes: a pixel value of a pixel in the three image, and a pixel value gradient of the pixel in the third image, wherein the third image is located in the coordinate system, and the first image and the third image are An initial image to be aligned; a second determining unit, configured to determine a coordinate transformation matrix by using the cross-correlation metric model according to the image information of the initial image, where the coordinate transformation matrix is used to indicate that the initial images are to be aligned a spatial positional relationship of the pixel points in the coordinate system; a third determining unit, configured to determine a second coordinate offset according to the coordinate transformation matrix, wherein the second coordinate offset is used to indicate the initial a positional deviation of the pixel to be aligned between the images in the coordinate system; a fourth determining unit, configured to obtain, according to the second coordinate offset and the
  • a cross-correlation metric model is introduced. Since the cross-correlation metric model considers the cross-correlation of color between images and the cross-correlation of gradients at the same time, it is more suitable for multi-modality than the existing image alignment technology based on SIFT feature points. Alignment between spectral images improves the accuracy of image alignment.
  • FIG. 1 is an exemplary diagram of a multimodal multispectral image.
  • Figure 2 is a graph of the function of the robust function.
  • FIG. 3 is a schematic flowchart of a method for aligning images according to an embodiment of the present invention.
  • FIG. 4 is a schematic block diagram of an apparatus for aligning images according to an embodiment of the present invention.
  • FIG. 5 is a schematic block diagram of an apparatus for aligning images according to an embodiment of the present invention.
  • structural similarity metrics include: color, gradient, SIFT feature points, mutual information, and the like.
  • multimodal multispectral images have large contrasts in color and gradient directions, it is difficult to accurately describe the structural similarity between multimodal multispectral images by any of the above structural similarity measures.
  • a cross-correlation metric (also referred to as a robust selective normalized cross-correlation metric) model is introduced to describe structural similarity between images, and the cross-correlation metric model is based on cross-correlation of colors and gradients between images. Correlatedly established, or cross-correlation metric models are used to indicate the cross-correlation of colors and the cross-correlation of gradients between images. It is assumed that the image to be aligned is the first image and the second image, the first image is represented by I 1 and the second image is represented by I 2 , and the cross-correlation metric model can be expressed as a formula:
  • p (x p ,y p ) T
  • w p (u p ,v p ) T
  • p denotes the coordinates of the pixel points of the first image, and the coordinates may be any coordinates selected in advance, as long as the images to be aligned are placed in the coordinate system
  • x p represents the abscissa of p
  • y p represents p
  • w p represents the first coordinate offset
  • u p represents the abscissa of w p
  • v p represents the ordinate of w p
  • I 1,p represents the p-centered image block of the first image, each a one-dimensional column vector composed of pixel values of pixels, In the image block, a one-dimensional column vector composed of pixel value gradients of each pixel point
  • I′ 1, p represents a one-dimensional column vector composed of pixel mean values of each pixel point in the image block
  • a one-dimensional column vector consisting of a pixel value gradient of each pixel point in an image block centered at p+w p , I′ 2,p representing a pixel of each pixel point in an image block centered at p+w p a one-dimensional column vector consisting of mean values,
  • a one-dimensional column vector composed of the mean values of the pixel value gradients of the respective pixels in the image block centered at p+w p , ⁇ is a weight, and is used to control the shape of the function ⁇ (x).
  • ⁇ ⁇ (p, w p ) is a normalized cross-correlation function defining an image patch centered at p in the first image I 1 and p + w p in the second image I 2
  • the color of the center image block is on the color space.
  • Normalized cross-correlation function is, in the first image I 1 tile (Patch) in the center and p is the spatial gradient of the image block to p + w p is defined as the center of the second image I 2.
  • the robust function is introduced in the cross-correlation model.
  • the robust function is a continuous derivable function, and its function image can be seen in Figure 2.
  • the left side in Figure 2 is the function curve of the robust function, and the right side is the function curve of the derivative function of the robust function. It can be seen from Fig. 2 that the robust function is an increasing function with respect to x, but as x increases, the growth rate of the robust function becomes slower and slower, which has a good robust effect.
  • FIG. 3 is a schematic flowchart of a method for aligning images according to an embodiment of the present invention.
  • the method of Figure 3 includes:
  • image information of two images to be aligned where image information of the first image includes coordinates of a pixel in the selected coordinate system in the first image, pixel values of pixels in the first image, and first a pixel value gradient of a pixel in the image, the image information of the second image comprising: a pixel value of the pixel in the second image, and a pixel value gradient of the pixel in the second image, wherein both images are located in the coordinate system.
  • the pixel points in the first image may refer to N pixel points in the first image
  • the pixel points in the second image may refer to N pixels in the second image.
  • the first coordinate offset value may be a concept of a set. Specifically, each of the N pixel points in the first image may correspond to N first coordinate offset values.
  • the coordinates of the pixel points in the first image are p
  • the first coordinate offset corresponding to the p point is w p
  • the step 330 may include: first finding the pixel value x of the pixel point p+w p of the second image, The pixel value y of the pixel point p of the second image is then updated to the pixel value x.
  • the multi-modal multi-spectral image has the characteristics of large color contrast and large gradient and direction contrast.
  • a cross-correlation metric model is introduced, and the cross-correlation metric model considers the cross-correlation of colors between images simultaneously.
  • the cross-correlation of gradients and the existing image alignment technology based on SIFT feature points are more suitable for alignment between multi-modal multi-spectral images, which improves the accuracy of image alignment.
  • the method of FIG. 3 may further include: acquiring image information of the third image, where the image information of the third image includes: a pixel value of the pixel in the third image, and a pixel value gradient of the pixel points in the three images, wherein the third image is located in the coordinate system, and the first image and the third image are initial images to be aligned; according to the image information of the initial image,
  • the cross-correlation metric model is used to determine a coordinate transformation matrix for indicating a spatial positional relationship of pixel points to be aligned between the initial images in the coordinate system; and determining a second coordinate offset according to the coordinate transformation matrix, the second coordinate
  • the offset is used to indicate a positional deviation of the pixel to be aligned between the initial images in the coordinate system; and the second image is obtained according to the second coordinate offset and the pixel value of the pixel in the third image.
  • the first image and the third image are initial images to be aligned, and the embodiment decomposes the alignment of the first image and the third image into two alignments, first performing global alignment, and then performing pixel-level alignment. Among them, after global alignment, the third image will be updated to the second image. That is, the second image is an intermediate image generated during the alignment of the first image and the third image.
  • the global alignment of the above image is implemented by solving a coordinate transformation matrix, which may be a homography matrix, which can be used to describe the third image undergoing global translation and rotation. And zooming is roughly aligned with the first image.
  • a coordinate transformation matrix which may be a homography matrix, which can be used to describe the third image undergoing global translation and rotation. And zooming is roughly aligned with the first image.
  • a one-dimensional column vector consisting of a pixel value gradient of each pixel point in an image block centered at p+w p , I′ 3,p representing a pixel of each pixel point in an image block centered at p+w p a one-dimensional column vector consisting of mean values,
  • a one-dimensional column vector consisting of the mean of the pixel value gradients of each pixel in the image block centered at p+w p , ⁇ and ⁇ are constant, ⁇ is used to control the shape of the function ⁇ (x), and ⁇ is E 2 (p, w p ) The weight of the item.
  • the image pyramid method can be used to gradually optimize H. Specifically, it is quickly solved from the bottom of the image pyramid (the bottom layer has the lowest resolution), then the results are passed back to the upper layer to continue optimization, and finally optimized at the top of the pyramid with the highest resolution. This optimization strategy can significantly increase the speed of the algorithm.
  • the second coordinate offset value corresponding to the pixel point (u p , v p is calculated by substituting the coordinates (x p , y p ) of each pixel point in the first image into the above formula. ).
  • I 2 (p) represents the pixel value of the second image at p
  • I 3 (p+w p ) represents the pixel value of the third image at p+w p .
  • a one-dimensional column vector consisting of a pixel value gradient of each pixel point in an image block centered at p+w' p , I' 2,p represents an image block centered at p+w' p , each pixel point a one-dimensional column vector consisting of pixel mean values, Represents image block to p + w 'p centered, one-dimensional column vector the mean pixel value gradient of each pixel consisting, ⁇ 1, ⁇ , ⁇ 2, and ⁇ are constants, ⁇ 1 and ⁇ 2 to E 3
  • the weight of the second and third terms in (w' p ), ⁇ is used to control the shape of the function ⁇ (x), and ⁇ is in E 2 (p, w' p )
  • the weight of the item, N(p) represents the set of adjacent pixels of the pixel p in the first image, q represents any pixel in the set, w q represents the pixel to be aligned of q and q in the second image
  • the first item in The alignment of the first image and the second image can be performed under the constraint of the cross-correlation metric model, the second item And the third item It is a regular term that can constrain the offset between pixels w'p to be smooth.
  • the second term ensures that the offset between the pixels w'p is smooth and the slice is smooth, wherein Is a robust function, ⁇ is a small constant and can go to 1E-4.
  • the third item is the median filter, for increasing w 'p smoothness while allowing to solve w' to improve the accuracy of p.
  • the solution of the energy function is a variational problem, which can be solved by the Euler-Lagrangian equation.
  • a solution process from coarse to fine can be used.
  • the Gaussian pyramid of the first image and the second image may be first established, starting from the roughest layer of the Gaussian pyramid, and then the result of the coarse layer is transmitted to the fine layer, and the initial value of the fine layer is continuously solved, and it is known. Pass to the most refined layer (ie the original image).
  • the solution strategy can significantly improve the speed of the algorithm, and can accurately solve the case where the w'p is large.
  • the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
  • the implementation process constitutes any limitation.
  • FIGS. 1 through 3 A method of aligning images according to an embodiment of the present invention is described in detail above with reference to FIGS. 1 through 3, and an apparatus for aligning images according to an embodiment of the present invention will be described below with reference to FIGS. 4 through 5.
  • FIGS. 4 and 5 can implement the various steps in FIG. 3, and to avoid repetition, it will not be described in detail herein.
  • FIG. 4 is a schematic block diagram of an apparatus for aligning images according to an embodiment of the present invention.
  • the apparatus 400 of Figure 4 includes:
  • the first acquiring unit 410 is configured to acquire image information of two images to be aligned, where the image information of the first image includes coordinates of the pixel points in the first image in the selected coordinate system, the first image a pixel value of the pixel in the pixel, and a pixel value gradient of the pixel in the first image, the image information of the second image includes: a pixel value of the pixel in the second image, and a pixel in the second image a pixel value gradient, wherein the two images are both located in the coordinate system;
  • a first determining unit 420 configured to determine, according to image information of the two images, a first coordinate offset by using a cross-correlation metric model, where the first coordinate offset is used to indicate that the two images are to be Positional deviation of aligned pixel points in the coordinate system;
  • the aligning unit 430 is configured to align the two images according to coordinates of the pixel points in the coordinate system and the first coordinate offset in the first image.
  • a cross-correlation metric model is introduced. Since the cross-correlation metric model considers the cross-correlation of color between images and the cross-correlation of gradients at the same time, it is more suitable for multi-modality than the existing image alignment technology based on SIFT feature points. Alignment between spectral images improves the accuracy of image alignment.
  • the apparatus 400 may further include: a second acquiring unit, configured to acquire image information of the third image, where the image information of the third image includes: a pixel point in the third image a pixel value, and a pixel value gradient of the pixel in the third image, wherein the third image is in the coordinate system, and the first image and the third image are initial images to be aligned a second determining unit, configured to determine, according to the image information of the initial image, a coordinate transformation matrix by using the cross-correlation metric model, where the coordinate transformation matrix is used to indicate that a pixel point to be aligned between the initial images is in a a spatial positional relationship in the coordinate system; a third determining unit, configured to determine a second coordinate offset according to the coordinate transformation matrix, wherein the second coordinate offset is used to indicate that the initial image is to be aligned a positional deviation of the pixel in the coordinate system; a fourth determining unit, configured to obtain the second image according to the second coordinate offset and the pixel
  • FIG. 5 is a schematic block diagram of an apparatus for aligning images according to an embodiment of the present invention.
  • the apparatus 500 of Figure 5 includes:
  • a memory 510 configured to store a program
  • a processor 520 configured to: when the program is executed, the processor 520 is configured to acquire image information of two images to be aligned, where image information of the first image is included in the first image a coordinate of the pixel in the selected coordinate system, a pixel value of the pixel in the first image, and a pixel value gradient of the pixel in the first image, and the image information of the second image includes: the second image a pixel value of a pixel in the pixel, and a pixel value gradient of the pixel in the second image, wherein the two images are both located in the coordinate system; according to image information of the two images, by cross-correlation metric a first coordinate offset is used to indicate a positional deviation of a pixel point to be aligned between the two images in the coordinate system; according to the pixel in the first image The coordinates of the point in the coordinate system and the first coordinate offset amount align the two images.
  • a cross-correlation metric model is introduced. Since the cross-correlation metric model considers the cross-correlation of color between images and the cross-correlation of gradients at the same time, it is more suitable for multi-modality than the existing image alignment technology based on SIFT feature points. Alignment between spectral images improves the accuracy of image alignment.
  • the processor 520 is further configured to acquire image information of a third image, where the image information of the third image includes: a pixel value of a pixel in the third image, and the a pixel value gradient of a pixel point in the third image, wherein the third image is located in the coordinate system, and the first image and the third image are initial images to be aligned; according to the initial image Image information, by using the cross-correlation metric model, determining a coordinate transformation matrix, wherein the coordinate transformation matrix is used to indicate a spatial positional relationship of pixel points to be aligned between the initial images in the coordinate system; a matrix, the second coordinate offset is used to indicate a positional deviation of the pixel to be aligned between the initial images in the coordinate system; according to the second coordinate offset And the pixel value of the pixel in the third image, The second image is described.
  • the term "and/or” is merely an association relationship describing an associated object, indicating that there may be three relationships.
  • a and/or B may indicate that A exists separately, and A and B exist simultaneously, and B cases exist alone.
  • the character "/" in this article generally indicates that the contextual object is an "or" relationship.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Abstract

本发明实施例公开了一种对齐图像的方法和装置,该方法包括:获取待对齐的两个图像的图像信息;根据该两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量,该第一坐标偏移量用于指示该两个图像间待对齐的像素点在该坐标系中的位置偏差;根据该第一图像中像素点在该坐标系中的坐标和该第一坐标偏移量,对齐该两个图像。本发明实施例中引入了互相关度量模型,由于互相关度量模型同时考虑图像间颜色的互相关和梯度的互相关,与现有的基于SIFT特征点的图像对齐技术,更适合多模态多光谱图像间的对齐,提高了图像对齐的准确性。

Description

对齐图像的方法和装置
本申请要求于2014年09月05日提交中国专利局、申请号为201410452309.4、发明名称为“对齐图像的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及图像处理领域,并且更具体地,涉及一种对齐图像的方法和装置。
背景技术
图像对齐技术是图像处理领域的基础技术。随着数字图像的快速发展,出现了一系列基于图像对齐技术的应用。这些应用包括全景图的生成,高动态图的生成,两张图像的信息融合等,例如,用红外图像修复彩色图像、用带噪声的图像去除另一张彩色图的模糊等。
随着各种图像采集设备的蓬勃发展,多模态多光谱图像的对齐成为了一个新的问题,这些多模态多光谱图像包括近红外图像、彩图图像、深度图像、核磁共振图像以及超声图像等。采集设备的不同以及采集场景的动态性会导致采集到的图像存在很大差异。图1示出了4组常见的多模态多光谱图像,从左到右:第1组为不同曝光度的图像,第2组为彩色和深度图像,第3组为彩色和近红外图像,第4组为开闪光灯和不开闪光灯的图像。从图1中可以看出,多模态多光谱图像间主要存在以下的差别:
·图像间颜色反差大;
·图像间梯度大小和方向的反差大。
传统的基于SIFT(尺度不变特征变换,Scale-invariant Feature Transform)特征点的对齐技术在图像对齐领域具有广泛的应用。具体而言,该技术通过找SIFT特征点对需要对齐的图像进行匹配。以两张图像为例,基于SIFT特 征点的图像对齐方法首先提取两张图像的SIFT特征点向量,通过向量的欧式距离来寻找最近邻,从而得到两张图像间的对应关系。但是,SIFT特征点与图像的梯度大小方向有很大关系,也就是说,基于SIFT特征点的图像对齐技术很大程度上依赖图像结构相似区域在梯度大小方向的一致性。但是,从图1可以看出,多模态多光谱图像在结构相似区域的梯度方向,是存在较大反差的,因此,基于SIFT特征点的图像对齐技术不适用于多模态多光谱图像的对齐。
发明内容
本发明实施例提供了一种对齐图像的方法和装置,能够提高图像对齐的准确性。
第一方面,提供一种对齐图像的方法,包括:获取待对齐的两个图像的图像信息,其中,第一图像的图像信息包括所述第一图像中像素点在选取的坐标系中的坐标,所述第一图像中像素点的像素值,以及所述第一图像中像素点的像素值梯度,第二图像的图像信息包括:所述第二图像中像素点的像素值,以及所述第二图像中像素点的像素值梯度,其中,所述两个图像均位于所述坐标系中;根据所述两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量,所述第一坐标偏移量用于指示所述两个图像间待对齐的像素点在所述坐标系中的位置偏差;根据所述第一图像中像素点在所述坐标系中的坐标和所述第一坐标偏移量,对齐所述两个图像。
结合第一方面,在第一方面的一种实现方式中,在根据所述两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量之前,所述方法还包括:获取第三图像的图像信息,所述第三图像的图像信息包括:所述第三图像中像素点的像素值,以及所述第三图像中像素点的像素值梯度,其中,所述第三图像位于所述坐标系中,且所述第一图像和所述第三图像为待对齐的初始图像;根据所述初始图像的图像信息,通过所述互相关度量模型,确定 坐标变换矩阵,所述坐标变换矩阵用于指示所述初始图像间待对齐的像素点在所述坐标系中的空间位置关系;根据所述坐标变换矩阵,确定第二坐标偏移量,所述第二坐标偏移量用于指示所述初始图像间的待对齐的像素点在所述坐标系中的位置偏差;根据所述第二坐标偏移量和所述第三图像中像素点的像素值,得到所述第二图像。
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述根据所述初始图像的图像信息,通过所述互相关度量模型,确定坐标变换矩阵,包括:通过计算
Figure PCTCN2015075823-appb-000001
的最小值,确定所述坐标变换矩阵,其中,
Figure PCTCN2015075823-appb-000002
Figure PCTCN2015075823-appb-000003
Figure PCTCN2015075823-appb-000004
p=(xp,yp)T,wp=(up,vp)T,H表示所述坐标变换矩阵,且H满足[up,vp,1]T=[xp,yp,1]T(H-I),I表示单位矩阵,p表示所述第一图像中像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示所述第二坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000005
表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000006
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I3,p表示所述第三图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000007
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I′3,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000008
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β和τ为常数,β用于控制 函数ρ(x)的形状,τ为E2(p,wp)中
Figure PCTCN2015075823-appb-000009
项的权重。
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述根据所述坐标变换矩阵,确定第二坐标偏移量,包括:根据公式[up,vp,1]T=[xp,yp,1]T(H-I),确定所述第二坐标偏移量。
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述根据所述第二坐标偏移量和所述第三图像中像素点的像素值,得到所述第二图像,包括:根据公式I2(p)=I3(p+wp),得到所述第二图像,其中,I2(p)表示所述第二图像在p的像素值,I3(p+wp)表示所述第三图像在p+wp的像素值。
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述根据所述两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量,包括:根据公式
Figure PCTCN2015075823-appb-000010
确定所述第一坐标偏移量,其中,
Figure PCTCN2015075823-appb-000011
Figure PCTCN2015075823-appb-000012
p=(xp,yp)T,w'p=(u'p,v'p)T
Figure PCTCN2015075823-appb-000013
p表示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,w'p表示所述第一坐标偏移量,u'p表示w'p的横坐标,v'p表示w'p的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000014
表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000015
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+w'p为中心的图像块内,各像素点的像素值 组成的一维列向量,
Figure PCTCN2015075823-appb-000016
表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示所述以p+w'p为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000017
表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,λ1、β、λ2和τ为常数,λ1和λ2为E3(w'p)中第二项和第三项的权重,β用于控制函数ρ(x)的形状,τ为E2(p,w'p)中
Figure PCTCN2015075823-appb-000018
项的权重,N(p)表示所述第一图像中像素点p的相邻像素点组成的集合,q表示所述集合中的任意像素点,wq表示q与q在所述第二图像中的待对齐像素点之间的坐标偏移量,ε为常数。
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述互相关度量模型为:
Figure PCTCN2015075823-appb-000019
其中,
Figure PCTCN2015075823-appb-000020
p=(xp,yp)T,wp=(up,vp)T
Figure PCTCN2015075823-appb-000021
p表示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示所述第一坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000022
所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000023
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000024
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000025
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β为权重,用于控制函数ρ(x)的形 状。
第二方面,提供一种对齐图像的装置,包括:第一获取单元,用于获取待对齐的两个图像的图像信息,其中,第一图像的图像信息包括所述第一图像中像素点在选取的坐标系中的坐标,所述第一图像中像素点的像素值,以及所述第一图像中像素点的像素值梯度,第二图像的图像信息包括:所述第二图像中像素点的像素值,以及所述第二图像中像素点的像素值梯度,其中,所述两个图像均位于所述坐标系中;第一确定单元,用于根据所述两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量,所述第一坐标偏移量用于指示所述两个图像间待对齐的像素点在所述坐标系中的位置偏差;对齐单元,用于根据所述第一图像中像素点在所述坐标系中的坐标和所述第一坐标偏移量,对齐所述两个图像。
结合第二方面,在第二方面的一种实现方式中,所述装置还包括:第二获取单元,用于获取第三图像的图像信息,所述第三图像的图像信息包括:所述第三图像中像素点的像素值,以及所述第三图像中像素点的像素值梯度,其中,所述第三图像位于所述坐标系中,且所述第一图像和所述第三图像为待对齐的初始图像;第二确定单元,用于根据所述初始图像的图像信息,通过所述互相关度量模型,确定坐标变换矩阵,所述坐标变换矩阵用于指示所述初始图像间待对齐的像素点在所述坐标系中的空间位置关系;第三确定单元,用于根据所述坐标变换矩阵,确定第二坐标偏移量,所述第二坐标偏移量用于指示所述初始图像间的待对齐的像素点在所述坐标系中的位置偏差;第四确定单元,用于根据所述第二坐标偏移量和所述第三图像中像素点的像素值,得到所述第二图像。
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方式中,所述第二确定单元具体用于通过计算
Figure PCTCN2015075823-appb-000026
的最小值,确定所述坐标变换矩阵,其中,
Figure PCTCN2015075823-appb-000027
Figure PCTCN2015075823-appb-000028
Figure PCTCN2015075823-appb-000029
p=(xp,yp)T,wp=(up,vp)T,H表示所述坐标变换矩阵,且H满足[up,vp,1]T=[xp,yp,1]T(H-I),I表示单位矩阵,p表示所述第一图像中像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示所述第二坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000030
表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000031
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I3,p表示所述第三图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000032
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I′3,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000033
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β和τ为常数,β用于控制函数ρ(x)的形状,τ为E2(p,wp)中
Figure PCTCN2015075823-appb-000034
项的权重。
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方式中,所述第三确定单元具体用于根据公式[up,vp,1]T=[xp,yp,1]T(H-I),确定所述第二坐标偏移量。
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方式中,所述第四确定单元具体用于根据公式I2(p)=I3(p+wp),得到所述第二图像,其中,I2(p)表示所述第二图像在p的像素值,I3(p+wp)表示所述第三图像在p+wp的像素值。
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方 式中,所述第一确定单元具体用于根据公式
Figure PCTCN2015075823-appb-000035
确定所述第一坐标偏移量,其中,
Figure PCTCN2015075823-appb-000036
Figure PCTCN2015075823-appb-000037
p=(xp,yp)T,w'p=(u'p,v'p)T
Figure PCTCN2015075823-appb-000038
p表示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,w'p表示所述第一坐标偏移量,u'p表示w'p的横坐标,v'p表示w'p的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000039
表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000040
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+w'p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000041
表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示所述以p+w'p为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000042
表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,λ1、β、λ2和τ为常数,λ1和λ2为E3(w'p)中第二项和第三项的权重,β用于控制函数ρ(x)的形状,τ为E2(p,w'p)中
Figure PCTCN2015075823-appb-000043
项的权重,N(p)表示所述第一图像中像素点p的相邻像素点组成的集合,q表示所述集合中的任意像素点,wq表示q与q在所述第二图像中的待对齐像素点之间的坐标偏移量,ε为常数。
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方式中,所述互相关度量模型为:
Figure PCTCN2015075823-appb-000044
其中,
Figure PCTCN2015075823-appb-000045
p=(xp,yp)T,wp=(up,vp)T
Figure PCTCN2015075823-appb-000046
p表示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示所述第一坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000047
所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000048
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000049
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000050
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β为权重,用于控制函数ρ(x)的形状。
本发明实施例中引入了互相关度量模型,由于互相关度量模型同时考虑图像间颜色的互相关和梯度的互相关,与现有的基于SIFT特征点的图像对齐技术,更适合多模态多光谱图像间的对齐,提高了图像对齐的准确性。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是多模态多光谱图像的示例图。
图2是鲁棒函数的函数曲线图。
图3是本发明实施例的对齐图像的方法的示意性流程图。
图4是本发明实施例的对齐图像的装置的示意性框图。
图5是本发明实施例的对齐图像的装置的示意性框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。
图像对齐领域,图像间的结构相似性度量的选取直接关系到最终图像对齐的效果。现有技术中,结构相似性度量包括:颜色、梯度、SIFT特征点、互信息等。但是,由于多模态多光谱图像在颜色和梯度方向上具有较大反差,以上任意一种结构相似性度量都很难准确描述多模态多光谱图像之间的结构相似性。
本发明实施例中引入互相关度量(也可以称为鲁棒选择性标准化互相关度量)模型来描述图像间的结构相似性,该互相关度量模型是基于图像间颜色的互相关和梯度的互相关建立的,或者说,互相关度量模型用于指示图像间颜色的互相关和梯度的互相关。假设待对齐的图像为第一图像和第二图像,第一图像用I1表示,第二图像用I2表示,互相关度量模型可以表示为公式:
Figure PCTCN2015075823-appb-000051
其中,
Figure PCTCN2015075823-appb-000052
p=(xp,yp)T,wp=(up,vp)T
Figure PCTCN2015075823-appb-000053
p表示第一图像的像素点的坐标,该坐标可以是预先选取的任意坐标,只要将待对齐的图像均放 置在该坐标系中即可,xp表示p的横坐标,yp表示p的纵坐标,wp表示第一坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000054
图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000055
表示图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示第二图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000056
表示以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000057
表示以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β为权重,用于控制函数ρ(x)的形状。
在上述公式中,ΦΙ(p,wp)是标准化互相关函数,定义在第一图像I1中以p为中心的图像块(patch)和第二图像I2中以p+wp为中心的图像块的颜色空间上。同理,
Figure PCTCN2015075823-appb-000058
也是标准化互相关函数,定义在第一图像I1中以p为中心的图像块(patch)和第二图像I2中以p+wp为中心的图像块的梯度空间上。
此外,互相关模型中引入鲁棒函数
Figure PCTCN2015075823-appb-000059
该鲁棒函数是连续可导函数,其函数图像可参见图2。图2中的左侧为鲁棒函数的函数曲线,右侧为鲁棒函数的导函数的函数曲线。从图2可以看出,该鲁棒函数是关于x的增函数,但随着x的增大,该鲁棒函数的增长速度越来越慢,起到了很好的鲁棒效果。
下面结合图3,详细描述本发明实施例的对齐图像的方法。
图3是本发明实施例的对齐图像的方法的示意性流程图。图3的方法包括:
310、获取待对齐的两个图像的图像信息,其中,第一图像的图像信息包括第一图像中像素点在选取的坐标系中的坐标,第一图像中像素点的像素值,以及第一图像中像素点的像素值梯度,第二图像的图像信息包括:第二图像中像素点的像素值,以及第二图像中像素点的像素值梯度,其中,两个图像均位于坐标系中。
320、根据两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量,第一坐标偏移量用于指示两个图像间待对齐的像素点在坐标系中的位置偏差。
需要说明的是,假设第一图像和第二图像均具有N个像素点,上述第一图像中的像素点可指第一图像中的N个像素点,上述第二图像中的像素点可指第二图像中的N个像素点。上述第一坐标偏移值可以是集合的概念,具体地,第一图像中的N个像素点中各像素点可对应N个第一坐标偏移值。
330、根据第一图像中像素点在坐标系中的坐标和第一坐标偏移量,对齐两个图像。
例如,第一图像中的像素点的坐标为p,p点对应的第一坐标偏移量为wp,步骤330可包括:先找到第二图像的像素点p+wp的像素值x,然后将第二图像的像素点p的像素值y更新为像素值x。
由上可知,多模态多光谱的图像具有颜色反差大和梯度大小和方向反差大的特点,本发明实施例中引入了互相关度量模型,由于互相关度量模型同时考虑图像间颜色的互相关和梯度的互相关,与现有的基于SIFT特征点的图像对齐技术,更适合多模态多光谱图像间的对齐,提高了图像对齐的准确性。
可选地,作为一个实施例,在步骤320之前,图3的方法还可包括:获取第三图像的图像信息,第三图像的图像信息包括:第三图像中像素点的像素值,以及第三图像中像素点的像素值梯度,其中,第三图像位于坐标系中,且第一图像和第三图像为待对齐的初始图像;根据初始图像的图像信息,通 过互相关度量模型,确定坐标变换矩阵,坐标变换矩阵用于指示初始图像间待对齐的像素点在坐标系中的空间位置关系;根据坐标变换矩阵,确定第二坐标偏移量,第二坐标偏移量用于指示初始图像间的待对齐的像素点在坐标系中的位置偏差;根据第二坐标偏移量和第三图像中像素点的像素值,得到第二图像。
可以这样理解,第一图像和第三图像是待对齐的初始图像,本实施例将第一图像和第三图像的对齐分解成两次对齐,先进行一次全局对齐,再进行一次像素级对齐,其中,经过全局对齐,第三图像会被更新成为第二图像。也就是说,第二图像是第一图像和第三图像对齐过程中生成的中间图像。
需要说明的是,上述图像的全局对齐是通过求解坐标变换矩阵来实现的,上述坐标变换矩阵可以是一个单应性(Homography)矩阵,该坐标变换矩阵可用来描述第三图像经过全局平移、旋转和缩放与第一图像进行大体对齐。
下面给出坐标变换矩阵的求解过程的实施例。
该坐标变换矩阵可通过计算能量函数
Figure PCTCN2015075823-appb-000060
的最小值求解,其中,
Figure PCTCN2015075823-appb-000061
Figure PCTCN2015075823-appb-000062
Figure PCTCN2015075823-appb-000063
p=(xp,yp)T,wp=(up,vp)T,H表示坐标变换矩阵,且H满足[up,vp,1]T=[xp,yp,1]T(H-I),I表示单位矩阵,p表示第一图像中像素点在坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示第二坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000064
表示图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000065
表示图像块内,各像素点的像素值 梯度的均值组成的一维列向量,I3,p表示第三图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000066
表示以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I′3,p表示以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000067
表示以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β和τ为常数,β用于控制函数ρ(x)的形状,τ为E2(p,wp)中
Figure PCTCN2015075823-appb-000068
项的权重。
需要说明的是,
Figure PCTCN2015075823-appb-000069
中,由于H满足[up,vp,1]T=[xp,yp,1]T(H-I),先将wp替换为H,然后可以采用最速下降法求解该方程的最小值。为了进一步提高算法的效率,可以采用图像金字塔法逐步优化H。具体而言,先从图像金字塔的底层(底层具有最低分辨率)快速求解,然后将结果传回上层继续优化,最后在分辨率最高的金字塔顶层进行优化。这种优化策略能够显著提高算法的运行速度。
得到坐标变化矩阵之后,上述根据坐标变换矩阵,确定第二坐标偏移量可包括:根据公式[up,vp,1]T=[xp,yp,1]T(H-I),确定第二坐标偏移量。
具体地,当确定了H之后,通过将第一图像中各像素点的坐标(xp,yp)代入上式,计算出该像素点对应的第二坐标偏移值(up,vp)。
得到第二坐标偏移值之后,根据公式I2(p)=I3(p+wp),得到第二图像,其中,I2(p)表示第二图像在p的像素值,I3(p+wp)表示第三图像在p+wp的像素值。此时,就得到了上述第二图像。
完成图像的全局对齐后,接下来可以进行像素级的对齐。具体而言,可根据公式
Figure PCTCN2015075823-appb-000070
确定第一坐标偏移量,其中,
Figure PCTCN2015075823-appb-000071
Figure PCTCN2015075823-appb-000072
p=(xp,yp)T,w'p=(u'p,v'p)T
Figure PCTCN2015075823-appb-000073
p表示第一图像的像素点在坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,w'p表示第一坐标偏移量,u'p表示w'p的横坐标,v'p表示w'p的纵坐标,I1,p表示第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000074
表示图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000075
表示图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示第二图像的以p+w'p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000076
表示以p+w'p为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示以p+w'p为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000077
表示以p+w'p为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,λ1、β、λ2和τ为常数,λ1和λ2为E3(w'p)中第二项和第三项的权重,β用于控制函数ρ(x)的形状,τ为E2(p,w'p)中
Figure PCTCN2015075823-appb-000078
项的权重,N(p)表示第一图像中像素点p的相邻像素点组成的集合,q表示集合中的任意像素点,wq表示q与q在第二图像中的待对齐像素点之间的坐标偏移量,ε为常数。
具体地,
Figure PCTCN2015075823-appb-000079
中的第一项
Figure PCTCN2015075823-appb-000080
可以让第一图像和第二图像的对齐是在互相关度量模型的约束下进行,第二项
Figure PCTCN2015075823-appb-000081
和第三项
Figure PCTCN2015075823-appb-000082
是正则项,可以约束像素间的偏移量w'p是平滑的。第二项可以保证像素间的偏移量w'p是分片平滑的,其中,
Figure PCTCN2015075823-appb-000083
是鲁棒函数,ε是较小的常数,可以去1E-4。第三项是中值滤波项,用于提高w'p的平滑性,同时使得求解w'p的精确性提高。
此外,该能量函数的求解是一个变分问题,可以采用欧拉-拉格朗日方程求解。为了加速求解,可以采用从粗糙到精细的求解过程。具体而言,可 以先建立第一图像和第二图像的高斯金字塔,从高斯金字塔的最粗糙层开始求解,接下来将粗糙层的结果传递至精细层,作为精细层的初值继续求解,知道传递至最精层(即原图)。该求解策略可以显著提高算法的运行速度,同时能够精确求解w'p较大的情况。
应理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
上文中结合图1至图3,详细描述了根据本发明实施例的对齐图像的方法,下面将结合图4至图5,描述根据本发明实施例的对齐图像的装置。
应理解,图4和图5中的装置能够实现图3中的各个步骤,为避免重复,此处不再详述。
图4是本发明实施例的对齐图像的装置的示意性框图。图4的装置400包括:
第一获取单元410,用于获取待对齐的两个图像的图像信息,其中,第一图像的图像信息包括所述第一图像中像素点在选取的坐标系中的坐标,所述第一图像中像素点的像素值,以及所述第一图像中像素点的像素值梯度,第二图像的图像信息包括:所述第二图像中像素点的像素值,以及所述第二图像中像素点的像素值梯度,其中,所述两个图像均位于所述坐标系中;
第一确定单元420,用于根据所述两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量,所述第一坐标偏移量用于指示所述两个图像间待对齐的像素点在所述坐标系中的位置偏差;
对齐单元430,用于根据所述第一图像中像素点在所述坐标系中的坐标和所述第一坐标偏移量,对齐所述两个图像。
本发明实施例中引入了互相关度量模型,由于互相关度量模型同时考虑图像间颜色的互相关和梯度的互相关,与现有的基于SIFT特征点的图像对齐技术,更适合多模态多光谱图像间的对齐,提高了图像对齐的准确性。
可选地,作为一个实施例,所述装置400还可包括:第二获取单元,用于获取第三图像的图像信息,所述第三图像的图像信息包括:所述第三图像中像素点的像素值,以及所述第三图像中像素点的像素值梯度,其中,所述第三图像位于所述坐标系中,且所述第一图像和所述第三图像为待对齐的初始图像;第二确定单元,用于根据所述初始图像的图像信息,通过所述互相关度量模型,确定坐标变换矩阵,所述坐标变换矩阵用于指示所述初始图像间待对齐的像素点在所述坐标系中的空间位置关系;第三确定单元,用于根据所述坐标变换矩阵,确定第二坐标偏移量,所述第二坐标偏移量用于指示所述初始图像间的待对齐的像素点在所述坐标系中的位置偏差;第四确定单元,用于根据所述第二坐标偏移量和所述第三图像中像素点的像素值,得到所述第二图像。
可选地,作为一个实施例,所述第二确定单元具体用于通过计算
Figure PCTCN2015075823-appb-000084
的最小值,确定所述坐标变换矩阵,其中,
Figure PCTCN2015075823-appb-000085
Figure PCTCN2015075823-appb-000086
p=(xp,yp)T,wp=(up,vp)T,H表示所述坐标变换矩阵,且H满足[up,vp,1]T=[xp,yp,1]T(H-I),I表示单位矩阵,p表示所述第一图像中像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示所述第二坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000087
表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000088
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I3,p表示所述第三图像的以p+wp为中心的图像块 内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000089
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I′3,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000090
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β和τ为常数,β用于控制函数ρ(x)的形状,τ为E2(p,wp)中
Figure PCTCN2015075823-appb-000091
项的权重。
可选地,作为一个实施例,所述第三确定单元具体用于根据公式[up,vp,1]T=[xp,yp,1]T(H-I),确定所述第二坐标偏移量。
可选地,作为一个实施例,所述第四确定单元具体用于根据公式I2(p)=I3(p+wp),得到所述第二图像,其中,I2(p)表示所述第二图像在p的像素值,I3(p+wp)表示所述第三图像在p+wp的像素值。
可选地,作为一个实施例,所述第一确定单元420具体用于根据公式
Figure PCTCN2015075823-appb-000092
确定所述第一坐标偏移量,其中,
Figure PCTCN2015075823-appb-000093
Figure PCTCN2015075823-appb-000094
p=(xp,yp)T,w'p=(u'p,v'p)T
Figure PCTCN2015075823-appb-000095
p表示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,w'p表示所述第一坐标偏移量,u'p表示w'p的横坐标,v'p表示w'p的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000096
表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000097
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+w'p为中心的图像块内,各像素点的像素值 组成的一维列向量,
Figure PCTCN2015075823-appb-000098
表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示所述以p+w'p为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000099
表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,λ1、β、λ2和τ为常数,λ1和λ2为E3(w'p)中第二项和第三项的权重,β用于控制函数ρ(x)的形状,τ为E2(p,w'p)中
Figure PCTCN2015075823-appb-000100
项的权重,N(p)表示所述第一图像中像素点p的相邻像素点组成的集合,q表示所述集合中的任意像素点,wq表示q与q在所述第二图像中的待对齐像素点之间的坐标偏移量,ε为常数。
可选地,作为一个实施例,所述互相关度量模型为:
Figure PCTCN2015075823-appb-000101
其中,
Figure PCTCN2015075823-appb-000102
p=(xp,yp)T,wp=(up,vp)T
Figure PCTCN2015075823-appb-000103
p表示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示所述第一坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000104
所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000105
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000106
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000107
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β为权重,用于控制函数ρ(x)的形 状。
图5是本发明实施例的对齐图像的装置的示意性框图。图5的装置500包括:
存储器510,用于存储程序;
处理器520,用于执行程序,当所述程序被执行时,所述处理器520用于获取待对齐的两个图像的图像信息,其中,第一图像的图像信息包括所述第一图像中像素点在选取的坐标系中的坐标,所述第一图像中像素点的像素值,以及所述第一图像中像素点的像素值梯度,第二图像的图像信息包括:所述第二图像中像素点的像素值,以及所述第二图像中像素点的像素值梯度,其中,所述两个图像均位于所述坐标系中;根据所述两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量,所述第一坐标偏移量用于指示所述两个图像间待对齐的像素点在所述坐标系中的位置偏差;根据所述第一图像中像素点在所述坐标系中的坐标和所述第一坐标偏移量,对齐所述两个图像。
本发明实施例中引入了互相关度量模型,由于互相关度量模型同时考虑图像间颜色的互相关和梯度的互相关,与现有的基于SIFT特征点的图像对齐技术,更适合多模态多光谱图像间的对齐,提高了图像对齐的准确性。
可选地,作为一个实施例,所述处理器520还可用于获取第三图像的图像信息,所述第三图像的图像信息包括:所述第三图像中像素点的像素值,以及所述第三图像中像素点的像素值梯度,其中,所述第三图像位于所述坐标系中,且所述第一图像和所述第三图像为待对齐的初始图像;根据所述初始图像的图像信息,通过所述互相关度量模型,确定坐标变换矩阵,所述坐标变换矩阵用于指示所述初始图像间待对齐的像素点在所述坐标系中的空间位置关系;根据所述坐标变换矩阵,确定第二坐标偏移量,所述第二坐标偏移量用于指示所述初始图像间的待对齐的像素点在所述坐标系中的位置偏差;根据所述第二坐标偏移量和所述第三图像中像素点的像素值,得到所 述第二图像。
可选地,作为一个实施例,所述处理器520具体用于通过计算
Figure PCTCN2015075823-appb-000108
的最小值,确定所述坐标变换矩阵,其中,
Figure PCTCN2015075823-appb-000109
Figure PCTCN2015075823-appb-000110
p=(xp,yp)T,wp=(up,vp)T,H表示所述坐标变换矩阵,且H满足[up,vp,1]T=[xp,yp,1]T(H-I),I表示单位矩阵,p表示所述第一图像中像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示所述第二坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000111
表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000112
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I3,p表示所述第三图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000113
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I′3,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000114
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β和τ为常数,β用于控制函数ρ(x)的形状,τ为E2(p,wp)中
Figure PCTCN2015075823-appb-000115
项的权重。
可选地,作为一个实施例,所述处理器520具体用于根据公式[up,vp,1]T=[xp,yp,1]T(H-I),确定所述第二坐标偏移量。
可选地,作为一个实施例,所述处理器520具体用于根据公式I2(p)=I3(p+wp),得到所述第二图像,其中,I2(p)表示所述第二图像在p的 像素值,I3(p+wp)表示所述第三图像在p+wp的像素值。
可选地,作为一个实施例,所述处理器520具体用于根据公式
Figure PCTCN2015075823-appb-000116
确定所述第一坐标偏移量,其中,
Figure PCTCN2015075823-appb-000117
Figure PCTCN2015075823-appb-000118
p=(xp,yp)T,w'p=(u'p,v'p)T
Figure PCTCN2015075823-appb-000119
p表示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,w'p表示所述第一坐标偏移量,u'p表示w'p的横坐标,v'p表示w'p的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000120
表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000121
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+w'p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000122
表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示所述以p+w'p为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000123
表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,λ1、β、λ2和τ为常数,λ1和λ2为E3(w'p)中第二项和第三项的权重,β用于控制函数ρ(x)的形状,τ为E2(p,w'p)中
Figure PCTCN2015075823-appb-000124
项的权重,N(p)表示所述第一图像中像素点p的相邻像素点组成的集合,q表示所述集合中的任意像素点,wq表示q与q在所述第二图像中的待对齐像素点之间的坐标偏移量,ε为常数。
可选地,作为一个实施例,其特征在于,所述互相关度量模型为:
Figure PCTCN2015075823-appb-000125
其中,
Figure PCTCN2015075823-appb-000126
p=(xp,yp)T,wp=(up,vp)T
Figure PCTCN2015075823-appb-000127
p表示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示所述第一坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000128
所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000129
表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
Figure PCTCN2015075823-appb-000130
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
Figure PCTCN2015075823-appb-000131
表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β为权重,用于控制函数ρ(x)的形状。
应理解,在本发明实施例中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个 特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部 分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (14)

  1. 一种对齐图像的方法,其特征在于,包括:
    获取待对齐的两个图像的图像信息,其中,第一图像的图像信息包括所述第一图像中像素点在选取的坐标系中的坐标,所述第一图像中像素点的像素值,以及所述第一图像中像素点的像素值梯度,第二图像的图像信息包括:所述第二图像中像素点的像素值,以及所述第二图像中像素点的像素值梯度,其中,所述两个图像均位于所述坐标系中;
    根据所述两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量,所述第一坐标偏移量用于指示所述两个图像间待对齐的像素点在所述坐标系中的位置偏差;
    根据所述第一图像中像素点在所述坐标系中的坐标和所述第一坐标偏移量,对齐所述两个图像。
  2. 如权利要求1所述的方法,其特征在于,
    在根据所述两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量之前,所述方法还包括:
    获取第三图像的图像信息,所述第三图像的图像信息包括:所述第三图像中像素点的像素值,以及所述第三图像中像素点的像素值梯度,其中,所述第三图像位于所述坐标系中,且所述第一图像和所述第三图像为待对齐的初始图像;
    根据所述初始图像的图像信息,通过所述互相关度量模型,确定坐标变换矩阵,所述坐标变换矩阵用于指示所述初始图像间待对齐的像素点在所述坐标系中的空间位置关系;
    根据所述坐标变换矩阵,确定第二坐标偏移量,所述第二坐标偏移量用于指示所述初始图像间的待对齐的像素点在所述坐标系中的位置偏差;
    根据所述第二坐标偏移量和所述第三图像中像素点的像素值,得到所述第二图像。
  3. 如权利要求2所述的方法,其特征在于,所述根据所述初始图像的图像信息,通过所述互相关度量模型,确定坐标变换矩阵,包括:
    通过计算
    Figure PCTCN2015075823-appb-100001
    的最小值,确定所述坐标变换矩阵,其中,
    Figure PCTCN2015075823-appb-100002
    Figure PCTCN2015075823-appb-100003
    p=(xp,yp)T,wp=(up,vp)T,H表示所述坐标变换矩阵,且H满足[up,vp,1]T=[xp,yp,1]T(H-I),I表示单位矩阵,p表示所述第一图像中像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示所述第二坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100004
    表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100005
    表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I3,p表示所述第三图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100006
    表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I′3,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100007
    表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β和τ为常数,β用于控制函数ρ(x)的形状,τ为E2(p,wp)中
    Figure PCTCN2015075823-appb-100008
    项的权重。
  4. 如权利要求3所述的方法,其特征在于,所述根据所述坐标变换矩阵,确定第二坐标偏移量,包括:
    根据公式[up,vp,1]T=[xp,yp,1]T(H-I),确定所述第二坐标偏移量。
  5. 如权利要求4所述的方法,其特征在于,所述根据所述第二坐标偏 移量和所述第三图像中像素点的像素值,得到所述第二图像,包括:
    根据公式I2(p)=I3(p+wp),得到所述第二图像,其中,I2(p)表示所述第二图像在p的像素值,I3(p+wp)表示所述第三图像中在p+wp的像素值。
  6. 如权利要求1-5中任一项所述的方法,其特征在于,所述根据所述两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量,包括:
    根据公式
    Figure PCTCN2015075823-appb-100009
    确定所述第一坐标偏移量,其中,
    Figure PCTCN2015075823-appb-100010
    Figure PCTCN2015075823-appb-100011
    p=(xp,yp)T,w'p=(u'p,v'p)T
    Figure PCTCN2015075823-appb-100012
    p表示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,w'p表示所述第一坐标偏移量,u'p表示w'p的横坐标,v'p表示w'p的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100013
    表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100014
    表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+w'p为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100015
    表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I′2,p表示所述以p+w'p为中心的图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100016
    表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,λ1、β、λ2和τ为常数,λ1和λ2为E3(w'p)中第二项和第三项的权重,β用于控制函数ρ(x)的形状,τ为E2(p,w'p)中
    Figure PCTCN2015075823-appb-100017
    项的权重,N(p)表示所述第一图像中像素点p的相邻像素点组成的集合,q表示所述集合中的任意像素点,wq表示q与 q在所述第二图像中的待对齐像素点之间的坐标偏移量,ε为常数。
  7. 如权利要求1-6中任一项所述的方法,其特征在于,所述互相关度量模型为:
    Figure PCTCN2015075823-appb-100018
    其中,
    Figure PCTCN2015075823-appb-100019
    p=(xp,yp)T,wp=(up,vp)T
    Figure PCTCN2015075823-appb-100020
    p表示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示所述第一坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100021
    所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100022
    表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100023
    表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100024
    表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β为权重,用于控制函数ρ(x)的形状。
  8. 一种对齐图像的装置,其特征在于,包括:
    第一获取单元,用于获取待对齐的两个图像的图像信息,其中,第一图像的图像信息包括所述第一图像中像素点在选取的坐标系中的坐标,所述第一图像中像素点的像素值,以及所述第一图像中像素点的像素值梯度,第二图像的图像信息包括:所述第二图像中像素点的像素值,以及所述第二图像中像素点的像素值梯度,其中,所述两个图像均位于所述坐标系中;
    第一确定单元,用于根据所述两个图像的图像信息,通过互相关度量模型,确定第一坐标偏移量,所述第一坐标偏移量用于指示所述两个图像间待对齐的像素点在所述坐标系中的位置偏差;
    对齐单元,用于根据所述第一图像中像素点在所述坐标系中的坐标和所述第一坐标偏移量,对齐所述两个图像。
  9. 如权利要求8所述的装置,其特征在于,所述装置还包括:
    第二获取单元,用于获取第三图像的图像信息,所述第三图像的图像信息包括:所述第三图像中像素点的像素值,以及所述第三图像中像素点的像素值梯度,其中,所述第三图像位于所述坐标系中,且所述第一图像和所述第三图像为待对齐的初始图像;
    第二确定单元,用于根据所述初始图像的图像信息,通过所述互相关度量模型,确定坐标变换矩阵,所述坐标变换矩阵用于指示所述初始图像间待对齐的像素点在所述坐标系中的空间位置关系;
    第三确定单元,用于根据所述坐标变换矩阵,确定第二坐标偏移量,所述第二坐标偏移量用于指示所述初始图像间的待对齐的像素点在所述坐标系中的位置偏差;
    第四确定单元,用于根据所述第二坐标偏移量和所述第三图像中像素点的像素值,得到所述第二图像。
  10. 如权利要求9所述的装置,其特征在于,所述第二确定单元具体用于通过计算
    Figure PCTCN2015075823-appb-100025
    的最小值,确定所述坐标变换矩阵,其中,
    Figure PCTCN2015075823-appb-100026
    Figure PCTCN2015075823-appb-100027
    p=(xp,yp)T,wp=(up,vp)T,H表示所述坐标变换矩阵,且H满足[up,vp,1]T=[xp,yp,1]T(H-I),I表示单位矩阵,p表示所述第一图像中像素点在所述坐标系中的坐标,xp表 示p的横坐标,yp表示p的纵坐标,wp表示所述第二坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100028
    表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100029
    表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I3,p表示所述第三图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100030
    表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I′3,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100031
    表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β和τ为常数,β用于控制函数ρ(x)的形状,τ为E2(p,wp)中
    Figure PCTCN2015075823-appb-100032
    项的权重。
  11. 如权利要求10所述的装置,其特征在于,所述第三确定单元具体用于根据公式[up,vp,1]T=[xp,yp,1]T(H-I),确定所述第二坐标偏移量。
  12. 如权利要求11所述的装置,其特征在于,所述第四确定单元具体用于根据公式I2(p)=I3(p+wp),得到所述第二图像,其中,I2(p)表示所述第二图像在p的像素值,I3(p+wp)表示所述第三图像在p+wp的像素值。
  13. 如权利要求8-12中任一项所述的装置,其特征在于,所述第一确定单元具体用于根据公式
    Figure PCTCN2015075823-appb-100033
    确定所述第一坐标偏移量,其中,
    Figure PCTCN2015075823-appb-100034
    Figure PCTCN2015075823-appb-100035
    p=(xp,yp)T,w'p=(u'p,v'p)T
    Figure PCTCN2015075823-appb-100036
    p表 示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,w'p表示所述第一坐标偏移量,u'p表示w'p的横坐标,v'p表示w'p的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100037
    表示所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p表示所述图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100038
    表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+w'p为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100039
    表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示所述以p+w'p为中心的图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100040
    表示所述以p+w'p为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,λ1、β、λ2和τ为常数,λ1和λ2为E3(w'p)中第二项和第三项的权重,β用于控制函数ρ(x)的形状,τ为E2(p,w'p)中
    Figure PCTCN2015075823-appb-100041
    项的权重,N(p)表示所述第一图像中像素点p的相邻像素点组成的集合,q表示所述集合中的任意像素点,wq表示q与q在所述第二图像中的待对齐像素点之间的坐标偏移量,ε为常数。
  14. 如权利要求8-13中任一项所述的装置,其特征在于,所述互相关度量模型为:
    Figure PCTCN2015075823-appb-100042
    其中,
    Figure PCTCN2015075823-appb-100043
    p=(xp,yp)T,wp=(up,vp)T
    Figure PCTCN2015075823-appb-100044
    p表示所述第一图像的像素点在所述坐标系中的坐标,xp表示p的横坐标,yp表示p的纵坐标,wp表示所述第一坐标偏移量,up表示wp的横坐标,vp表示wp的纵坐标,I1,p表示所述第一图像的以p为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100045
    所述图像块内,各像素点的像素值梯度组成的一维列向量,I′1,p 表示所述图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100046
    表示所述图像块内,各像素点的像素值梯度的均值组成的一维列向量,I2,p表示所述第二图像的以p+wp为中心的图像块内,各像素点的像素值组成的一维列向量,
    Figure PCTCN2015075823-appb-100047
    表示所述以p+wp为中心的图像块内,各像素点的像素值梯度组成的一维列向量,I'2,p表示所述以p+wp为中心的图像块内,各像素点的像素均值组成的一维列向量,
    Figure PCTCN2015075823-appb-100048
    表示所述以p+wp为中心的图像块内,各像素点的像素值梯度的均值组成的一维列向量,β为权重,用于控制函数ρ(x)的形状。
PCT/CN2015/075823 2014-09-05 2015-04-03 对齐图像的方法和装置 WO2016033967A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/448,799 US10127679B2 (en) 2014-09-05 2017-03-03 Image alignment method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410452309.4A CN105389774B (zh) 2014-09-05 2014-09-05 对齐图像的方法和装置
CN201410452309.4 2014-09-05

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/448,799 Continuation US10127679B2 (en) 2014-09-05 2017-03-03 Image alignment method and apparatus

Publications (1)

Publication Number Publication Date
WO2016033967A1 true WO2016033967A1 (zh) 2016-03-10

Family

ID=55422028

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/075823 WO2016033967A1 (zh) 2014-09-05 2015-04-03 对齐图像的方法和装置

Country Status (3)

Country Link
US (1) US10127679B2 (zh)
CN (1) CN105389774B (zh)
WO (1) WO2016033967A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109754413A (zh) * 2018-12-27 2019-05-14 中国科学院长春光学精密机械与物理研究所 一种菲索型动态干涉仪条纹图配准方法
US10412286B2 (en) 2017-03-31 2019-09-10 Westboro Photonics Inc. Multicamera imaging system and method for measuring illumination

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590155B (zh) * 2016-07-08 2020-09-08 富士通株式会社 文档图像的字符真值获取装置及方法、电子设备
KR102560780B1 (ko) 2016-10-05 2023-07-28 삼성전자주식회사 복수의 이미지 센서를 포함하는 이미지 처리 시스템 및 그것을 포함하는 전자 장치
US10365370B2 (en) * 2016-10-31 2019-07-30 Timothy Webster Wear tolerant hydraulic / pneumatic piston position sensing using optical sensors
CN107292822B (zh) * 2017-06-26 2020-08-28 北京奇艺世纪科技有限公司 一种图像的拼接方法和装置
CN109061386A (zh) * 2018-08-20 2018-12-21 上海仁童电子科技有限公司 一种线缆检测方法及装置
CN110163898B (zh) * 2019-05-07 2023-08-11 腾讯科技(深圳)有限公司 深度信息配准方法、装置、系统、设备及存储介质
CN110136080B (zh) * 2019-05-10 2023-03-21 厦门稿定股份有限公司 图像修复方法及装置
CN111080523B (zh) * 2019-12-17 2023-10-24 天津津航技术物理研究所 红外周视搜索系统及基于角度信息的红外周视图像拼接方法
CN111968166B (zh) * 2020-08-20 2023-09-29 西安工程大学 一种基于非刚体纺织图像配准技术的精确纺织方法
CN112243091B (zh) * 2020-10-16 2022-12-16 上海微创医疗机器人(集团)股份有限公司 三维内窥镜系统、控制方法和存储介质
CN113255586B (zh) * 2021-06-23 2024-03-15 中国平安人寿保险股份有限公司 基于rgb图像和ir图像对齐的人脸防作弊方法及相关设备
CN116363252B (zh) * 2023-06-02 2023-08-04 南京诺源医疗器械有限公司 目标成像方法及系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7894528B2 (en) * 2005-05-25 2011-02-22 Yissum Research Development Company Of The Hebrew University Of Jerusalem Fast and robust motion computations using direct methods
CN102857704A (zh) * 2012-09-12 2013-01-02 天津大学 带有时间域同步校准技术的多源视频拼接方法
CN103793891A (zh) * 2012-10-26 2014-05-14 海法科技有限公司 低复杂度的全景影像接合方法

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6519372B1 (en) * 1999-08-31 2003-02-11 Lockheed Martin Corporation Normalized crosscorrelation of complex gradients for image autoregistration
US7977942B2 (en) * 2005-11-16 2011-07-12 Board Of Regents, The University Of Texas System Apparatus and method for tracking movement of a target
US7609877B2 (en) * 2006-02-09 2009-10-27 The United States Of America As Represented By The Secretary Of The Navy Tactical image parameter adjustment method for stereo pair correlation
US8126289B2 (en) * 2006-06-20 2012-02-28 Ophthalmic Imaging Systems Device, method and system for automatic montage of segmented retinal images
AU2007240236A1 (en) * 2007-12-11 2009-06-25 Canon Kabushiki Kaisha Correlatability analysis for sparse alignment
US8086043B2 (en) * 2007-12-21 2011-12-27 Ati Technologies Ulc System and method of image correlation based on image structure
US20090232388A1 (en) * 2008-03-12 2009-09-17 Harris Corporation Registration of 3d point cloud data by creation of filtered density images
US8605972B2 (en) * 2012-03-02 2013-12-10 Sony Corporation Automatic image alignment
US8989461B2 (en) * 2012-05-11 2015-03-24 Siemens Aktiengesellschaft Method of deformable motion correction and image registration in X-ray stent imaging
CN103632362B (zh) * 2012-08-28 2017-03-01 中国电信股份有限公司 图像匹配处理方法、装置及系统
JP6499643B2 (ja) * 2013-10-01 2019-04-10 ベンタナ メディカル システムズ, インコーポレイテッド ラインベースの画像位置合わせ及び交差画像注釈デバイス、システム、及び方法
CN103679714B (zh) * 2013-12-04 2016-05-18 中国资源卫星应用中心 一种基于梯度互相关的光学和sar图像自动配准方法
CN103796001B (zh) * 2014-01-10 2015-07-29 深圳奥比中光科技有限公司 一种同步获取深度及色彩信息的方法及装置
DE102015208929B3 (de) * 2015-05-13 2016-06-09 Friedrich-Alexander-Universität Erlangen-Nürnberg Verfahren zur 2D-3D-Registrierung, Recheneinrichtung und Computerprogramm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7894528B2 (en) * 2005-05-25 2011-02-22 Yissum Research Development Company Of The Hebrew University Of Jerusalem Fast and robust motion computations using direct methods
CN102857704A (zh) * 2012-09-12 2013-01-02 天津大学 带有时间域同步校准技术的多源视频拼接方法
CN103793891A (zh) * 2012-10-26 2014-05-14 海法科技有限公司 低复杂度的全景影像接合方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10412286B2 (en) 2017-03-31 2019-09-10 Westboro Photonics Inc. Multicamera imaging system and method for measuring illumination
CN109754413A (zh) * 2018-12-27 2019-05-14 中国科学院长春光学精密机械与物理研究所 一种菲索型动态干涉仪条纹图配准方法

Also Published As

Publication number Publication date
CN105389774A (zh) 2016-03-09
US20170178348A1 (en) 2017-06-22
US10127679B2 (en) 2018-11-13
CN105389774B (zh) 2019-03-01

Similar Documents

Publication Publication Date Title
WO2016033967A1 (zh) 对齐图像的方法和装置
US10083366B2 (en) Edge-based recognition, systems and methods
US9177381B2 (en) Depth estimate determination, systems and methods
CN104966270B (zh) 一种多图像拼接方法
US9489765B2 (en) Silhouette-based object and texture alignment, systems and methods
CN104200461B (zh) 基于互信息图像选块和sift特征的遥感图像配准方法
Zhang et al. A graph-based optimization algorithm for fragmented image reassembly
CN106991695A (zh) 一种图像配准方法及装置
US10726612B2 (en) Method and apparatus for reconstructing three-dimensional model of object
US10169891B2 (en) Producing three-dimensional representation based on images of a person
US20160210751A1 (en) Registration method and apparatus for 3d image data
JP5468824B2 (ja) 3次元における形状の一致を判定する方法および装置
CN106296587B (zh) 轮胎模具图像的拼接方法
TWI599987B (zh) 點雲拼接系統及方法
CN107240126A (zh) 阵列图像的校准方法
JP6615486B2 (ja) カメラキャリブレーション装置、方法及びプログラム
WO2021142843A1 (zh) 图像扫描方法及装置、设备、存储介质
CN107330930B (zh) 三维图像深度信息提取方法
CN111210506A (zh) 一种三维还原方法、系统、终端设备和存储介质
WO2024082925A1 (zh) 一种表面缺陷数据增强方法、装置、电子设备及存储介质
JP6086491B2 (ja) 画像処理装置およびそのデータベース構築装置
US20230097869A1 (en) Method and apparatus for enhancing texture details of images
Xiang et al. An improved exemplar-based image inpainting algorithm
CN106570911B (zh) 一种基于daisy描述子的脸部卡通画合成方法
JP2016218849A (ja) 平面変換パラメータ推定装置、方法、及びプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15837556

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15837556

Country of ref document: EP

Kind code of ref document: A1