Files
jens 05da8712f6 Initial import
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/_to_be_added@1 b431acfa-c32f-4a4a-93f1-934dc6c82436
2014-07-19 07:44:42 +00:00

67 lines
1.8 KiB
C
Executable File

// ------------------------------------------------------------
// matte.h
//
// Reading writing tiff images
//
// 12.03.2005, J.Ahrensfeld
// ------------------------------------------------------------
#ifndef MATTE_H
#define MATTE_H
#include "mtypes.h"
#include "imageio.h"
#include "pixel.h"
// ------------------------------------------------------------
typedef struct _matte_settings_t
{
int debug;
int use_lab;
int use_computed_pixel;
int use_sliding_window_computing; // instead of clustering fore and back separately
int use_constant_color_background;
double sigma_c, sigma_gf;
int min_set_size;
} matte_settings_t;
typedef struct _matte_t
{
char name[256];
image_t im_f, im_b, im_alpha_f, im_alpha_b, im_P;
double *pL, *pWork;
set_data_t comp_set;
pxl_id_t *pCalcSet;
matte_settings_t settings;
} matte_t;
typedef struct _color_stat_t
{
color_vector_t *pColor_mean;
color_matrix_t *pCov_inv;
double *pWork;
int work_size, work_size_svd, work_size_inv;
int num_colors;
UINT32 type;
} color_stat_t;
typedef struct _matte_sol_t
{
double L, P;
double alpha, alpha_c;
color_vector_t color_f, color_b, color_f_c, color_b_c;
int solver_rounds;
} matte_sol_t;
// ------------------------------------------------------------
void MatteInit(matte_t *pObj, image_t *pComposite, image_t *pTrimap, char *name, matte_settings_t *pSettings);
int MatteGetSet(set_data_t *pObj, pxl_id_t *pPid, pxl_id_t pid, double *pAlpha, double *radius, UINT32 types);
int MatteGetColor(pxl_id_t *pPid, color_vector_t *pSrc, color_vector_t *pDst, int num_pixel);
int MatteGetData(pxl_id_t *pPid, double *pSrc, double *pDst, int num_pixel);
// ------------------------------------------------------------
#endif // MATTE_H