Research

A Shape-Preserving Approach to Image Resizing

Computer Graphics Forum (Pacific Graphics), 28(7), 1897-1906, 2009

Guo-Xin Zhang, Ming-Ming Cheng, Shi-Min Hu, Ralph R. Martin

[PDF] [PPT] [Video] [C++] [Sup] [BIB]

09ResizingPG

Abstract:

We present a novel image resizing method which attempts to ensure that important local regions undergo a geometric similarity transformation, and at the same time, to preserve image edge structure. To accomplish this, we define handles to describe both local regions and image edges, and assign a weight for each handle based on an importance map for the source image. Inspired by conformal energy, which is widely used in geometry processing, we construct a novel quadratic distortion energy to measure the shape distortion for each handle. The resizing result is obtained by minimizing the weighted sum of the quadratic distortion energies of all handles. Compared to previous methods, our method allows distortion to be diffused better in all directions, and important image edges are well-preserved. The method is efficient and offers a closed form solution.

Links to applications:

Our method has been adopted in several famous systems:

  1. Rectangling Panoramic Images via Warping, by Kaiming He, Huiwen Chang, and Jian Sun, in SIGGRAPH 2013
  2. Content-Aware Rotation, by Kaiming He, Huiwen Chang, and Jian Sun, in ICCV 2013
(Visited 10,182 times, 1 visits today)
Subscribe
Notify of
guest

13 Comments
Inline Feedbacks
View all comments
john

程老师您好!c++代码可能打不开,您能重新提供一个下载链接吗?谢谢!

JayS

程老师,C++代码还能下载学习么?

BoYang

程老师您好,我最近在学习您的resizing文章并下载了A Shape-Preserving Approach to Image Resizing的代码,编译可以通过但是在Debug至下面这条语句时出错:
if (eg.EvalMatCode(dir, “x = LeastSquareBoundary(A, zeros(size(A, 1), 1), ind, vals);”) != 0)
{
printf(“Error occurred when running code. %s:%s\n”, __FILE__, __LINE__);
}
我想问一下LeastSquareBoundary()这个函数是MATLAB的标准函数吗?我在我的MATLAB2008中找不到这个函数,希望得到您的帮助,非常感谢!

BoYang

程老师您好,我用MATLAB的lsqlin()函数写了一个解约束最小化的函数,现在还在想办法写一个WarpImage()函数进行插值,非常感谢您提供的源码,我从中学到了很多知识和技巧。

YUWANG

您好!关于找不到 LeastSquareBoundary函数的问题是怎么解决的呢?谢啦!

zhl

程老师您好,最近在学习您的resizing文章,我下载了A Shape-Preserving Approach to Image Resizing的代码,在编译里面的项目MatLabLib时,提示缺少文件,比如libeng.lib,libmat.lib,libmx.lib等等,还有无法打开包括文件:“matlab/engine.h”: No such file or directory,是不是项目里文件缺少啊,不知能否补充一下缺少的文件啊,或者发到我邮箱里也行:hengliang_zhu@163.com,非常感谢!

Ming-Ming Cheng

这些是标准的matlab头文件和lib。设置好工程路径就行。

zhl

非常感谢!程序终于编译通过了,好高兴啊。。但是在运行的时候又出现了一个新的问题,就是提示无法定位程序输入点mxCreateNumericMatrix_730于动态链接库,试了网上的方法都不行,后来我又下载网站提供的Windows executable,也是提示这个错误,我的开发环境是windows8(64位)+vs2010+matlab2010a+Qt4.8.6,不知是否与系统环境有关系呢?

QqShan

您好,请问这个动态链接库的问题解决了吗?我也遇到了一样的问题。

xueping suo

可以分享程序编译的过程吗,不胜感激