Seam Carving for Content-Aware Image Resizing

Slides:



Advertisements
Similar presentations
Chapter 2 Combinatorial Analysis 主講人 : 虞台文. Content Basic Procedure for Probability Calculation Counting – Ordered Samples with Replacement – Ordered.
Advertisements

crossing n. 十字路口 go along 沿着 turn right 向右转 turn left 向左转.
簡單 GIF 製作 (1)Gifmake (2)PICASION.COM By Shark. Gifmake introduction(1) 1.You can create a picture. Just specify width and height in pixels, then you'll.
第七組古文閱讀報告 組長:秀惠 組員:孟筑、雅曼、雅文、盈蓁. 《朱買臣苦學有成》之原文翻譯 朱買臣,字翁子,吳人也。 朱買臣,字翁子,吳國人。 家貧,好讀書,不治產業,常刈(一ˋ)薪 樵,賣以給 (ㄐㄧ ˇ ) 食。 家裡雖然很窮困,但是他還是很喜歡讀書,因 不懂得如何治理產業,只能靠著上山砍材去城.
VS 兒童及少年身心發展 幼保三甲 幼兒期 青少年期 4A1I0014 陳佳瑩 4A1I0023 尤秀惠
鞘翅目 生科四乙 蘇俊融.
自衛消防編組任務職責 講 義 This template can be used as a starter file for presenting training materials in a group setting. Sections Right-click on a slide to add.
Performance Evaluation
核心价值观记心中 主题班会
说课.
Academic Year TFC EFL Data Collection Outline 学年美丽中国英语测试数据收集概述
税务认定 永州市国家税务局纳税人学校.
Mode Selection and Resource Allocation for Deviceto- Device Communications in 5G Cellular Networks 林柏毅 羅傑文.
指導教授:許子衡 教授 報告學生:翁偉傑 Qiangyuan Yu , Geert Heijenk
Population proportion and sample proportion
關聯式資料庫.
模式识别 Pattern Recognition
Manifold Learning Kai Yang
微積分網路教學課程 應用統計學系 周 章.
樹狀結構 陳怡芬 2018/11/16 北一女中資訊專題研究.
初二英语写作课 课件 福建省闽清县第一中 王国豪
簡易 Visual Studio 2010 C++ 使用手冊
第十章 基于立体视觉的深度估计.
第二章 共轴球面系统的物像关系 Chapter 2: Object-image relations of coaxial spheric system.
Fundamentals of Physics 8/e 27 - Circuit Theory
訪視委員 蒞臨指導 熱烈歡迎 Chrome text with reflection (Advanced)
Image Segmentation with A Bounding Box Prior
Simulated Annealing 報告者:李怡緯 OPLAB in NTUIM.
Step 1. Semi-supervised Given a region, where a primitive event happens Given the beginning and end time of each instance of the primitive event.
XBRL未來發展趨勢 2009年12月 For information on applying this template onto existing presentations, refer to the notes on slide 3 of this presentation. The Input.
Lesson 10.
第三章 基本觀念 電腦繪圖與動畫 (Computer Graphics & Animation) Object Data Image
Outrigger Optimization for Super Tall Structures Under Multiple Constraints 多约束条件下超高结构伸臂系统优化.
第三章 项目设定.
Inventory System Changes and Limitations
Interval Estimation區間估計
子博弈完美Nash均衡 我们知道,一个博弈可以有多于一个的Nash均衡。在某些情况下,我们可以按照“子博弈完美”的要求,把不符合这个要求的均衡去掉。 扩展型博弈G的一部分g叫做一个子博弈,如果g包含某个节点和它所有的后继点,并且一个G的信息集或者和g不相交,或者整个含于g。 一个Nash均衡称为子博弈完美的,如果它在每.
塑膠材料的種類 塑膠在模具內的流動模式 流動性質的影響 溫度性質的影響
5/02 今天的学习目标 (Today’s Learning Objectives)
磁共振原理的临床应用 福建医科大学附属第一医院影像科 方哲明.
簡易 Visual Studio 2005 C++ 使用手冊
碳汇资本在旅游融资中的应用研究 阚如良 梅雪 孔婷 经济与管理学院旅游管理系
句子成分的省略(1).
第三章 基本觀念 電腦繪圖與動畫 (Computer Graphics & Animation) Object Data Image
Chapter 9 (三维几何变换) To Discuss The Methods for Performing Geometric Transformations.
A high payload data hiding scheme based on modified AMBTC technique
VIDEO COMPRESSION & MPEG
高性能计算与天文技术联合实验室 智能与计算学部 天津大学
Mechanics Exercise Class Ⅰ
Guide to a successful PowerPoint design – simple is best
3.5 Region Filling Region Filling is a process of “coloring in” a definite image area or region. 2019/4/19.
Google Local Search API Research and Implementation
计算机问题求解 – 论题 算法方法 2016年11月28日.
Inter-band calibration for atmosphere
取材 Tommy’s Window slideshow
An Efficient MSB Prediction-based Method for High-capacity Reversible Data Hiding in Encrypted Images 基于有效MSB预测的加密图像大容量可逆数据隐藏方法。 本文目的: 做到既有较高的藏量(1bpp),
Q & A.
计算机问题求解 – 论题1-5 - 数据与数据结构 2018年10月16日.
Efficient Query Relaxation for Complex Relationship Search on Graph Data 李舒馨
磁共振原理的临床应用.
Mechanics Exercise Class Ⅱ
赵才荣 同济大学,电子与信息工程学院,智信馆410室
主要内容 什么是概念图? 概念图的理论基础 概念图的功能 概念地图的种类 如何构建概念图 概念地图的评价标准 国内外概念图研究现状
何正斌 博士 國立屏東科技大學工業管理研究所 教授
技專校院多元入學管道 國立臺北科技大學 教務處 涂雅筑.
簡單迴歸分析與相關分析 莊文忠 副教授 世新大學行政管理學系 計量分析一(莊文忠副教授) 2019/8/3.
Principle and application of optical information technology
BESIII MDC 模拟与调试 袁野 年粒子物理实验计算软件与技术研讨会 威海.
Hybrid fractal zerotree wavelet image coding
When using opening and closing presentation slides, use the masterbrand logo at the correct size and in the right position. This slide meets both needs.
Presentation transcript:

Seam Carving for Content-Aware Image Resizing ACM Transactions on Graphics, Volume 26, Number 3, SIGGRAPH 2007 姓名:王俊富 指導老師:萬書言 副教授

Seam Carving Effective resizing of images should not only use geometric constraints, but consider the image content as well. A seam is a connected path of low energy pixels crossing the image from top to bottom, or from left to right. Seam-carving is a simple image operator that can change the size of an image.

Image reduction & Image enlarging For 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. For image enlarging, the order of seam insertion ensures a balance between the original image content and the artificially inserted pixels.

Image reduction Results of 5 different strategies for reducing the width of an image. (b)有最高能量的子視窗 (c)移除每行有最低能量 (d)Seam removal (e)每行移除相同數的低能量 (f)由低能量刪除,慢慢往上

The Operator Energy function: (gradient) let I be an n×m image and define a vertical seam to be: horizontal seam is: Optimal seam s* that minimizes this seam cost :

Energy Preservation Measure Randomly removing pixels should keep the average unchanged, but content-aware resizing should raise the average as it removes low energy pixels and keeps the high energy ones.

Image Energy Function(1/2) Taking the maximum of the HoG at the denominator attracts the seams to edges in the image. Use an 8-bin histogram computed over a 11×11 window around the pixel.

Image Energy Function(2/2) As expected, no single energy function performs well across all images but in general they all accommodate a similar range for resizing. We found either e1 or eHoG to work quite well.

Aspect Ratio Change(1/2) 影像縮減: Left: Seam removals Center: Scaling Right: Cropping

Aspect Ratio Change(2/2) 影像拉寬: In both examples the original image is widened by seam insertion.

Image Enlarging(1/2) 影像縮減是一直將最低能量的seam刪去 影像拉寬是一直增加最低能量的seam? NO 先找出要拉寬的長度,找出對應長度的k條seam 接下來有幾種做法: 1.直接複製seam 2.由seam的左右兩邊鄰居取平均 3.取seam的能量值與其中一邊鄰居(左或右)的能量值 做平均(即時運算)

Image Enlarging(2/2) (a)Original (b)最低的Seam 延伸(c)Inserting the seams in order of removal (d)50% enlargement (e)一次放大100% 等同標準scaling(f)兩次放大50% (g)前圖的enlargement

Content Amplification 內容物放大能透過結合seam caving與scaling完成。 先以傳統Scaling 放大影像,再用Seam Carving 縮減為 原圖大小。

Object Removal(1/2) The system can automatically calculate the smaller of the vertical or horizontal diameters (in pixels) of the target removal region and perform vertical or horizontal removals accordingly . 用簡單的UI讓使用者 描繪出要移除的物件

Object Removal(2/2) 找得到不見的鞋嗎?(原圖左上) 越複雜的圖越難看出差異

Multi-size Image(1/3) 使用者通常無法清楚知道自己要調整影像大小到多少 比較適合。 調整影像大小從400×500 到100×100 約需要 2.2 秒。 因此,若要能即時處理出數以百條的seam 是件困難 的工作。 若先經由pre-processing 步驟,就可使影像即時處理。 透過index map,找出被刪除的次序。

Multi-size Image(2/3) Index map: An image with its vertical and horizontal seam index maps V and H, colored by their index from blue (first seams) to red (last seams).

Multi-size Image(3/3) 若要縮減影像,從index map依序刪除seam

Seam Carving in the gradient domain combine seam carving with Poisson reconstruction ([Perez et al. 2003]). 左上:Original 右上:Seam carving 右下:結合Poisson 左下:放大比較

Retargeting with Optimal Seams-Order(1/4) 影像I 從n×m的大小 retarget為n’×m’,且m’<m and n’<n ,seam carving的次序該如何決定? Remove vertical seams first? Horizontal seams first? Or alternate between the two? Define the search for the optimal order as an optimization of the following objective function: where k = r+c, r = (m−m’), c = (n−n’) and ai is used as a parameter that determine if at step i we remove a horizontal or vertical seam: ai {0,1}

Retargeting with Optimal Seams-Order(2/4) k = r+c, r = (m−m’), c = (n−n’) {0,1} :vertical :horizontal Find the optimal order using a transport map T Entry T(r,c) holds the minimal cost needed to obtain an image of size n−r×m−c.

Retargeting with Optimal Seams-Order(3/4) Starting at T(0,0) = 0 we fill each entry (r,c) choosing the best of two options - either removing a horizontal seam from an image of size n−r×m−c+1 or removing a vertical seam from an image of size n−r+1×m−c:

Retargeting with Optimal Seams-Order(4/4) Top is the original image and it’s transport map T. 右上: optimal path (white path on T) 左上: Alternating between vertical and horizontal 左下: vertical seams first 右下: horizontal seams first

Limitations(1/3) Combined with a face detector we get much better results.

Limitations(2/3) 上排左至右Original、Cropped、Scaled 下排左至右simple bottom up、face protect、face and flower

Limitations(3/3) 若影像太過單調,且不包含不太重要的部分,則不太 適用此方法,用傳統的scaling 反而會比較好。

實作方式(1/2) 先計算原始影像的gradient值,可以採用Sobel opertaor 算完之後計算energy map image,(i,j)值為gradient 的 current 值加上之前三個比較的最小值 i.e. min((i-1,j-1),(i-1,j),(i-1,j+1)) 最左及最右只有兩個 最上設為初始的gradient (i-1,j-1) (i-1,j) (i-1,j+1) (i,j-1) (i,j) (i,j+1) (i+1,j-1) (i+1,j) (i+1,j+1)

實作方式(2/2) 算出energy map後,找出optimal seam 由最後一行找出最小值,依序往上找出三個鄰居的最 小值,完成後即為vertical的optimal seam,horizontal seam同理可推 移除optimal seam即可達到影像縮減的效果 Seam insertion可插入seam的兩個鄰居平均值,若要即 時運算可用seam與其中一邊鄰居的能量平均值 因此限制每次最多增大ㄧ倍-1的pixel值

影片Demo

Reference Seam carving for content aware image resizing: MATLAB http://danluong.com/2007/12/21/seam-carving-matlab- implementation-tutorial/ liquid-resize http://www.thegedanken.com/retarget/ CAIR code http://code.google.com/p/seam-carving-gui/ Rsizr線上 http://cn.rsizr.com/ 簡單小程式 http://swieskowski.net/carve/

The End Thanks for your listening!