关闭

Poisson Image Editing & Texture Based Terrain Synthesis

842人阅读 评论(0) 收藏 举报
分类:

Poisson Image Editing & Texture Based Terrain Synthesis

CS 7490 Advanced Image Synthesis - Final Project Report

Howard Zhou & Jie Sun


Presentation


Source Code

  • poissonSolver.zip This has all the code that's used to generate the result in the Poisson Image Editing part.
  • terrainCode.zip This archive has all the code that's used to experiment on the terrain synthesis section.

Results


Poisson Image Editing

Seamless Cloning

seamless insertion with rectangular boundary condition

  +   = 

 

inserting objects with holes

+ =

 

inserting transparent objects

+ =

 


Selection Editing

 

Local illumination change

                                           alpha = 0.05, beta = 0.2               alpha = 0.05, beta = 0.4

 

texture flattening

 

edge detection image

The result is achieved using the first edge detection image (the scary one). The second edge detection has higher edge threshold and gives a much worse texture flattening result. This tells us that the edge detection stage is essential for texture flattening to work well.                          

 

seamless tiling

  • the original seam can't not differ too much, otherwise, we will not get acceptable result
  • the contrast of the generated image is always much lower, but it is adjustable through global contrast change.

 

Some more examples since we have those texture lying around

 

                                  

  

 

   

                                

 

The following example shows that the result would not be good when the seam really doesn't fit


Texture Based Terrain Synthesis

 

Motivation

  • Current methods are based on Fractals
  • These methods have very limited control of terrain styles. Usually requires manually tuning parameters
  • What if the user draws a rough sketch and supplies a height map, and says, " I want this to look like that"

Our approach

  1. Texture Flattening + Image Analogy
  2. Texture synthesis on Laplacian + piecewise seamless tiling
  3. Graphcut on image + seam removing on laplacian + poisson init value solving
  4. separating high frequency and low frequency + height indexing

Texture Flattening + Image Analogy

Using Image Analogy idea (specifically, texture by number)

Reference: A. Hertzmann, et.al. "Image Analogy", SIGGRAPH 2001

'Unfiltered' painting (A) : 'Filtered' painting (A') :: Input image (B) : Target image (B')

A

 

A'

 

B

 

B'

The images on the left are training data; our system "learns" the transformation from A to A', and then applies that transformation to B to get B'. In other words, we compute B' to complete the analogy.

 

One of the application of Image Analogy is: Texture by number, which is also used to generate some terrain like image.

: ::

Unfiltered source (A)

 

Filtered source (A')

:

Unfiltered target (B)

 

Filtered target (B')

 

Here, the problem is how to generate unfiltered source (A). In texture by number those segmentation is manually generated. We want to have an automatic way of generating (A)

Our method uses

  • Blurring (filtering)
  • Texture Flattening (poisson image editing) using edge detection result or contour.

Our result

edge detection                 texture flattening

after blurring (A)                       (A')

                  

          (B)                              (B')

 


Texture synthesis on Laplacian + piecewise seamless tiling

 

(A)Example of synthesized laplacian      (B)Solution of the poisson equation          (C)Result comparison

Current Algorithm:

1. Regard the laplacian image as a regular image

2. Do texture synthesis with laplacian images (image quilting/graph cut/...)

3. Given a particular Dirichlet boundary condition, solve for the pixel values (height map).

The problem is the resulting height map does not preserve the style of the original height maps, as shown in (C). The reason is because of the arbitrary boundary conditions that we pick. Possible solutions are:

1. Pick some particular boundary condition as attached to the laplacian.

2. Use non-conservative gradient field instead of laplacian image will probably give better result.


Graphcut on image + seam removing on laplacian + poisson init value solving

original terrain (Grand Canyon original size 4096x2048)

 

The user will give us a rough sketch, we will use some "smart method" to get a rough result using image patches from the original terrain.

-->

we first removing the seams in the laplacian (known because we put the patches there)

-->

we then smooth the edges of the original image

-->

We were thinking that now we just need to solve the poisson equation with the modified laplacian and boundary condition, but the result is wrong, because the laplacian field is no longer conservative.

So now, we are thinking instead of solving a boundary value problem, we solve an initial value poisson equation using modified laplacian and boundary. We are currently implementing that idea. (It should work).

 


Separating high frequency and low frequency + height indexing

Assumptions:

  • The high frequency information, i.e. terrain details is a function of the average height in a small neighborhood.

Algorithm:

  • Use “Copy & Paste” methods to generate an altitude map
  • Add high frequency probabilistically as indexed by the altitude map
  • Graph cuts/Image Quilting to make it seamless
     

Future Work

  • Exploring other texture synthesis methods
  • stylized map generation for real map
  • real map generation for stylized map

0
0
查看评论

Poisson Image Editing

说起泊松,可以顺便提及一下泊松同学的老师,拉普拉斯。学图像或是信号的,一定对拉普拉斯算子和拉普拉斯卷积很熟悉。在泊松图像融合出现之前,也有一种叫Laplacian pyramid blending的融合算法。两者的效果可看下图:
  • u011446464
  • u011446464
  • 2014-11-03 10:28
  • 1006

泊松图像编辑(Poisson image editing)

Written by Samson Mulder @ Samsonlab.com For more information visit http://www.samsonlab.com   最近国外的Open Course很火。很多同学喜欢看斯坦福,麻省的公开课程。但是国产大学...
  • majinlei121
  • majinlei121
  • 2015-08-03 16:45
  • 4971

图形学领域的关键算法及源码链接

很全很强大的图形学相关的论文和源码: Computer Graphics Research Software Helping you avoid re-inventing the wheel since 2009! Las...
  • pizibing880909
  • pizibing880909
  • 2014-06-06 19:16
  • 5321

seamless_cloning (Possion Image Editing)

opencv3.0 photo 模块加入了seamless_cloning类。该
  • vsooda
  • vsooda
  • 2014-08-25 17:54
  • 8787

论文笔记:Precomputed Real-Time Texture Synthesis with Markovian Generative Adversarial Networks

1.什么是deconvolution 反向映射,用来可视化深度特征,也可以用来重建图片。 2.合成图片两种方式: 1)生成全图的模型,效果不错但只对小图work,保真度fidelty低,一般用auto encoder 2)马尔科夫模型,同时生成texture。可以捕获局部patch的统计信息。本文...
  • lebula
  • lebula
  • 2016-08-08 16:19
  • 681

泊松图像编辑(poisson Image Editing)

reference : 《poisson Image Editing》 概述         使用基于求解泊松方程的通用插值方法,我们可以引入多种无缝编辑图像区域的新工具。第一套工具可以将透明或者不透明的原图某一区域无缝拼接到目标区域上,第二...
  • ZJU_fish1996
  • ZJU_fish1996
  • 2017-05-26 00:12
  • 3878

CVPR 2016-12-26

[1] arXiv:1612.08049 [pdf] Correlation Preserving Sparse Coding Over Multi-level Dictionaries for Image Denoising 用于图像去噪的多级字典相关保持稀疏编码 Rui Chen, Hu...
  • u011171235
  • u011171235
  • 2017-01-02 09:41
  • 691

笔记——Texture Synthesis Using Convolutional Neural Networks (Leon A. Gatys et al)

图像风格化论文笔记 Texture Synthesis Using Convolutional Neural Networks (Leon A. Gatys et al) 基于 CNN Network for object recognition, 用若干layer的不同filter之间的相关性(c...
  • smilewsw
  • smilewsw
  • 2017-03-02 19:10
  • 1031

运动捕捉-1

运动捕捉学习心得开学有大半个月了,来学校也有将近两个月了,对自己学到的东西进行总结。机器学习1 论文阅读 机器学习算法学习 代码理解和测试机器学习由于刚刚接触到机器学习内容,对其较多概念都不了解,所以先看了一遍《机器学习》这本书,对整个机器学习的算法和方式都进行了讲解,而且讲的很容易理解,适合...
  • u011276025
  • u011276025
  • 2016-09-23 21:44
  • 246

Poisson image editing算法实现的Matlab代码解析

之前我发了数篇系列博文来仔细研究Poisson Image Editing算法,每次重新审视和深入,仿佛都能有更为深刻的认识很很大的收获。这应该算是我这个系列的完结篇,会用用Matlab代码一点一点的演示,原文作者到底是如何设计和实现他那个强大且影响深远的算法的。希望你在看本文之前务必参考一下文章来...
  • baimafujinji
  • baimafujinji
  • 2016-01-29 14:00
  • 22888
    个人资料
    • 访问:1941139次
    • 积分:22254
    • 等级:
    • 排名:第392名
    • 原创:102篇
    • 转载:1385篇
    • 译文:6篇
    • 评论:261条
    联系方式
    个人邮箱: xuxiduo@zju.edu.cn
    QQ群:
    1)OpenCV俱乐部
        186168905

    2) 视频/音频/图像/算法/ML
        群1:148111910

        群2:157103105

    备注:加群需要回答问题,避免广告党。
    如果你是博客看到后加的,请注明“博客”并回答问题,只注明”博客“不回答问题的恕不加入。答案为和群相关的任何技术名词,不能出现1)和2)中的任何字眼
    博客专栏
    文章分类
    最新评论