图像拼接--Seam Carving for Content-Aware Image Resizing

Seam Carving for Content-Aware Image Resizing
智能图像缩放
ACM Transactions on graphics (TOG). Vol. 26. No. 3. ACM, 2007
https://github.com/danasilver/seam-carving
https://github.com/vivianhylee/seam-carving

图像拼接里的 seam cutting 中的 seam 到底是什么了? 本文给出了seam的定义:
A seam is a connected path of low energy pixels crossing the image from top to bottom, or from left to right。(Seam carving uses an energy function defining the importance of pixels)

在这里插入图片描述

content-aware resizing of images
对于缩小图像 image reduction:seam selection ensures that while preserving the image structure, we remove more of the low energy pixels and fewer of the high energy ones
多缩减低能量像素,少缩减高能量像素

对于放大图像 image enlarging: the order of seam insertion ensures a balance between the original image content and the artificially inserted pixels
注意原有图像内容和加入的像素保持平衡

3 The Operator
Our approach to content-aware resizing is to remove pixels in a judicious manner
如何智能的图像进行缩放,怎么不引起注意的去除一些像素
our goal is to remove unnoticeable pixels that blend with their surroundings

给定一个 energy function,假定我们需要降低图像的宽度,我们可以想到有好几种策略来实现这个目的。

最优的策略就是保持能量最高,依次 去除能量最低的像素 in ascending order,因为每一行我们去除的像素个数可能不一样,This destroys the rectangular shape of the image,Figure 2(f)。

我们可以从每一行去除相同的像素个数,这么做 preserves the rectangular shape of the image but destroys the image content by creating a zigzag effect,Figure 2(e)

Auto-cropping. That is, look for a sub-window, the size of the target image, that contains the highest energy (Figure 2(b))

remove whole columns with the lowest energy. Still, artifacts might appear in the resulting image (Figure 2©)

our strategy of seam carving (Figure 2(d))

在这里插入图片描述

给定一个能量函数的定义,我们 define the cost of a seam as E(s)
The optimal seam can be found using dynamic programming

3.1 Energy Preservation Measure
在这里插入图片描述

3.2 Image Energy Functions
不同的能量函数
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

111

猜你喜欢

转载自blog.csdn.net/zhangjunhit/article/details/83820424