efros_freeman  0.1
Data Structures | Typedefs | Functions
common.h File Reference

this header file contains all definitions. More...

#include <fftw3.h>
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  image
struct  image_d
struct  image_ld
struct  image_ui
struct  corner

Typedefs

typedef struct image Image
typedef struct image_d Image_D
typedef struct image_ld Image_LD
typedef struct image_ui Image_UI
typedef struct corner Corner
typedef int bool

Functions

Image initialize (Image src_img, int block_sz, int overlap_sz, int blocks_row, int blocks_col, Corner *patch_src)
void initialize_image (Image *im, int rows, int cols, int channels)
void initialize_image_D (Image_D *im, int rows, int cols, int channels)
void initialize_image_LD (Image_LD *im, int rows, int cols, int channels)
void initialize_image_UI (Image_UI *im, int rows, int cols, int channels)
void create_position_map (Image position_map)
int crop_image (Image *im_crop, Image *im, int M, int N, int C)
int update_synth_map (Image *synth_map, Image *position_map, Corner *leftTopCorner_src, Corner *leftTopCorner_output, int patch_sz, Image boundary_mask)
char * remove_ext_filename (char *filename)
int im_fft (float *img, fftwl_complex *fft_im, int h, int w)

Detailed Description

this header file contains all definitions.

Author
Lara Raad
Date
24/05/2012

Definition in file common.h.

Typedef Documentation

typedef int bool

Definition at line 62 of file common.h.

typedef struct corner Corner
typedef struct image Image
typedef struct image_d Image_D
typedef struct image_ld Image_LD
typedef struct image_ui Image_UI

Function Documentation

void create_position_map ( Image  pos_map)

This method creates a position map that associates a different color from a continuous colormap to every pixel of the source image

Author
Lara Raad
Parameters
pos_mapPosition map image
Date
09/05/2013

Definition at line 174 of file common.c.

Here is the caller graph for this function:

int crop_image ( Image im_crop,
Image im,
int  M,
int  N,
int  C 
)

This method crops an image to be of size MxNxC

Author
Lara Raad
Parameters
imImage to crop
M,N,CSize of the cropped image
im_cropThe cropped image
Date
09/08/2013

Definition at line 200 of file common.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int im_fft ( float *  img,
fftwl_complex *  fft_im,
int  h,
int  w 
)

This method computes the 2-D FFT of an input image

Author
Lara Raad
Parameters
imgInput image to apply the 2-D FFT
fft_im2-D FFT of the input image img
h,wDimensions of img (height and width)
Date
26/02/2014

Definition at line 306 of file common.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Image initialize ( Image  src_img,
int  wp,
int  wo,
int  p_row,
int  p_col,
Corner patch_src 
)

This method initializes the output image taking a random patch from the input texture and placing it on the left-top corner of the output image.

Author
Lara Raad
Parameters
src_imgThe input texture sample
wpThe size of the patches
woThe size of the overlap area betwenn patches
p_rowNumber of patches per row in the output image
p_colNumber of patches per column in the output image
patch_srcTop left corner position of the patch from the source
Date
24/05/2012

Definition at line 42 of file common.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void initialize_image ( Image im,
int  rows,
int  cols,
int  channels 
)

This method initializes images of type float. It sets the numeber of rows, columns and channels and sets the pixels values to zero.

Author
Lara Raad
Parameters
imThe image to initialize
rowsNumber of rows of the image
colsNumber of columns of the image
channelsNumber of channels of the image
Date
24/05/2012

Definition at line 96 of file common.c.

Here is the caller graph for this function:

void initialize_image_D ( Image_D im,
int  rows,
int  cols,
int  channels 
)

This method initializes images of type double. It sets the number of rows, columns and channels and sets the pixels values to zero.

Author
Lara Raad
Parameters
imThe image to initialize
rowsNumber of rows of the image
colsNumber of columns of the image
channelsNumber of channels of the image
Date
24/05/2012

Definition at line 116 of file common.c.

void initialize_image_LD ( Image_LD im,
int  rows,
int  cols,
int  channels 
)

This method initializes images of type long double. It sets the number of rows, columns and channels and sets the pixels values to zero.

Author
Lara Raad
Parameters
imThe image to initialize
rowsNumber of rows of the image
colsNumber of columns of the image
channelsNumber of channels of the image
Date
24/05/2012

Definition at line 136 of file common.c.

Here is the caller graph for this function:

void initialize_image_UI ( Image_UI im,
int  rows,
int  cols,
int  channels 
)

This method initializes images of type unsigned long. It sets the number of rows, columns and channels and sets the pixels values to zero.

Author
Lara Raad
Parameters
imThe image to initialize
rowsNumber of rows of the image
colsNumber of columns of the image
channelsNumber of channels of the image
Date
24/05/2012

Definition at line 156 of file common.c.

char* remove_ext_filename ( char *  filename)

This method removes the extension of a filename

Author
Lara Raad
Parameters
filenameFile name to which the extension is removed
Date
25/08/2014

Definition at line 278 of file common.c.

int update_synth_map ( Image synth_map,
Image pos_map,
Corner leftTop_src,
Corner leftTop_output,
int  wp,
Image  binIm 
)

This method updates the synthesis map for each patch added in the synthesized image

Author
Lara Raad
Parameters
synth_mapSynthesis map
pos_mapColor map of the texture sample
leftTop_srcPosition of the patch to add taken in the src image
leftTop_outputPosition in the ouput image where we add a block
pathc_szPatch size
binImBinary image used to indicate which pixels are form the old patch and wich pixels are from the new patch
Date
26/02/2014

Definition at line 236 of file common.c.

Here is the caller graph for this function: