18 #ifndef PIC_FEATURES_MATCHING_PATCH_COMP_HPP 19 #define PIC_FEATURES_MATCHING_PATCH_COMP_HPP 21 #include "../image.hpp" 23 #include "../util/math.hpp" 24 #include "../util/std_util.hpp" 25 #include "../util/array.hpp" 27 #include "../image_samplers/image_sampler_bilinear.hpp" 29 #include "../features_matching/transform_data.hpp" 142 float alpha_i = 1.0f -
alpha;
148 float *img0_ij = (*img0)(x0 + j, y0 + i);
149 float *img1_ij = (*img1)(x1 + j, y1 + i);
151 float *img0_g_ij = (*img0_g)(x0 + j, y0 + i);
152 float *img1_g_ij = (*img1_g)(x1 + j, y1 + i);
161 ret += alpha_i * err_col +
alpha * err_grad;
177 float getSSD(
int x0,
int y0,
int x1,
int y1)
182 float *img0_ij = (*img0)(x0 + j, y0 + i);
183 float *img1_ij = (*img1)(x1 + j, y1 + i);
Image * img0_g
Definition: patch_comp.hpp:41
PatchComp(Image *img0, Image *img1, Image *img0_g, Image *img1_g, int patchSize, float alpha)
PatchComp.
Definition: patch_comp.hpp:80
ImageSamplerBilinear isb
Definition: patch_comp.hpp:39
int halfPatchSize
Definition: patch_comp.hpp:44
int channels
Definition: image.hpp:80
float getSSDSmooth(int x0, int y0, int x1, int y1)
getSSDSmooth
Definition: patch_comp.hpp:140
void setup(Image *img0, Image *img1, Image *img0_g, Image *img1_g, int patchSize, float alpha)
setup
Definition: patch_comp.hpp:110
float patchSize_sq
Definition: patch_comp.hpp:45
Image * img0
Definition: patch_comp.hpp:41
The PatchComp class.
Definition: patch_comp.hpp:36
void setNULL()
setNULL
Definition: patch_comp.hpp:91
static T distanceSq(T *data0, T *data1, int n)
distanceSq
Definition: array.hpp:195
float getSSD(int x0, int y0, int x1, int y1)
getSSD
Definition: patch_comp.hpp:177
PatchComp(Image *img0, Image *img1, int patchSize)
PatchComp.
Definition: patch_comp.hpp:66
float alpha
Definition: patch_comp.hpp:48
int patchSize
Definition: patch_comp.hpp:44
Image * img1
Definition: patch_comp.hpp:41
The Image class stores an image as buffer of float.
Definition: image.hpp:60
#define CLAMPi(x, a, b)
Definition: math.hpp:81
Definition: bilateral_separation.hpp:25
Image * img1_g
Definition: patch_comp.hpp:41
The ImageSamplerBilinear class.
Definition: image_sampler_bilinear.hpp:28
PatchComp()
PatchComp.
Definition: patch_comp.hpp:55