Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
futbot
futbot2014
Commits
db64bd33
Commit
db64bd33
authored
Oct 25, 2014
by
Aylen Ricca
Browse files
merge working
parent
9189e081
Changes
2
Hide whitespace changes
Inline
Side-by-side
visrob2/make.sh
View file @
db64bd33
...
...
@@ -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++ ..
...
...
visrob2/src/Havimo/utilsBlobs.cpp
View file @
db64bd33
...
...
@@ -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));
//
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment