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
ae839df5
Commit
ae839df5
authored
Apr 11, 2012
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added WITH_CLP flag support into cmake scripts.
parent
b5a1bad7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
1 deletion
+65
-1
CMakeLists.txt
CMakeLists.txt
+18
-0
cvconfig.h.cmake
cmake/templates/cvconfig.h.cmake
+3
-0
motion_stabilizing.hpp
...ideostab/include/opencv2/videostab/motion_stabilizing.hpp
+17
-0
optical_flow.hpp
modules/videostab/include/opencv2/videostab/optical_flow.hpp
+1
-1
motion_stabilizing.cpp
modules/videostab/src/motion_stabilizing.cpp
+26
-0
No files found.
CMakeLists.txt
View file @
ae839df5
...
@@ -124,6 +124,7 @@ OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON
...
@@ -124,6 +124,7 @@ OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON
OCV_OPTION
(
WITH_VIDEOINPUT
"Build HighGUI with DirectShow support"
ON IF WIN32
)
OCV_OPTION
(
WITH_VIDEOINPUT
"Build HighGUI with DirectShow support"
ON IF WIN32
)
OCV_OPTION
(
WITH_XIMEA
"Include XIMEA cameras support"
OFF IF WIN32
)
OCV_OPTION
(
WITH_XIMEA
"Include XIMEA cameras support"
OFF IF WIN32
)
OCV_OPTION
(
WITH_XINE
"Include Xine support (GPL)"
OFF
IF
(
UNIX AND NOT APPLE AND NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_XINE
"Include Xine support (GPL)"
OFF
IF
(
UNIX AND NOT APPLE AND NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_CLP
"Include Clp support (EPL)"
OFF
IF
(
NOT ANDROID AND NOT IOS
)
)
# OpenCV build components
# OpenCV build components
# ===================================================
# ===================================================
...
@@ -527,6 +528,22 @@ if(WITH_EIGEN)
...
@@ -527,6 +528,22 @@ if(WITH_EIGEN)
endif
()
endif
()
endif
()
endif
()
########################## Clp #####################################
set
(
HAVE_CLP FALSE
)
if
(
WITH_CLP
)
find_path
(
CLP_INCLUDE_PATH
"coin"
PATHS
"/usr/local/include"
"/usr/include"
"/opt/include"
DOC
"The path to Clp headers"
)
if
(
CLP_INCLUDE_PATH
)
ocv_include_directories
(
${
CLP_INCLUDE_PATH
}
)
set
(
CLP_LIBRARY_DIR
"
${
CLP_INCLUDE_PATH
}
/../lib"
CACHE PATH
"Full path of Clp library directory"
)
link_directories
(
${
CLP_LIBRARY_DIR
}
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
Clp OsiClp CoinUtils
)
set
(
HAVE_CLP TRUE
)
endif
()
endif
()
################## Extra HighGUI libs on Windows ###################
################## Extra HighGUI libs on Windows ###################
if
(
WIN32
)
if
(
WIN32
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
comctl32 gdi32 ole32
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
comctl32 gdi32 ole32
)
...
@@ -799,6 +816,7 @@ endif()
...
@@ -799,6 +816,7 @@ endif()
status
(
" Use TBB:"
HAVE_TBB THEN YES ELSE NO
)
status
(
" Use TBB:"
HAVE_TBB THEN YES ELSE NO
)
status
(
" Use Cuda:"
HAVE_CUDA THEN YES ELSE NO
)
status
(
" Use Cuda:"
HAVE_CUDA THEN YES ELSE NO
)
status
(
" Use Eigen:"
HAVE_EIGEN THEN YES ELSE NO
)
status
(
" Use Eigen:"
HAVE_EIGEN THEN YES ELSE NO
)
status
(
" Use Clp:"
HAVE_CLP THEN YES ELSE NO
)
status
(
""
)
status
(
""
)
status
(
" Python interpreter:"
PYTHON_EXECUTABLE THEN
"
${
PYTHON_EXECUTABLE
}
(ver
${
PYTHON_VERSION_MAJOR_MINOR
}
)"
ELSE NO
)
status
(
" Python interpreter:"
PYTHON_EXECUTABLE THEN
"
${
PYTHON_EXECUTABLE
}
(ver
${
PYTHON_VERSION_MAJOR_MINOR
}
)"
ELSE NO
)
...
...
cmake/templates/cvconfig.h.cmake
View file @
ae839df5
...
@@ -195,3 +195,6 @@
...
@@ -195,3 +195,6 @@
/* OpenGL support*/
/* OpenGL support*/
#cmakedefine HAVE_OPENGL
#cmakedefine HAVE_OPENGL
/* Clp support */
#cmakedefine HAVE_CLP
modules/videostab/include/opencv2/videostab/motion_stabilizing.hpp
View file @
ae839df5
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
#include <vector>
#include <vector>
#include <utility>
#include <utility>
#include "opencv2/core/core.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/videostab/global_motion.hpp"
namespace
cv
namespace
cv
{
{
...
@@ -108,6 +109,22 @@ private:
...
@@ -108,6 +109,22 @@ private:
std
::
vector
<
float
>
weight_
;
std
::
vector
<
float
>
weight_
;
};
};
class
CV_EXPORTS
LpMotionStabilizer
:
public
IMotionStabilizer
{
public
:
LpMotionStabilizer
(
MotionModel
model
=
LINEAR_SIMILARITY
);
void
setMotionModel
(
MotionModel
val
)
{
model_
=
val
;
}
MotionModel
motionModel
()
const
{
return
model_
;
}
virtual
void
stabilize
(
int
size
,
const
std
::
vector
<
Mat
>
&
motions
,
std
::
pair
<
int
,
int
>
range
,
Mat
*
stabilizationMotions
)
const
;
private
:
MotionModel
model_
;
};
CV_EXPORTS
Mat
ensureInclusionConstraint
(
const
Mat
&
M
,
Size
size
,
float
trimRatio
);
CV_EXPORTS
Mat
ensureInclusionConstraint
(
const
Mat
&
M
,
Size
size
,
float
trimRatio
);
CV_EXPORTS
float
estimateOptimalTrimRatio
(
const
Mat
&
M
,
Size
size
);
CV_EXPORTS
float
estimateOptimalTrimRatio
(
const
Mat
&
M
,
Size
size
);
...
...
modules/videostab/include/opencv2/videostab/optical_flow.hpp
View file @
ae839df5
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
#include "opencv2/opencv_modules.hpp"
#include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_GPU
#if HAVE_OPENCV_GPU
#
include "opencv2/gpu/gpu.hpp"
#include "opencv2/gpu/gpu.hpp"
#endif
#endif
namespace
cv
namespace
cv
...
...
modules/videostab/src/motion_stabilizing.cpp
View file @
ae839df5
...
@@ -45,6 +45,10 @@
...
@@ -45,6 +45,10 @@
#include "opencv2/videostab/global_motion.hpp"
#include "opencv2/videostab/global_motion.hpp"
#include "opencv2/videostab/ring_buffer.hpp"
#include "opencv2/videostab/ring_buffer.hpp"
#ifdef HAVE_CLP
#include "coin/ClpSimplex.hpp"
#endif
using
namespace
std
;
using
namespace
std
;
namespace
cv
namespace
cv
...
@@ -254,5 +258,27 @@ float estimateOptimalTrimRatio(const Mat &M, Size size)
...
@@ -254,5 +258,27 @@ float estimateOptimalTrimRatio(const Mat &M, Size size)
return
r
;
return
r
;
}
}
LpMotionStabilizer
::
LpMotionStabilizer
(
MotionModel
model
)
{
setMotionModel
(
model
);
}
#ifndef HAVE_CLP
void
LpMotionStabilizer
::
stabilize
(
int
,
const
vector
<
Mat
>&
,
pair
<
int
,
int
>
,
Mat
*
)
const
{
CV_Error
(
CV_StsError
,
"The library is built without Clp support"
);
}
#else
void
LpMotionStabilizer
::
stabilize
(
int
size
,
const
vector
<
Mat
>
&
motions
,
pair
<
int
,
int
>
range
,
Mat
*
stabilizationMotions
)
const
{
// TODO implement
CV_Error
(
CV_StsNotImplemented
,
"LpMotionStabilizer::stabilize"
);
}
#endif
}
// namespace videostab
}
// namespace videostab
}
// namespace cv
}
// namespace cv
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