Efros-Leung
Exemplar-basedtexturesynthesis(Efros-Leung)
inc/synthesis.h
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <stdlib.h>
00004 #include "pca.h"
00005 #include "mt.h"
00006 
00007 /*int minimum( float *array, int nthreads );*/
00008 int compare_pixel(const void * a, const void * b);
00009 /*int compare_int(const void * a, const void * b);*/
00010 int compare_cand_dist(const void * a, const void * b);
00011 
00012 int known_neighbours( ImageF w, unsigned char* mask, Pixel current, int i, int t, int larg, int haut, unsigned short *mask_neighb, float *curr_patch );
00013 int known_neighboursRL( unsigned char* mask, Pixel current, int i, int t, int larg, unsigned short *mask_neighb );
00014 int known_neighboursUD( unsigned char* mask, Pixel current, int i, int t, int larg, unsigned short *mask_neighb );
00015 
00016 int find_candidatesU( ImageF v, float* weights_pca, float *dictionary, Pixel current, int i, int totalPatches, unsigned short *mask_neighb, int total_neighb, int t, float* WU, float *mean, int m, int n, float tolerance, Cand_dist cand_list);
00017 int find_candidatesD( ImageF v, float* weights_pca, float *dictionary, Pixel current, int i, int totalPatches, unsigned short *mask_neighb, int total_neighb, int t, float* WU, float *mean, int m, int n, float tolerance, Cand_dist cand_list);
00018 int find_candidatesR( ImageF v, float* weights_pca, float *dictionary, Pixel current, int i, int totalPatches, unsigned short *mask_neighb, int total_neighb, int t, float* WU, float* mean, int m, int n, float tolerance, Cand_dist cand_list);
00019 int find_candidatesL( ImageF v, float* weights_pca, float *dictionary, Pixel current, int i, int totalPatches, unsigned short *mask_neighb, int total_neighb, int t, float* WU, float *mean, int m, int n, float tolerance, Cand_dist cand_list);
00020 int find_candidates( float *patch_list, float *patch_list_mask, float *curr_patch, int totalPatchs, int t, unsigned short *mask_neighb, int voisins_updated, float tolerance, Cand_dist cand_list, float* weights );
00021 float * load_patch_list( ImageF w, int t );
00022 
00023 long int generate_current_list ( int cote, int coin, Pixel current, unsigned char *mask, int t, int larg, int haut );
00024 
00025 long int random_choose ( Cand_dist cand_list, long int size_list );
00026 void retrieve_coords( int p, int larg, int tx, int ty, int* x, int* y);
00027 
00028 int compute_distances_pca( int totalPatches, int t, float tolerance, int total_neighb, unsigned short *mask_neighb, float *patch, float *patch_pca, float *dictionary, int n, Cand_dist cand_list, float *radius_out );
00029 int compute_distances( int totalPatchs, int t, int voisins_updated, unsigned short *mask_neighb, float *patch_list, float *patch_list_mask, float *curr_patch, float tolerance, Cand_dist cand_list, float *radius_out, float *weights );
00030 
00031 float * gaussian_weights( int patchSize, int t );
00032 float * gaussian_weights_pca( int patchSize, int t );
00033 float * uniform_weights_pca( int patchSize );
00034 
00035 
00036 
00037 
 All Classes Files Functions Variables