Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
ecf6b5a8
Commit
ecf6b5a8
authored
Jun 26, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making all dependencies from highgui module optional
parent
700b6855
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
124 additions
and
24 deletions
+124
-24
CMakeLists.txt
modules/contrib/CMakeLists.txt
+1
-1
chamfermatching.cpp
modules/contrib/src/chamfermatching.cpp
+8
-2
rgbdodometry.cpp
modules/contrib/src/rgbdodometry.cpp
+7
-2
CMakeLists.txt
modules/legacy/CMakeLists.txt
+1
-1
image.cpp
modules/legacy/src/image.cpp
+24
-1
oneway.cpp
modules/legacy/src/oneway.cpp
+14
-2
CMakeLists.txt
modules/objdetect/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/videostab/CMakeLists.txt
+1
-1
frame_source.hpp
modules/videostab/include/opencv2/videostab/frame_source.hpp
+7
-6
frame_source.cpp
modules/videostab/src/frame_source.cpp
+59
-5
precomp.hpp
modules/videostab/src/precomp.hpp
+0
-1
dbt_face_detection.cpp
samples/cpp/dbt_face_detection.cpp
+1
-1
No files found.
modules/contrib/CMakeLists.txt
View file @
ecf6b5a8
ocv_define_module
(
contrib opencv_imgproc opencv_calib3d opencv_features2d opencv_
highgui opencv_ml opencv_video opencv_objdetect
)
ocv_define_module
(
contrib opencv_imgproc opencv_calib3d opencv_features2d opencv_
ml opencv_video opencv_objdetect OPTIONAL opencv_highgui
)
modules/contrib/src/chamfermatching.cpp
View file @
ecf6b5a8
...
...
@@ -44,7 +44,10 @@
//
#include "precomp.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_HIGHGUI
# include "opencv2/highgui/highgui.hpp"
#endif
#include <iostream>
#include <queue>
...
...
@@ -907,13 +910,16 @@ void ChamferMatcher::Template::show() const
}
}
circle
(
templ_color
,
Point
(
center
.
x
+
pad
,
center
.
y
+
pad
),
1
,
CV_RGB
(
0
,
255
,
0
));
#ifdef HAVE_OPENCV_HIGHGUI
namedWindow
(
"templ"
,
1
);
imshow
(
"templ"
,
templ_color
);
cvWaitKey
(
0
);
#else
CV_Error
(
CV_StsNotImplemented
,
"OpenCV has been compiled without GUI support"
);
#endif
templ_color
.
release
();
}
...
...
modules/contrib/src/rgbdodometry.cpp
View file @
ecf6b5a8
...
...
@@ -39,10 +39,16 @@
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#define SHOW_DEBUG_IMAGES 0
#include "opencv2/core/core.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#if SHOW_DEBUG_IMAGES
# include "opencv2/highgui/highgui.hpp"
#endif
#include "precomp.hpp"
#include <iostream>
...
...
@@ -58,7 +64,6 @@
#include <limits>
#define SHOW_DEBUG_IMAGES 0
using
namespace
cv
;
inline
static
...
...
modules/legacy/CMakeLists.txt
View file @
ecf6b5a8
ocv_define_module
(
legacy opencv_calib3d opencv_
highgui opencv_video opencv_ml
)
ocv_define_module
(
legacy opencv_calib3d opencv_
video opencv_ml OPTIONAL opencv_highgui
)
modules/legacy/src/image.cpp
View file @
ecf6b5a8
...
...
@@ -46,7 +46,10 @@
// */
#include "precomp.hpp"
#include "opencv2/highgui/highgui_c.h"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_HIGHGUI
# include "opencv2/highgui/highgui_c.h"
#endif
/////////////////////////////// CvImage implementation //////////////////////////////////
...
...
@@ -112,8 +115,10 @@ bool CvImage::load( const char* filename, const char* imgname, int color )
img = temp_img;
}*/
}
#ifdef HAVE_OPENCV_HIGHGUI
else
img
=
cvLoadImage
(
filename
,
color
);
#endif
attach
(
img
);
return
img
!=
0
;
...
...
@@ -161,8 +166,12 @@ void CvImage::save( const char* filename, const char* imgname, const int* params
return
;
if
(
icvIsXmlOrYaml
(
filename
)
)
cvSave
(
filename
,
image
,
imgname
);
#ifdef HAVE_OPENCV_HIGHGUI
else
cvSaveImage
(
filename
,
image
,
params
);
#else
(
void
)
params
;
#endif
}
...
...
@@ -175,8 +184,12 @@ void CvImage::write( CvFileStorage* fs, const char* imgname )
void
CvImage
::
show
(
const
char
*
window_name
)
{
#ifdef HAVE_OPENCV_HIGHGUI
if
(
image
)
cvShowImage
(
window_name
,
image
);
#else
(
void
)
window_name
;
#endif
}
...
...
@@ -238,8 +251,10 @@ bool CvMatrix::load( const char* filename, const char* matname, int color )
m = temp_mat;
}*/
}
#ifdef HAVE_OPENCV_HIGHGUI
else
m
=
cvLoadImageM
(
filename
,
color
);
#endif
set
(
m
,
false
);
return
m
!=
0
;
...
...
@@ -287,8 +302,12 @@ void CvMatrix::save( const char* filename, const char* matname, const int* param
return
;
if
(
icvIsXmlOrYaml
(
filename
)
)
cvSave
(
filename
,
matrix
,
matname
);
#ifdef HAVE_OPENCV_HIGHGUI
else
cvSaveImage
(
filename
,
matrix
,
params
);
#else
(
void
)
params
;
#endif
}
...
...
@@ -301,8 +320,12 @@ void CvMatrix::write( CvFileStorage* fs, const char* matname )
void
CvMatrix
::
show
(
const
char
*
window_name
)
{
#ifdef HAVE_OPENCV_HIGHGUI
if
(
matrix
)
cvShowImage
(
window_name
,
matrix
);
#else
(
void
)
window_name
;
#endif
}
...
...
modules/legacy/src/oneway.cpp
View file @
ecf6b5a8
...
...
@@ -8,7 +8,10 @@
*/
#include "precomp.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_HIGHGUI
# include "opencv2/highgui/highgui.hpp"
#endif
#include <stdio.h>
namespace
cv
{
...
...
@@ -665,7 +668,11 @@ namespace cv{
cvMinMaxLoc
(
m_samples
[
i
],
0
,
&
maxval
);
cvConvertScale
(
m_samples
[
i
],
patch
,
255
/
maxval
);
#ifdef HAVE_OPENCV_HIGHGUI
cvSaveImage
(
buf
,
patch
);
#else
CV_Error
(
CV_StsNotImplemented
,
"OpenCV has been compiled without image I/O support"
);
#endif
cvReleaseImage
(
&
patch
);
}
...
...
@@ -1794,7 +1801,12 @@ namespace cv{
sprintf
(
filename
,
"%s/%s"
,
path
,
imagename
);
//printf("Reading image %s...", filename);
IplImage
*
img
=
cvLoadImage
(
filename
,
CV_LOAD_IMAGE_GRAYSCALE
);
IplImage
*
img
=
0
;
#ifdef HAVE_OPENCV_HIGHGUI
img
=
cvLoadImage
(
filename
,
CV_LOAD_IMAGE_GRAYSCALE
);
#else
CV_Error
(
CV_StsNotImplemented
,
"OpenCV has been compiled without image I/O support"
);
#endif
//printf("done\n");
extractPatches
(
img
,
patches
,
patch_size
);
...
...
modules/objdetect/CMakeLists.txt
View file @
ecf6b5a8
set
(
the_description
"Object Detection"
)
ocv_define_module
(
objdetect OPTIONAL opencv_highgui
)
ocv_define_module
(
objdetect
opencv_core opencv_imgproc
OPTIONAL opencv_highgui
)
modules/videostab/CMakeLists.txt
View file @
ecf6b5a8
set
(
the_description
"Video stabilization"
)
ocv_define_module
(
videostab opencv_imgproc opencv_features2d opencv_video opencv_
highgui opencv_photo opencv_calib3d OPTIONAL opencv_gpu
)
ocv_define_module
(
videostab opencv_imgproc opencv_features2d opencv_video opencv_
photo opencv_calib3d OPTIONAL opencv_gpu opencv_highgui
)
modules/videostab/include/opencv2/videostab/frame_source.hpp
View file @
ecf6b5a8
...
...
@@ -46,7 +46,6 @@
#include <vector>
#include <string>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
namespace
cv
{
...
...
@@ -76,15 +75,17 @@ public:
virtual
void
reset
();
virtual
Mat
nextFrame
();
int
width
()
{
return
static_cast
<
int
>
(
reader_
.
get
(
CV_CAP_PROP_FRAME_WIDTH
));
}
int
height
()
{
return
static_cast
<
int
>
(
reader_
.
get
(
CV_CAP_PROP_FRAME_HEIGHT
));
}
int
count
()
{
return
static_cast
<
int
>
(
reader_
.
get
(
CV_CAP_PROP_FRAME_COUNT
));
}
double
fps
()
{
return
reader_
.
get
(
CV_CAP_PROP_FPS
);
}
int
width
()
;
int
height
()
;
int
count
()
;
double
fps
()
;
private
:
std
::
string
path_
;
bool
volatileFrame_
;
VideoCapture
reader_
;
struct
VideoReader
;
const
VideoReader
&
reader_
;
};
}
// namespace videostab
...
...
modules/videostab/src/frame_source.cpp
View file @
ecf6b5a8
...
...
@@ -44,6 +44,11 @@
#include "opencv2/videostab/frame_source.hpp"
#include "opencv2/videostab/ring_buffer.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_HIGHGUI
# include "opencv2/highgui/highgui.hpp"
#endif
using
namespace
std
;
namespace
cv
...
...
@@ -51,25 +56,74 @@ namespace cv
namespace
videostab
{
struct
VideoFileSource
::
VideoReader
{
#ifdef HAVE_OPENCV_HIGHGUI
mutable
VideoCapture
vc
;
#endif
};
VideoFileSource
::
VideoFileSource
(
const
string
&
path
,
bool
volatileFrame
)
:
path_
(
path
),
volatileFrame_
(
volatileFrame
)
{
reset
();
}
:
path_
(
path
),
volatileFrame_
(
volatileFrame
)
,
reader_
(
VideoReader
())
{
reset
();
}
void
VideoFileSource
::
reset
()
{
reader_
.
release
();
reader_
.
open
(
path_
);
if
(
!
reader_
.
isOpened
())
#ifdef HAVE_OPENCV_HIGHGUI
reader_
.
vc
.
release
();
reader_
.
vc
.
open
(
path_
);
if
(
!
reader_
.
vc
.
isOpened
())
throw
runtime_error
(
"can't open file: "
+
path_
);
#else
CV_Error
(
CV_StsNotImplemented
,
"OpenCV has been compiled without video I/O support"
);
#endif
}
Mat
VideoFileSource
::
nextFrame
()
{
Mat
frame
;
reader_
>>
frame
;
#ifdef HAVE_OPENCV_HIGHGUI
reader_
.
vc
>>
frame
;
#endif
return
volatileFrame_
?
frame
:
frame
.
clone
();
}
int
VideoFileSource
::
width
()
{
#ifdef HAVE_OPENCV_HIGHGUI
return
static_cast
<
int
>
(
reader_
.
vc
.
get
(
CV_CAP_PROP_FRAME_WIDTH
));
#else
return
0
;
#endif
}
int
VideoFileSource
::
height
()
{
#ifdef HAVE_OPENCV_HIGHGUI
return
static_cast
<
int
>
(
reader_
.
vc
.
get
(
CV_CAP_PROP_FRAME_HEIGHT
));
#else
return
0
;
#endif
}
int
VideoFileSource
::
count
()
{
#ifdef HAVE_OPENCV_HIGHGUI
return
static_cast
<
int
>
(
reader_
.
vc
.
get
(
CV_CAP_PROP_FRAME_COUNT
));
#else
return
0
;
#endif
}
double
VideoFileSource
::
fps
()
{
#ifdef HAVE_OPENCV_HIGHGUI
return
reader_
.
vc
.
get
(
CV_CAP_PROP_FPS
);
#else
return
0
;
#endif
}
}
// namespace videostab
}
// namespace cv
modules/videostab/src/precomp.hpp
View file @
ecf6b5a8
...
...
@@ -51,7 +51,6 @@
#include <iostream>
#include <ctime>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/video/video.hpp"
#include "opencv2/features2d/features2d.hpp"
...
...
samples/cpp/dbt_face_detection.cpp
View file @
ecf6b5a8
...
...
@@ -38,7 +38,7 @@ class CascadeDetectorAdapter: public DetectionBasedTracker::IDetector
cv
::
Ptr
<
cv
::
CascadeClassifier
>
Detector
;
};
int
main
(
int
argc
,
char
*
argv
[]
)
int
main
(
int
,
char
**
)
{
namedWindow
(
WindowName
);
...
...
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