#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <cv.h>
#include <highgui.h>

using namespace std;


//Ocho vecinos
#define A0 data[u*step+v*channels+k]
#define A1 data[u*step+(v+1)*channels+k]
#define A2 data[(u-1)*step+(v+1)*channels+k]
#define A3 data[(u-1)*step+(v)*channels+k]
#define A4 data[(u-1)*step+(v-1)*channels+k]
#define A5 data[u*step+(v-1)*channels+k]
#define A6 data[(u+1)*step+(v-1)*channels+k]
#define A7 data[(u+1)*step+(v)*channels+k]
#define A8 data[(u+1)*step+(v+1)*channels+k]

typedef struct{
	int x;
	int y;
}posicion;

typedef struct{
	int val0, val1, val2;
}color;

typedef struct{
	int valor;
	int val0, val1, val2;
}pixel;

typedef struct{
	vector<color> pix;
	int valor;
}ventana;


typedef struct{
	posicion ini;
	posicion fin;
}cuadrado;

typedef struct {
	IplImage *img;
	char name[50];
	vector<cuadrado> mano; 
	vector<cuadrado> nomano; 
}imagen;


int trackbar=0;

void visor(int position){	
}


int cuadrados_to_pixels(int v_kernel[10]);