关闭

Poisson Image Editing & Texture Based Terrain Synthesis

605人阅读 评论(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

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:1499138次
    • 积分:17958
    • 等级:
    • 排名:第580名
    • 原创:102篇
    • 转载:1367篇
    • 译文:6篇
    • 评论:223条
    联系方式
    个人邮箱: xuxiduo@zju.edu.cn
    QQ群:
    1)OpenCV俱乐部
        186168905

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

        群2:157103105

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