18 #ifndef PIC_GL_ALGORITHMS_PYRAMID_HPP 19 #define PIC_GL_ALGORITHMS_PYRAMID_HPP 21 #include "../../base.hpp" 23 #include "../../gl/image.hpp" 25 #include "../../gl/filtering/filter_gaussian_2d.hpp" 26 #include "../../gl/filtering/filter_sampler_2d.hpp" 27 #include "../../gl/filtering/filter_blend.hpp" 28 #include "../../gl/filtering/filter_op.hpp" 70 stdVectorClear<ImageGL>(
stack);
73 stdVectorClear<FilterGL>(
filters);
150 return int(
stack.size());
245 for(
int i = 0; i < levels; i++) {
251 stack.push_back(tmpG);
254 stack.push_back(tmpG);
257 if(i < (levels - 1)) {
265 stack.push_back(tmpD);
269 printf(
"PyramidGL size: %d\n",
int(
stack.size()));
283 if(!
stack[0]->isSimilarType(img)) {
293 for(
int i = 0; i < levels; i++) {
296 if(i == (levels - 1) ) {
314 if(
stack.size() < 2) {
318 int n = int(
stack.size()) - 1;
322 for(
int i = n; i >= 2; i--) {
330 for(
int i = n; i >= 2; i--) {
344 for(
unsigned int i = 0; i <
stack.size(); i++) {
355 for(
unsigned int i = 0; i <
stack.size(); i++) {
366 for(
unsigned int i = 0; i <
stack.size(); i++) {
378 for(
unsigned int i = 0; i <
stack.size(); i++) {
The FilterGLSampler2D class.
Definition: display.hpp:29
PIC_INLINE int log2(int n)
log2 computes logarithm in base 2 for integers.
Definition: math.hpp:302
void setNULL()
setNULL
Definition: pyramid.hpp:166
static FilterGLOp * CreateOpSub(bool bType)
CreateOpSub.
Definition: filter_op.hpp:141
void update(ImageGL *img)
update
The PyramidGL class.
Definition: pyramid.hpp:35
void initFilters()
initFilters
void mul(const PyramidGL *pyr)
mul
PIC_INLINE ImageGLVec SingleGL(ImageGL *img)
SingleGL creates a single for filters input.
Definition: image_vec.hpp:39
Definition: filter_op.hpp:28
The FilterGLBlend class.
Definition: display.hpp:29
FilterGLGaussian2D * flt_gauss
Definition: pyramid.hpp:41
ImageGL * Process(ImageGLVec imgIn, ImageGL *imgOut)
Process.
Definition: filter_npasses.hpp:323
void mulNeg(const PyramidGL *pyr)
mulNeg
The ImageGL class.
Definition: image.hpp:42
static FilterGLOp * CreateOpAdd(bool bType)
CreateOpAdd.
Definition: filter_op.hpp:108
void setValue(float value)
setValue
The FilterGLBlend class.
Definition: filter_blend.hpp:28
void release()
release
Definition: pyramid.hpp:68
void add(const PyramidGL *pyr)
add
virtual ImageGL * Process(ImageGLVec imgIn, ImageGL *imgOut)
Process.
Definition: display.hpp:258
FilterGLBlend * flt_blend
Definition: pyramid.hpp:44
FilterGLOp * flt_sub
Definition: pyramid.hpp:43
The FilterGLGaussian2D class.
Definition: display.hpp:33
FilterGLOp * flt_add
Definition: pyramid.hpp:43
ImageGLVec stack
Definition: display.hpp:78
int limitLevel
Definition: pyramid.hpp:39
void blend(PyramidGL *pyr, PyramidGL *weight)
blend
The FilterGLSampler2D class.
Definition: filter_sampler_2d.hpp:28
#define PIC_INLINE
Definition: base.hpp:33
The ImageGL class.
Definition: display.hpp:42
ImageGLVec stack
Definition: pyramid.hpp:78
ImageGLVec trackerRec
Definition: pyramid.hpp:47
FilterGLSampler2D * flt_sampler
Definition: pyramid.hpp:42
int width
Definition: filter_radial_basis_function.hpp:80
#define MIN(a, b)
Definition: math.hpp:69
The Image class stores an image as buffer of float.
Definition: image.hpp:60
PIC_INLINE ImageGLVec TripleGL(ImageGL *img1, ImageGL *img2, ImageGL *img3)
TripleGL creates a triple for filters input.
Definition: image_vec.hpp:67
std::vector< FilterGL * > filters
Definition: pyramid.hpp:45
The FilterGLGaussian2D class.
Definition: filter_gaussian_2d.hpp:33
int size()
size
Definition: pyramid.hpp:148
The PyramidGL class.
Definition: display.hpp:35
PIC_INLINE ImageGLVec DoubleGL(ImageGL *img1, ImageGL *img2)
DoubleGL creates a couple for filters input.
Definition: image_vec.hpp:52
Definition: bilateral_separation.hpp:25
ImageGLVec trackerUp
Definition: pyramid.hpp:47
#define MAX(a, b)
Definition: math.hpp:73
bool lapGauss
Definition: pyramid.hpp:38
PyramidGL(ImageGL *img, bool lapGauss, int limitLevel)
PyramidGL.
void create(ImageGL *img, bool lapGauss, int limitLevel)
create
ImageGL * reconstruct(ImageGL *imgOut)
reconstruct
std::vector< ImageGL * > ImageGLVec
ImageGLVec an std::vector of pic::ImageGL.
Definition: image_vec.hpp:32
int height
Definition: filter_radial_basis_function.hpp:80
bool bCreated
Definition: pyramid.hpp:38