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
987b4534
Commit
987b4534
authored
Oct 25, 2014
by
Aylen Ricca
Browse files
camera functions - not file images
parent
980fa06d
Changes
2
Hide whitespace changes
Inline
Side-by-side
visrob2/make.sh
View file @
987b4534
#!/bin/sh
cd
/home/futbot13/repo-futbot2014/visrob2
rm
-rf
build
mkdir
build
cd
build/
...
...
@@ -10,7 +9,7 @@ make
make
install
cd
/home/futbot13/repo-futbot2014/visrob2
/example/IntegradoWEB
cd
..
/example/IntegradoWEB
rm
-rf
build
mkdir
build
cd
build/
...
...
visrob2/src/Havimo/utilsBlobs.cpp
View file @
987b4534
...
...
@@ -127,7 +127,7 @@ int getConfiguration2(){
*/
int
utilBlobs_initialize
(){
getConfiguration
();
/*
if (!(capture = cvCaptureFromCAM(0))){
if
(
!
(
capture
=
cvCaptureFromCAM
(
0
))){
fprintf
(
stderr
,
"== ERROR 0 - revisar conexion a camara.
\n
"
);
return
0
;
}
...
...
@@ -141,10 +141,10 @@ int utilBlobs_initialize(){
return
0
;
}
img
=
cvRetrieveFrame
(
capture
);
*/
img
=
cvLoadImage
(
imagen
,
1
);
/*
img = cvLoadImage(imagen,1);
imgSize = cvGetSize(img);
frame
=
cvCreateImage
(
imgSize
,
img
->
depth
,
img
->
nChannels
);
frame = cvCreateImage(imgSize, img->depth, img->nChannels);
*/
frameNumber
=
0
;
return
1
;
...
...
@@ -154,22 +154,22 @@ int utilBlobs_initialize(){
* Elimina las estructuras utilizadas por el modulo.
*/
void
utilBlobs_terminate
(){
cvReleaseImage
(
&
frame
);
//
cvReleaseCapture(&capture);
//
cvReleaseImage(&frame);
cvReleaseCapture
(
&
capture
);
}
/**
* Obtiene un nuevo frame de la camara conectada, retorna -1 si hay algún problema con la lectura desde la camara
*/
int
utilBlobs_getFrame
(){
/*
if (!cvGrabFrame(capture)) {
if
(
!
cvGrabFrame
(
capture
))
{
fprintf
(
stderr
,
"== ERROR 1 - revisar conexion a camara. Posible desconexion.
\n
"
);
return
0
;
}
img
=
cvRetrieveFrame
(
capture
);
*/
img
=
cvLoadImage
(
imagen
,
1
);
cvConvertScale
(
img
,
frame
,
1
,
0
);
/*
img = cvLoadImage(imagen,1);
cvConvertScale(img, frame, 1, 0);
*/
std
::
stringstream
filename
;
filename
<<
"IMG"
<<
std
::
setw
(
5
)
<<
std
::
setfill
(
'0'
)
<<
num
++
<<
".png"
;
cvSaveImage
(
filename
.
str
().
c_str
(),
frame
);
...
...
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