efros_freeman  0.1
Macros | Functions
boundary_cut.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <float.h>
#include "boundary_cut.h"
#include "random_number.h"
Include dependency graph for boundary_cut.c:

Go to the source code of this file.

Macros

#define min(a, b)   (a<=b)?(a):(b)
#define max(a, b)   (a>b)?(a):(b)
#define abs(a)   (a<0)?-(a):(a)
#define true   1
#define false   0

Functions

int cumulative_vertical_error (Image *out_im, Image src_im, Image *E, Image *paths, int ps, int os, int x, int y, Corner patch_src)
int cumulative_horizontal_error (Image *out_im, Image src_im, Image *E, Image *paths, int ps, int os, int x, int y, Corner patch_src)
int create_vertical_mask (Image *E_V, int ps, int os, Image *boundary_mask, Image paths_V)
int create_horizontal_mask (Image *E_H, int ps, int os, Image *boundary_mask, Image paths_H)
int create_Lshape_mask (Image *E_V, Image *E_H, int ps, int os, Image *boundary_mask, Image paths_V, Image paths_H)
int compute_boundary_mask (Image src_im, Image out_im, Image *boundary_mask, int os, int ps, Corner *temp, Corner patch_src)

Macro Definition Documentation

#define abs (   a)    (a<0)?-(a):(a)

Definition at line 30 of file boundary_cut.c.

#define false   0

Definition at line 32 of file boundary_cut.c.

#define max (   a,
 
)    (a>b)?(a):(b)

Definition at line 29 of file boundary_cut.c.

#define min (   a,
 
)    (a<=b)?(a):(b)

Definition at line 28 of file boundary_cut.c.

#define true   1

Definition at line 31 of file boundary_cut.c.

Function Documentation

int compute_boundary_mask ( Image  src_im,
Image  out_im,
Image boundary_mask,
int  os,
int  ps,
Corner temp,
Corner  patch_src 
)

This method computes the boundary mask needed to then blend correctly the patch in the output texture.

Author
Lara Raad
Parameters
src_imThe input texture sample
out_imThe synthesized texture
osThe size of the overlap area betwenn patches
psThe size of the patches
tempLeft top corner position of the patch under construction in the output image
patch_srcCorner position of the patch to copy from the input texture sample
Date
22/06/2014

Definition at line 519 of file boundary_cut.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int create_horizontal_mask ( Image E_H,
int  ps,
int  os,
Image boundary_mask,
Image  paths_H 
)

This method creates the boundary mask for the horizontal overlap.

Author
Lara Raad
Parameters
E_HThe cumulative error across the horizontal overlap arear
paths_HThe optimal paths to reach the positions of the last column
psPatch size
osOverlap size
boundary_maskMask used to redefine the ragged edges of the patches in the blending step
Date
24/06/2014

Definition at line 365 of file boundary_cut.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int create_Lshape_mask ( Image E_V,
Image E_H,
int  ps,
int  os,
Image boundary_mask,
Image  paths_V,
Image  paths_H 
)

This method creates the boundary mask for the L-shape overlap.

Author
Lara Raad
Parameters
E_VCumulative error across the vertical overlap area
paths_VOptimal paths to reach the positions of the first row
E_HCumulative error across the horizontal overlap area
paths_HOptimal paths to reach the positions of the first column
psPatch size
osOverlap size
boundary_maskMask used to redefine the ragged edges of the patches in the blending step
Date
24/06/2014

Definition at line 437 of file boundary_cut.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int create_vertical_mask ( Image E_V,
int  ps,
int  os,
Image boundary_mask,
Image  paths_V 
)

This method creates the boundary mask for the vertical overlap.

Author
Lara Raad
Parameters
E_VCumulative error across the vertical overlap area
paths_VOptimal paths to reach the positions of the last row
psPatch size
osOverlap size
boundary_maskMask used to redefine the ragged edges of the patches in the blending step
Date
24/06/2014

Definition at line 294 of file boundary_cut.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int cumulative_horizontal_error ( Image out_im,
Image  src_im,
Image E,
Image paths,
int  ps,
int  os,
int  x,
int  y,
Corner  patch_src 
)

This method computes the cumulative horizontal error in the overlap region and the corresponding patches to these errors.

Author
Lara Raad
Parameters
src_imThe input texture sample
out_imThe synthesized texture
EE is the cumulative error in the overlap
pathspaths saves the minimal path to each pixel of the overlap zone
osOverlap size
psPatch size
xX position of the location were to add the new patch in the output image
yY position of the location were to add the new patch in the output image
patch_srcCorner position of the patch to copy from the input texture sample
Date
22/06/2014

Definition at line 179 of file boundary_cut.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int cumulative_vertical_error ( Image out_im,
Image  src_im,
Image E,
Image paths,
int  ps,
int  os,
int  x,
int  y,
Corner  patch_src 
)

This method computes the cumulative veritcal error in the overlap region and the corresponding patches to these errors.

Author
Lara Raad
Parameters
src_imThe input texture sample
out_imThe synthesized texture
EE is the cumulative error in the overlap
pathspaths saves the minimal path to each pixel of the overlap zone
osOverlap size
psPatch size
xX position of the location were to add the new patch in the output image
yY position of the location were to add the new patch in the output image
patch_srcCorner position of the patch to copy from the input texture sample
Date
22/06/2014

Definition at line 53 of file boundary_cut.c.

Here is the call graph for this function:

Here is the caller graph for this function: