/* Learn scalar conspicuity map weight values using
 * recursive least squares regression.  For each x-y
 * pixel location use the feature values and saliency
 * value as regression input and output respectively.
 */

#ifndef __LEARN_H
#define __LEARN_H

#include "matrix.h"

struct learn {
	matrix_t *P;
	matrix_t *x;
	matrix_t *w;

	size_t width;
	size_t height;
};

typedef struct learn learn_t;

learn_t * learn_init(int width, int height, int num_features, int num_frames);
void learn_destroy(learn_t *);
void learn_insert_frame(learn_t *, double *rg, double *by,
			double *intensity, double *motion, double *saliency);
void learn_weights(learn_t *, double, double, double, double, double);

#endif

