Commit db64bd33 authored by Aylen Ricca's avatar Aylen Ricca
Browse files

merge working

parent 9189e081
......@@ -11,6 +11,7 @@ make
make install
cd /home/futbot13/repo-futbot2014/visrob2/example/IntegradoWEB
rm -rf build
mkdir build
cd build/
cmake -DCMAKE_CXX_COMPILER=g++ ..
......
......@@ -18,10 +18,10 @@ using namespace cv;
#include <cvblob.h>
using namespace cvb;
//#include <string.h>
//#include <errno.h>
//#include "config.h"
//#include "confuse.h"
#include <string.h>
#include <errno.h>
#include "config.h"
#include "confuse.h"
#define WIDTH 320
#define HEIGHT 240
......@@ -111,22 +111,22 @@ int getConfiguration(){
* Carga el archivo de configuracion.
*/
int getConfiguration2(){
cfg_t *conf = initCfg("futbotVision.conf");
if (!conf) return -1;
CANT_CALIBRACIONES = cfg_size(conf, "region");
calibsMAX = (cv::Scalar*) malloc(sizeof(cv::Scalar)*CANT_CALIBRACIONES);
calibsMIN = (cv::Scalar*) malloc(sizeof(cv::Scalar)*CANT_CALIBRACIONES);
printf("REGIONES A CALIBRAR %d\n", CANT_CALIBRACIONES);
for(int i = 0; i < CANT_CALIBRACIONES; i++) {
cfg_t *cfg_obj = cfg_getnsec(conf, "region", i);
printf("REGION id: %d\n",cfg_getint(cfg_obj,"id"));
printf("REGION name: %s\n", cfg_title(cfg_obj));
printf("HSI max : {%d,%d,%d}\n",cfg_getnint(cfg_obj, "hsiMax", 0),cfg_getnint(cfg_obj, "hsiMax", 1),cfg_getnint(cfg_obj, "hsiMax", 2));
printf("HSI min : {%d,%d,%d}\n",cfg_getnint(cfg_obj, "hsiMin", 0),cfg_getnint(cfg_obj, "hsiMin", 1),cfg_getnint(cfg_obj, "hsiMin", 2));
}
// cfg_t *conf = initCfg("futbotVision.conf");
// if (!conf) return -1;
//
// int a = cfg_size(conf, "region");
// calibsMAX = (cv::Scalar*) malloc(sizeof(cv::Scalar)*a);
// calibsMIN = (cv::Scalar*) malloc(sizeof(cv::Scalar)*a);
// printf("REGIONES A CALIBRAR %d\n", a);
//
// for(int i = 0; i < a; i++) {
// cfg_t *cfg_obj = cfg_getnsec(conf, "region", i);
//
// printf("REGION id: %d\n",cfg_getint(cfg_obj,"id"));
// printf("REGION name: %s\n", cfg_title(cfg_obj));
// printf("HSI max : {%d,%d,%d}\n",cfg_getnint(cfg_obj, "hsiMax", 0),cfg_getnint(cfg_obj, "hsiMax", 1),cfg_getnint(cfg_obj, "hsiMax", 2));
// printf("HSI min : {%d,%d,%d}\n",cfg_getnint(cfg_obj, "hsiMin", 0),cfg_getnint(cfg_obj, "hsiMin", 1),cfg_getnint(cfg_obj, "hsiMin", 2));
// }
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment