efros_freeman  0.1
Functions
patch_search.h File Reference
#include "common.h"
Include dependency graph for patch_search.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void compute_input_patch_norms (Image src_im, long double *patch_normsH, long double *patch_normsV, long double *patch_normsL, int patch_sz, int overlap_sz)
 Computes the squared norms of each RGB patches of the input according to the 3 possible overlap regions.The computation is done in applying the cross-correlation between the extended mask and the sum over the 3 channels of the squares of the pixel values.
void patch_search (Image src_im, Image out_im, Corner temp, int patch_sz, long double *src_patch_normsH, long double *src_patch_normsV, long double *src_patch_normsL, fftwl_complex *fft_srcR, fftwl_complex *fft_srcG, fftwl_complex *fft_srcB, int h_dict, int w_dict, Corner *patch, float tol)
 This function executes the two steps of the patch search procedure:

Detailed Description

This file contains all the functions for the patch search procedure that computes the distance of a patch to all input patches and then randomly pick on of the patches that are close to the minimal distance.

Author
Lara Raad, Bruno Galerne
Date
2014/06/11

Definition in file patch_search.h.

Function Documentation

void compute_input_patch_norms ( Image  src_im,
long double *  patch_normsH,
long double *  patch_normsV,
long double *  patch_normsL,
int  patch_sz,
int  overlap_sz 
)

Computes the squared norms of each RGB patches of the input according to the 3 possible overlap regions.The computation is done in applying the cross-correlation between the extended mask and the sum over the 3 channels of the squares of the pixel values.

Parameters
src_iminput RGB Image
patch_normsHlong double image for the horizontal overlap (must be allocated)
patch_normsVlong double image for the vertical overlap (must be allocated)
patch_normsLlong double image for the L-shape overlap (must be allocated)
patch_szpatch size
overlap_szsize of the overlap at the edge of the patch
Author
Lara Raad, Bruno Galerne

Definition at line 136 of file patch_search.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void patch_search ( Image  src_im,
Image  out_im,
Corner  temp,
int  patch_sz,
long double *  src_patch_normsH,
long double *  src_patch_normsV,
long double *  src_patch_normsL,
fftwl_complex *  fft_srcR,
fftwl_complex *  fft_srcG,
fftwl_complex *  fft_srcB,
int  h,
int  w,
Corner patch,
float  tol 
)

This function executes the two steps of the patch search procedure:

  1. Compute the distance of the current patch to all the admissible input patches
  2. Randomly pick one of the patch that is close to the minimal distance
    Parameters
    src_imThe input texture sample
    out_imThe currently synthesized texture image (unknown pixels must be set to zero)
    tempThe patch from the output image to compare with those in the texture sample (patch to synthesize)
    patch_szThe pathc size
    src_patch_normsH,src_patch_normsV,src_patch_normsLlong double arrays corresponding to the norm of input patches for the 3 possible overlap regions
    fft_srcR,fft_srcG,fft_srcBlong double Fourier transforms of the 3 input channels
    h,wsize of the domain of admissible patches
    patchThe position of the picked patch (Corner type)
    tolThe threshold used to select patches from the input image
    Date
    2014/06/10

Definition at line 413 of file patch_search.c.

Here is the call graph for this function:

Here is the caller graph for this function: