-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcargadorDeImagenes.h
More file actions
42 lines (31 loc) · 1.52 KB
/
Copy pathcargadorDeImagenes.h
File metadata and controls
42 lines (31 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef TRABAJOPRACTICO2METNUM_CARGADORDEIMAGENES_H
#define TRABAJOPRACTICO2METNUM_CARGADORDEIMAGENES_H
#include <vector>
#include <stdio.h>
#include "lib/ppmloader.h"
typedef unsigned char uchar;
//REVISAR ESTAS FUNCIONES
//Copiadas del ppmloader
//unsigned char obtenerPixel(uchar* datos, int i, int j, int alto, int ancho);
double obtenerPixel(uchar* datos, int i, int j, int alto, int ancho);
void leerImagen(std::string filename, uchar** datos, int* ancho, int* alto);
class cargadorDeImagenes{
public:
//Toma el archivo con la lista de las imagenes de la base
cargadorDeImagenes(const char *archivo);
//Devuelve el conjunto de las imagenes de la base con el siguiente formato:
// <(vector que representa la imagen),(ID de la persona)>
//std::vector<std::pair<std::vector<unsigned char>, int>> conjuntoDeImagenes();
std::vector<std::pair<std::vector<double>, int>> conjuntoDeImagenes();
std::vector<std::vector<double>> vectoresDeImagenes();
std::vector<int> clases();
std::vector<std::string> rutas();
private:
//Carga la imagen pasada en el vector
void cargarImagen(std::string rutaArchivo, int IDPersona);
//Vector con todas las imagenes
//std::vector< std::pair<std::vector<unsigned char>, int> > _imagenes;
std::vector< std::pair<std::vector<double>, int> > _imagenes;
std::vector<std::string> _rutasImagenes;
};
#endif //TRABAJOPRACTICO2METNUM_CARGADORDEIMAGENES_H