Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
02c7e221
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
02c7e221
编写于
12月 24, 2012
作者:
A
Andrey Kamaev
提交者:
OpenCV Buildbot
12月 24, 2012
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #252 from taka-no-me:fix_stlport_build
上级
0c3bdbf2
d6d1d208
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
48 addition
and
33 deletion
+48
-33
CMakeLists.txt
CMakeLists.txt
+1
-0
modules/androidcamera/src/camera_activity.cpp
modules/androidcamera/src/camera_activity.cpp
+12
-11
modules/contrib/src/chamfermatching.cpp
modules/contrib/src/chamfermatching.cpp
+2
-2
modules/contrib/src/spinimages.cpp
modules/contrib/src/spinimages.cpp
+1
-1
modules/core/include/opencv2/core/core.hpp
modules/core/include/opencv2/core/core.hpp
+1
-1
modules/core/include/opencv2/core/operations.hpp
modules/core/include/opencv2/core/operations.hpp
+2
-1
modules/features2d/src/keypoint.cpp
modules/features2d/src/keypoint.cpp
+3
-3
modules/features2d/src/matchers.cpp
modules/features2d/src/matchers.cpp
+3
-3
modules/features2d/src/precomp.hpp
modules/features2d/src/precomp.hpp
+2
-0
modules/stitching/src/autocalib.cpp
modules/stitching/src/autocalib.cpp
+1
-1
modules/stitching/src/stitcher.cpp
modules/stitching/src/stitcher.cpp
+1
-1
modules/ts/include/opencv2/ts/ts_gtest.h
modules/ts/include/opencv2/ts/ts_gtest.h
+8
-3
modules/videostab/src/inpainting.cpp
modules/videostab/src/inpainting.cpp
+1
-1
samples/c/facedetect.cpp
samples/c/facedetect.cpp
+1
-0
samples/cpp/bagofwords_classification.cpp
samples/cpp/bagofwords_classification.cpp
+2
-2
samples/cpp/calibration.cpp
samples/cpp/calibration.cpp
+2
-0
samples/cpp/point_cloud.cpp
samples/cpp/point_cloud.cpp
+2
-0
samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp
...orial_code/core/how_to_scan_images/how_to_scan_images.cpp
+2
-2
samples/cpp/videostab.cpp
samples/cpp/videostab.cpp
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
02c7e221
...
@@ -565,6 +565,7 @@ if(ANDROID)
...
@@ -565,6 +565,7 @@ if(ANDROID)
status
(
""
)
status
(
""
)
status
(
" Android: "
)
status
(
" Android: "
)
status
(
" Android ABI:"
${
ANDROID_ABI
}
)
status
(
" Android ABI:"
${
ANDROID_ABI
}
)
status
(
" STL type:"
${
ANDROID_STL
}
)
status
(
" Native API level:"
android-
${
ANDROID_NATIVE_API_LEVEL
}
)
status
(
" Native API level:"
android-
${
ANDROID_NATIVE_API_LEVEL
}
)
status
(
" SDK target:"
"
${
ANDROID_SDK_TARGET
}
"
)
status
(
" SDK target:"
"
${
ANDROID_SDK_TARGET
}
"
)
if
(
BUILD_WITH_ANDROID_NDK
)
if
(
BUILD_WITH_ANDROID_NDK
)
...
...
modules/androidcamera/src/camera_activity.cpp
浏览文件 @
02c7e221
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#include <sys/stat.h>
#include <sys/stat.h>
#include <dirent.h>
#include <dirent.h>
#include <android/log.h>
#include <android/log.h>
#include <cctype>
#include <string>
#include <string>
#include <vector>
#include <vector>
#include <algorithm>
#include <algorithm>
...
@@ -303,8 +304,8 @@ std::string CameraWrapperConnector::getPathLibFolder()
...
@@ -303,8 +304,8 @@ std::string CameraWrapperConnector::getPathLibFolder()
LOGD
(
"Library name: %s"
,
dl_info
.
dli_fname
);
LOGD
(
"Library name: %s"
,
dl_info
.
dli_fname
);
LOGD
(
"Library base address: %p"
,
dl_info
.
dli_fbase
);
LOGD
(
"Library base address: %p"
,
dl_info
.
dli_fbase
);
const
char
*
libName
=
dl_info
.
dli_fname
;
const
char
*
libName
=
dl_info
.
dli_fname
;
while
(
((
*
libName
)
==
'/'
)
||
((
*
libName
)
==
'.'
)
)
while
(
((
*
libName
)
==
'/'
)
||
((
*
libName
)
==
'.'
)
)
libName
++
;
libName
++
;
char
lineBuf
[
2048
];
char
lineBuf
[
2048
];
...
@@ -312,9 +313,9 @@ std::string CameraWrapperConnector::getPathLibFolder()
...
@@ -312,9 +313,9 @@ std::string CameraWrapperConnector::getPathLibFolder()
if
(
file
)
if
(
file
)
{
{
while
(
fgets
(
lineBuf
,
sizeof
lineBuf
,
file
)
!=
NULL
)
while
(
fgets
(
lineBuf
,
sizeof
lineBuf
,
file
)
!=
NULL
)
{
{
//verify that line ends with library name
//verify that line ends with library name
int
lineLength
=
strlen
(
lineBuf
);
int
lineLength
=
strlen
(
lineBuf
);
int
libNameLength
=
strlen
(
libName
);
int
libNameLength
=
strlen
(
libName
);
...
@@ -327,7 +328,7 @@ std::string CameraWrapperConnector::getPathLibFolder()
...
@@ -327,7 +328,7 @@ std::string CameraWrapperConnector::getPathLibFolder()
if
(
0
!=
strncmp
(
lineBuf
+
lineLength
-
libNameLength
,
libName
,
libNameLength
))
if
(
0
!=
strncmp
(
lineBuf
+
lineLength
-
libNameLength
,
libName
,
libNameLength
))
{
{
//the line does not contain the library name
//the line does not contain the library name
continue
;
continue
;
}
}
...
@@ -346,18 +347,18 @@ std::string CameraWrapperConnector::getPathLibFolder()
...
@@ -346,18 +347,18 @@ std::string CameraWrapperConnector::getPathLibFolder()
fclose
(
file
);
fclose
(
file
);
return
pathBegin
;
return
pathBegin
;
}
}
fclose
(
file
);
fclose
(
file
);
LOGE
(
"Could not find library path"
);
LOGE
(
"Could not find library path"
);
}
}
else
else
{
{
LOGE
(
"Could not read /proc/self/smaps"
);
LOGE
(
"Could not read /proc/self/smaps"
);
}
}
}
}
else
else
{
{
LOGE
(
"Could not get library name and base address"
);
LOGE
(
"Could not get library name and base address"
);
}
}
return
string
();
return
string
();
...
...
modules/contrib/src/chamfermatching.cpp
浏览文件 @
02c7e221
...
@@ -767,8 +767,8 @@ void ChamferMatcher::Matching::findContourOrientations(const template_coords_t&
...
@@ -767,8 +767,8 @@ void ChamferMatcher::Matching::findContourOrientations(const template_coords_t&
}
}
// get the middle two angles
// get the middle two angles
nth_element
(
angles
.
begin
(),
angles
.
begin
()
+
M
-
1
,
angles
.
end
());
std
::
nth_element
(
angles
.
begin
(),
angles
.
begin
()
+
M
-
1
,
angles
.
end
());
nth_element
(
angles
.
begin
()
+
M
-
1
,
angles
.
begin
()
+
M
,
angles
.
end
());
std
::
nth_element
(
angles
.
begin
()
+
M
-
1
,
angles
.
begin
()
+
M
,
angles
.
end
());
// sort(angles.begin(), angles.end());
// sort(angles.begin(), angles.end());
// average them to compute tangent
// average them to compute tangent
...
...
modules/contrib/src/spinimages.cpp
浏览文件 @
02c7e221
...
@@ -85,7 +85,7 @@ namespace
...
@@ -85,7 +85,7 @@ namespace
};
};
size_t
colors_mum
=
sizeof
(
colors
)
/
sizeof
(
colors
[
0
]);
size_t
colors_mum
=
sizeof
(
colors
)
/
sizeof
(
colors
[
0
]);
#if
defined __cplusplus && __cplusplus > 199711L
#if
(defined __cplusplus && __cplusplus > 199711L) || defined _STLPORT_MAJOR
#else
#else
template
<
class
FwIt
,
class
T
>
void
iota
(
FwIt
first
,
FwIt
last
,
T
value
)
{
while
(
first
!=
last
)
*
first
++
=
value
++
;
}
template
<
class
FwIt
,
class
T
>
void
iota
(
FwIt
first
,
FwIt
last
,
T
value
)
{
while
(
first
!=
last
)
*
first
++
=
value
++
;
}
#endif
#endif
...
...
modules/core/include/opencv2/core/core.hpp
浏览文件 @
02c7e221
...
@@ -4655,7 +4655,7 @@ class CV_EXPORTS CommandLineParser
...
@@ -4655,7 +4655,7 @@ class CV_EXPORTS CommandLineParser
template
<
typename
_Tp
>
template
<
typename
_Tp
>
static
_Tp
getData
(
const
std
::
string
&
str
)
static
_Tp
getData
(
const
std
::
string
&
str
)
{
{
_Tp
res
;
_Tp
res
=
_Tp
()
;
std
::
stringstream
s1
(
str
);
std
::
stringstream
s1
(
str
);
s1
>>
res
;
s1
>>
res
;
return
res
;
return
res
;
...
...
modules/core/include/opencv2/core/operations.hpp
浏览文件 @
02c7e221
...
@@ -65,7 +65,8 @@
...
@@ -65,7 +65,8 @@
#elif __GNUC__*10 + __GNUC_MINOR__ >= 42
#elif __GNUC__*10 + __GNUC_MINOR__ >= 42
#if !(defined WIN32 || defined _WIN32) && (defined __i486__ || defined __i586__ || \
#if !(defined WIN32 || defined _WIN32) && (defined __i486__ || defined __i586__ || \
defined __i686__ || defined __MMX__ || defined __SSE__ || defined __ppc__)
defined __i686__ || defined __MMX__ || defined __SSE__ || defined __ppc__) || \
(defined __GNUC__ && defined _STLPORT_MAJOR)
#define CV_XADD __sync_fetch_and_add
#define CV_XADD __sync_fetch_and_add
#else
#else
#include <ext/atomicity.h>
#include <ext/atomicity.h>
...
...
modules/features2d/src/keypoint.cpp
浏览文件 @
02c7e221
...
@@ -232,7 +232,7 @@ void KeyPointsFilter::runByImageBorder( vector<KeyPoint>& keypoints, Size imageS
...
@@ -232,7 +232,7 @@ void KeyPointsFilter::runByImageBorder( vector<KeyPoint>& keypoints, Size imageS
if
(
imageSize
.
height
<=
borderSize
*
2
||
imageSize
.
width
<=
borderSize
*
2
)
if
(
imageSize
.
height
<=
borderSize
*
2
||
imageSize
.
width
<=
borderSize
*
2
)
keypoints
.
clear
();
keypoints
.
clear
();
else
else
keypoints
.
erase
(
remove_if
(
keypoints
.
begin
(),
keypoints
.
end
(),
keypoints
.
erase
(
std
::
remove_if
(
keypoints
.
begin
(),
keypoints
.
end
(),
RoiPredicate
(
Rect
(
Point
(
borderSize
,
borderSize
),
RoiPredicate
(
Rect
(
Point
(
borderSize
,
borderSize
),
Point
(
imageSize
.
width
-
borderSize
,
imageSize
.
height
-
borderSize
)))),
Point
(
imageSize
.
width
-
borderSize
,
imageSize
.
height
-
borderSize
)))),
keypoints
.
end
()
);
keypoints
.
end
()
);
...
@@ -259,7 +259,7 @@ void KeyPointsFilter::runByKeypointSize( vector<KeyPoint>& keypoints, float minS
...
@@ -259,7 +259,7 @@ void KeyPointsFilter::runByKeypointSize( vector<KeyPoint>& keypoints, float minS
CV_Assert
(
maxSize
>=
0
);
CV_Assert
(
maxSize
>=
0
);
CV_Assert
(
minSize
<=
maxSize
);
CV_Assert
(
minSize
<=
maxSize
);
keypoints
.
erase
(
remove_if
(
keypoints
.
begin
(),
keypoints
.
end
(),
SizePredicate
(
minSize
,
maxSize
)),
keypoints
.
erase
(
std
::
remove_if
(
keypoints
.
begin
(),
keypoints
.
end
(),
SizePredicate
(
minSize
,
maxSize
)),
keypoints
.
end
()
);
keypoints
.
end
()
);
}
}
...
@@ -282,7 +282,7 @@ void KeyPointsFilter::runByPixelsMask( vector<KeyPoint>& keypoints, const Mat& m
...
@@ -282,7 +282,7 @@ void KeyPointsFilter::runByPixelsMask( vector<KeyPoint>& keypoints, const Mat& m
if
(
mask
.
empty
()
)
if
(
mask
.
empty
()
)
return
;
return
;
keypoints
.
erase
(
remove_if
(
keypoints
.
begin
(),
keypoints
.
end
(),
MaskPredicate
(
mask
)),
keypoints
.
end
());
keypoints
.
erase
(
std
::
remove_if
(
keypoints
.
begin
(),
keypoints
.
end
(),
MaskPredicate
(
mask
)),
keypoints
.
end
());
}
}
struct
KeyPoint_LessThan
struct
KeyPoint_LessThan
...
...
modules/features2d/src/matchers.cpp
浏览文件 @
02c7e221
...
@@ -77,7 +77,7 @@ DescriptorMatcher::DescriptorCollection::DescriptorCollection()
...
@@ -77,7 +77,7 @@ DescriptorMatcher::DescriptorCollection::DescriptorCollection()
DescriptorMatcher
::
DescriptorCollection
::
DescriptorCollection
(
const
DescriptorCollection
&
collection
)
DescriptorMatcher
::
DescriptorCollection
::
DescriptorCollection
(
const
DescriptorCollection
&
collection
)
{
{
mergedDescriptors
=
collection
.
mergedDescriptors
.
clone
();
mergedDescriptors
=
collection
.
mergedDescriptors
.
clone
();
copy
(
collection
.
startIdxs
.
begin
(),
collection
.
startIdxs
.
begin
(),
startIdxs
.
begin
()
);
std
::
copy
(
collection
.
startIdxs
.
begin
(),
collection
.
startIdxs
.
begin
(),
startIdxs
.
begin
()
);
}
}
DescriptorMatcher
::
DescriptorCollection
::~
DescriptorCollection
()
DescriptorMatcher
::
DescriptorCollection
::~
DescriptorCollection
()
...
@@ -807,9 +807,9 @@ GenericDescriptorMatcher::KeyPointCollection::KeyPointCollection( const KeyPoint
...
@@ -807,9 +807,9 @@ GenericDescriptorMatcher::KeyPointCollection::KeyPointCollection( const KeyPoint
keypoints
.
resize
(
collection
.
keypoints
.
size
()
);
keypoints
.
resize
(
collection
.
keypoints
.
size
()
);
for
(
size_t
i
=
0
;
i
<
keypoints
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
keypoints
.
size
();
i
++
)
copy
(
collection
.
keypoints
[
i
].
begin
(),
collection
.
keypoints
[
i
].
end
(),
keypoints
[
i
].
begin
()
);
std
::
copy
(
collection
.
keypoints
[
i
].
begin
(),
collection
.
keypoints
[
i
].
end
(),
keypoints
[
i
].
begin
()
);
copy
(
collection
.
startIndices
.
begin
(),
collection
.
startIndices
.
end
(),
startIndices
.
begin
()
);
std
::
copy
(
collection
.
startIndices
.
begin
(),
collection
.
startIndices
.
end
(),
startIndices
.
begin
()
);
}
}
void
GenericDescriptorMatcher
::
KeyPointCollection
::
add
(
const
vector
<
Mat
>&
_images
,
void
GenericDescriptorMatcher
::
KeyPointCollection
::
add
(
const
vector
<
Mat
>&
_images
,
...
...
modules/features2d/src/precomp.hpp
浏览文件 @
02c7e221
...
@@ -52,6 +52,8 @@
...
@@ -52,6 +52,8 @@
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/internal.hpp"
#include "opencv2/core/internal.hpp"
#include <algorithm>
#ifdef HAVE_TEGRA_OPTIMIZATION
#ifdef HAVE_TEGRA_OPTIMIZATION
#include "opencv2/features2d/features2d_tegra.hpp"
#include "opencv2/features2d/features2d_tegra.hpp"
#endif
#endif
...
...
modules/stitching/src/autocalib.cpp
浏览文件 @
02c7e221
...
@@ -122,7 +122,7 @@ void estimateFocal(const vector<ImageFeatures> &features, const vector<MatchesIn
...
@@ -122,7 +122,7 @@ void estimateFocal(const vector<ImageFeatures> &features, const vector<MatchesIn
{
{
double
median
;
double
median
;
sort
(
all_focals
.
begin
(),
all_focals
.
end
());
s
td
::
s
ort
(
all_focals
.
begin
(),
all_focals
.
end
());
if
(
all_focals
.
size
()
%
2
==
1
)
if
(
all_focals
.
size
()
%
2
==
1
)
median
=
all_focals
[
all_focals
.
size
()
/
2
];
median
=
all_focals
[
all_focals
.
size
()
/
2
];
else
else
...
...
modules/stitching/src/stitcher.cpp
浏览文件 @
02c7e221
...
@@ -468,7 +468,7 @@ void Stitcher::estimateCameraParams()
...
@@ -468,7 +468,7 @@ void Stitcher::estimateCameraParams()
focals
.
push_back
(
cameras_
[
i
].
focal
);
focals
.
push_back
(
cameras_
[
i
].
focal
);
}
}
sort
(
focals
.
begin
(),
focals
.
end
());
s
td
::
s
ort
(
focals
.
begin
(),
focals
.
end
());
if
(
focals
.
size
()
%
2
==
1
)
if
(
focals
.
size
()
%
2
==
1
)
warped_image_scale_
=
static_cast
<
float
>
(
focals
[
focals
.
size
()
/
2
]);
warped_image_scale_
=
static_cast
<
float
>
(
focals
[
focals
.
size
()
/
2
]);
else
else
...
...
modules/ts/include/opencv2/ts/ts_gtest.h
浏览文件 @
02c7e221
...
@@ -564,7 +564,7 @@
...
@@ -564,7 +564,7 @@
# define GTEST_HAS_RTTI 0
# define GTEST_HAS_RTTI 0
# else
# else
# define GTEST_HAS_RTTI 1
# define GTEST_HAS_RTTI 1
# endif // GTEST_OS_LINUX_ANDROID && _
_
STLPORT_MAJOR && !__EXCEPTIONS
# endif // GTEST_OS_LINUX_ANDROID && _STLPORT_MAJOR && !__EXCEPTIONS
# else
# else
# define GTEST_HAS_RTTI 0
# define GTEST_HAS_RTTI 0
# endif // __GXX_RTTI
# endif // __GXX_RTTI
...
@@ -650,8 +650,11 @@
...
@@ -650,8 +650,11 @@
// support TR1 tuple. libc++ only provides std::tuple, in C++11 mode,
// support TR1 tuple. libc++ only provides std::tuple, in C++11 mode,
// and it can be used with some compilers that define __GNUC__.
// and it can be used with some compilers that define __GNUC__.
# if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000) \
# if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000) \
&& !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) || _MSC_VER >= 1600
&& !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) && !defined(_STLPORT_MAJOR) \
|| (defined(_MSC_VER) && _MSC_VER >= 1600)
# define GTEST_ENV_HAS_TR1_TUPLE_ 1
# define GTEST_ENV_HAS_TR1_TUPLE_ 1
# else
# define GTEST_ENV_HAS_TR1_TUPLE_ 0
# endif
# endif
// C++11 specifies that <tuple> provides std::tuple. Use that if gtest is used
// C++11 specifies that <tuple> provides std::tuple. Use that if gtest is used
...
@@ -659,7 +662,7 @@
...
@@ -659,7 +662,7 @@
// can build with clang but need to use gcc4.2's libstdc++).
// can build with clang but need to use gcc4.2's libstdc++).
# if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325)
# if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325)
# define GTEST_ENV_HAS_STD_TUPLE_ 1
# define GTEST_ENV_HAS_STD_TUPLE_ 1
#else
#
else
# define GTEST_ENV_HAS_STD_TUPLE_ 0
# define GTEST_ENV_HAS_STD_TUPLE_ 0
# endif
# endif
...
@@ -667,6 +670,8 @@
...
@@ -667,6 +670,8 @@
# define GTEST_USE_OWN_TR1_TUPLE 0
# define GTEST_USE_OWN_TR1_TUPLE 0
# else
# else
# define GTEST_USE_OWN_TR1_TUPLE 1
# define GTEST_USE_OWN_TR1_TUPLE 1
# undef GTEST_HAS_TR1_TUPLE
# define GTEST_HAS_TR1_TUPLE 1
# endif
# endif
#endif // GTEST_USE_OWN_TR1_TUPLE
#endif // GTEST_USE_OWN_TR1_TUPLE
...
...
modules/videostab/src/inpainting.cpp
浏览文件 @
02c7e221
...
@@ -172,7 +172,7 @@ void ConsistentMosaicInpainter::inpaint(int idx, Mat &frame, Mat &mask)
...
@@ -172,7 +172,7 @@ void ConsistentMosaicInpainter::inpaint(int idx, Mat &frame, Mat &mask)
if
(
var
<
stdevThresh_
*
stdevThresh_
)
if
(
var
<
stdevThresh_
*
stdevThresh_
)
{
{
sort
(
pixels
.
begin
(),
pixels
.
begin
()
+
n
);
s
td
::
s
ort
(
pixels
.
begin
(),
pixels
.
begin
()
+
n
);
int
nh
=
(
n
-
1
)
/
2
;
int
nh
=
(
n
-
1
)
/
2
;
int
c1
=
pixels
[
nh
].
color
.
x
;
int
c1
=
pixels
[
nh
].
color
.
x
;
int
c2
=
pixels
[
nh
].
color
.
y
;
int
c2
=
pixels
[
nh
].
color
.
y
;
...
...
samples/c/facedetect.cpp
浏览文件 @
02c7e221
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <cctype>
#include <iostream>
#include <iostream>
#include <iterator>
#include <iterator>
#include <stdio.h>
#include <stdio.h>
...
...
samples/cpp/bagofwords_classification.cpp
浏览文件 @
02c7e221
...
@@ -1453,7 +1453,7 @@ void VocData::readClassifierGroundTruth(const string& filename, vector<string>&
...
@@ -1453,7 +1453,7 @@ void VocData::readClassifierGroundTruth(const string& filename, vector<string>&
string
line
;
string
line
;
string
image
;
string
image
;
int
obj_present
;
int
obj_present
=
0
;
while
(
!
gtfile
.
eof
())
while
(
!
gtfile
.
eof
())
{
{
std
::
getline
(
gtfile
,
line
);
std
::
getline
(
gtfile
,
line
);
...
@@ -1826,7 +1826,7 @@ void VocData::readFileToString(const string filename, string& file_contents)
...
@@ -1826,7 +1826,7 @@ void VocData::readFileToString(const string filename, string& file_contents)
int
VocData
::
stringToInteger
(
const
string
input_str
)
int
VocData
::
stringToInteger
(
const
string
input_str
)
{
{
int
result
;
int
result
=
0
;
stringstream
ss
(
input_str
);
stringstream
ss
(
input_str
);
if
((
ss
>>
result
).
fail
())
if
((
ss
>>
result
).
fail
())
...
...
samples/cpp/calibration.cpp
浏览文件 @
02c7e221
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <cctype>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <time.h>
#include <time.h>
...
...
samples/cpp/point_cloud.cpp
浏览文件 @
02c7e221
#include <cctype>
#include <cstring>
#include <cstring>
#include <cmath>
#include <cmath>
#include <iostream>
#include <iostream>
#include <sstream>
#include <sstream>
#include "opencv2/core/core.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/core/opengl_interop.hpp"
#include "opencv2/core/opengl_interop.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/highgui/highgui.hpp"
...
...
samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp
浏览文件 @
02c7e221
...
@@ -45,11 +45,11 @@ int main( int argc, char* argv[])
...
@@ -45,11 +45,11 @@ int main( int argc, char* argv[])
return
-
1
;
return
-
1
;
}
}
int
divideWith
;
// convert our input string to number - C++ style
int
divideWith
=
0
;
// convert our input string to number - C++ style
stringstream
s
;
stringstream
s
;
s
<<
argv
[
2
];
s
<<
argv
[
2
];
s
>>
divideWith
;
s
>>
divideWith
;
if
(
!
s
)
if
(
!
s
||
!
divideWith
)
{
{
cout
<<
"Invalid number entered for dividing. "
<<
endl
;
cout
<<
"Invalid number entered for dividing. "
<<
endl
;
return
-
1
;
return
-
1
;
...
...
samples/cpp/videostab.cpp
浏览文件 @
02c7e221
...
@@ -32,7 +32,7 @@ public:
...
@@ -32,7 +32,7 @@ public:
ifstream
f
(
path
.
c_str
());
ifstream
f
(
path
.
c_str
());
if
(
!
f
.
is_open
())
if
(
!
f
.
is_open
())
throw
runtime_error
(
"can't open motions file: "
+
path
);
throw
runtime_error
(
"can't open motions file: "
+
path
);
int
size
;
f
>>
size
;
int
size
=
0
;
f
>>
size
;
motions_
.
resize
(
size
);
motions_
.
resize
(
size
);
for
(
int
i
=
0
;
i
<
size
;
++
i
)
for
(
int
i
=
0
;
i
<
size
;
++
i
)
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录