Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
1a621c29
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,发现更多精彩内容 >>
提交
1a621c29
编写于
8月 19, 2012
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix build warnings
上级
7d2b7b80
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
35 addition
and
35 deletion
+35
-35
modules/calib3d/src/triangulate.cpp
modules/calib3d/src/triangulate.cpp
+2
-2
modules/gpu/src/graphcuts.cpp
modules/gpu/src/graphcuts.cpp
+1
-1
modules/gpu/test/test_imgproc.cpp
modules/gpu/test/test_imgproc.cpp
+1
-1
modules/imgproc/perf/perf_warp.cpp
modules/imgproc/perf/perf_warp.cpp
+8
-8
modules/ml/src/em.cpp
modules/ml/src/em.cpp
+1
-1
modules/nonfree/test/test_rotation_and_scale_invariance.cpp
modules/nonfree/test/test_rotation_and_scale_invariance.cpp
+15
-15
modules/objdetect/src/hog.cpp
modules/objdetect/src/hog.cpp
+1
-1
modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp
...itching/include/opencv2/stitching/detail/seam_finders.hpp
+1
-1
modules/stitching/src/seam_finders.cpp
modules/stitching/src/seam_finders.cpp
+4
-4
modules/video/src/bgfg_gmg.cpp
modules/video/src/bgfg_gmg.cpp
+1
-1
未找到文件。
modules/calib3d/src/triangulate.cpp
浏览文件 @
1a621c29
...
...
@@ -416,10 +416,10 @@ void cv::triangulatePoints( InputArray _projMatr1, InputArray _projMatr2,
Mat
points1
=
_projPoints1
.
getMat
(),
points2
=
_projPoints2
.
getMat
();
if
((
points1
.
rows
==
1
||
points1
.
cols
==
1
)
&&
points1
.
channels
()
==
2
)
points1
=
points1
.
reshape
(
1
,
points1
.
total
(
)).
t
();
points1
=
points1
.
reshape
(
1
,
static_cast
<
int
>
(
points1
.
total
()
)).
t
();
if
((
points2
.
rows
==
1
||
points2
.
cols
==
1
)
&&
points2
.
channels
()
==
2
)
points2
=
points2
.
reshape
(
1
,
points2
.
total
(
)).
t
();
points2
=
points2
.
reshape
(
1
,
static_cast
<
int
>
(
points2
.
total
()
)).
t
();
CvMat
cvMatr1
=
matr1
,
cvMatr2
=
matr2
;
CvMat
cvPoints1
=
points1
,
cvPoints2
=
points2
;
...
...
modules/gpu/src/graphcuts.cpp
浏览文件 @
1a621c29
...
...
@@ -48,7 +48,7 @@ void cv::gpu::graphcut(GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, Gpu
void
cv
::
gpu
::
graphcut
(
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
Stream
&
)
{
throw_nogpu
();
}
void
cv
::
gpu
::
connectivityMask
(
const
GpuMat
&
,
GpuMat
&
,
const
cv
::
Scalar
&
,
const
cv
::
Scalar
&
,
Stream
&
)
{
throw_nogpu
();
}
void
cv
::
gpu
::
labelComponents
(
const
GpuMat
&
mask
,
GpuMat
&
components
,
int
,
Stream
&
stream
)
{
throw_nogpu
();
}
void
cv
::
gpu
::
labelComponents
(
const
GpuMat
&
,
GpuMat
&
,
int
,
Stream
&
)
{
throw_nogpu
();
}
#else
/* !defined (HAVE_CUDA) */
...
...
modules/gpu/test/test_imgproc.cpp
浏览文件 @
1a621c29
...
...
@@ -1154,7 +1154,7 @@ TEST_P(HoughLines, Accuracy)
const
std
::
string
fileName
=
GET_PARAM
(
1
);
const
float
rho
=
1.0
f
;
const
float
theta
=
CV_PI
/
180.0
f
;
const
float
theta
=
static_cast
<
float
>
(
CV_PI
/
180
)
;
const
int
threshold
=
50
;
cv
::
Mat
img
=
readImage
(
fileName
,
cv
::
IMREAD_GRAYSCALE
);
...
...
modules/imgproc/perf/perf_warp.cpp
浏览文件 @
1a621c29
...
...
@@ -125,8 +125,8 @@ void update_map(const Mat& src, Mat& map_x, Mat& map_y, const int remapMode )
case
HALF_SIZE
:
if
(
i
>
src
.
cols
*
0.25
&&
i
<
src
.
cols
*
0.75
&&
j
>
src
.
rows
*
0.25
&&
j
<
src
.
rows
*
0.75
)
{
map_x
.
at
<
float
>
(
j
,
i
)
=
2
*
(
i
-
src
.
cols
*
0.25
)
+
0.5
;
map_y
.
at
<
float
>
(
j
,
i
)
=
2
*
(
j
-
src
.
rows
*
0.25
)
+
0.5
;
map_x
.
at
<
float
>
(
j
,
i
)
=
2
*
(
i
-
src
.
cols
*
0.25
f
)
+
0.5
f
;
map_y
.
at
<
float
>
(
j
,
i
)
=
2
*
(
j
-
src
.
rows
*
0.25
f
)
+
0.5
f
;
}
else
{
...
...
@@ -135,16 +135,16 @@ void update_map(const Mat& src, Mat& map_x, Mat& map_y, const int remapMode )
}
break
;
case
UPSIDE_DOWN
:
map_x
.
at
<
float
>
(
j
,
i
)
=
i
;
map_y
.
at
<
float
>
(
j
,
i
)
=
s
rc
.
rows
-
j
;
map_x
.
at
<
float
>
(
j
,
i
)
=
static_cast
<
float
>
(
i
)
;
map_y
.
at
<
float
>
(
j
,
i
)
=
s
tatic_cast
<
float
>
(
src
.
rows
-
j
)
;
break
;
case
REFLECTION_X
:
map_x
.
at
<
float
>
(
j
,
i
)
=
s
rc
.
cols
-
i
;
map_y
.
at
<
float
>
(
j
,
i
)
=
j
;
map_x
.
at
<
float
>
(
j
,
i
)
=
s
tatic_cast
<
float
>
(
src
.
cols
-
i
)
;
map_y
.
at
<
float
>
(
j
,
i
)
=
static_cast
<
float
>
(
j
)
;
break
;
case
REFLECTION_BOTH
:
map_x
.
at
<
float
>
(
j
,
i
)
=
s
rc
.
cols
-
i
;
map_y
.
at
<
float
>
(
j
,
i
)
=
s
rc
.
rows
-
j
;
map_x
.
at
<
float
>
(
j
,
i
)
=
s
tatic_cast
<
float
>
(
src
.
cols
-
i
)
;
map_y
.
at
<
float
>
(
j
,
i
)
=
s
tatic_cast
<
float
>
(
src
.
rows
-
j
)
;
break
;
}
// end of switch
}
...
...
modules/ml/src/em.cpp
浏览文件 @
1a621c29
...
...
@@ -386,7 +386,7 @@ void EM::computeLogWeightDivDet()
for
(
int
clusterIndex
=
0
;
clusterIndex
<
nclusters
;
clusterIndex
++
)
{
double
logDetCov
=
0.
;
const
int
evalCount
=
covsEigenValues
[
clusterIndex
].
total
(
);
const
int
evalCount
=
static_cast
<
int
>
(
covsEigenValues
[
clusterIndex
].
total
()
);
for
(
int
di
=
0
;
di
<
evalCount
;
di
++
)
logDetCov
+=
std
::
log
(
covsEigenValues
[
clusterIndex
].
at
<
double
>
(
covMatType
!=
EM
::
COV_MAT_SPHERICAL
?
di
:
0
));
...
...
modules/nonfree/test/test_rotation_and_scale_invariance.cpp
浏览文件 @
1a621c29
...
...
@@ -54,7 +54,7 @@ static
Mat
generateHomography
(
float
angle
)
{
// angle - rotation around Oz in degrees
float
angleRadian
=
angle
*
CV_PI
/
180.
;
float
angleRadian
=
static_cast
<
float
>
(
angle
*
CV_PI
/
180
)
;
Mat
H
=
Mat
::
eye
(
3
,
3
,
CV_32FC1
);
H
.
at
<
float
>
(
0
,
0
)
=
H
.
at
<
float
>
(
1
,
1
)
=
std
::
cos
(
angleRadian
);
H
.
at
<
float
>
(
0
,
1
)
=
-
std
::
sin
(
angleRadian
);
...
...
@@ -69,8 +69,8 @@ Mat rotateImage(const Mat& srcImage, float angle, Mat& dstImage, Mat& dstMask)
// angle - rotation around Oz in degrees
float
diag
=
std
::
sqrt
(
static_cast
<
float
>
(
srcImage
.
cols
*
srcImage
.
cols
+
srcImage
.
rows
*
srcImage
.
rows
));
Mat
LUShift
=
Mat
::
eye
(
3
,
3
,
CV_32FC1
);
// left up
LUShift
.
at
<
float
>
(
0
,
2
)
=
-
srcImage
.
cols
/
2
;
LUShift
.
at
<
float
>
(
1
,
2
)
=
-
srcImage
.
rows
/
2
;
LUShift
.
at
<
float
>
(
0
,
2
)
=
static_cast
<
float
>
(
-
srcImage
.
cols
/
2
)
;
LUShift
.
at
<
float
>
(
1
,
2
)
=
static_cast
<
float
>
(
-
srcImage
.
rows
/
2
)
;
Mat
RDShift
=
Mat
::
eye
(
3
,
3
,
CV_32FC1
);
// right down
RDShift
.
at
<
float
>
(
0
,
2
)
=
diag
/
2
;
RDShift
.
at
<
float
>
(
1
,
2
)
=
diag
/
2
;
...
...
@@ -114,7 +114,7 @@ void scaleKeyPoints(const vector<KeyPoint>& src, vector<KeyPoint>& dst, float sc
static
float
calcCirclesIntersectArea
(
const
Point2f
&
p0
,
float
r0
,
const
Point2f
&
p1
,
float
r1
)
{
float
c
=
norm
(
p0
-
p1
),
sqr_c
=
c
*
c
;
float
c
=
static_cast
<
float
>
(
norm
(
p0
-
p1
)
),
sqr_c
=
c
*
c
;
float
sqr_r0
=
r0
*
r0
;
float
sqr_r1
=
r1
*
r1
;
...
...
@@ -125,7 +125,7 @@ float calcCirclesIntersectArea(const Point2f& p0, float r0, const Point2f& p1, f
float
minR
=
std
::
min
(
r0
,
r1
);
float
maxR
=
std
::
max
(
r0
,
r1
);
if
(
c
+
minR
<=
maxR
)
return
CV_PI
*
minR
*
minR
;
return
static_cast
<
float
>
(
CV_PI
*
minR
*
minR
)
;
float
cos_halfA0
=
(
sqr_r0
+
sqr_c
-
sqr_r1
)
/
(
2
*
r0
*
c
);
float
cos_halfA1
=
(
sqr_r1
+
sqr_c
-
sqr_r0
)
/
(
2
*
r1
*
c
);
...
...
@@ -133,15 +133,15 @@ float calcCirclesIntersectArea(const Point2f& p0, float r0, const Point2f& p1, f
float
A0
=
2
*
acos
(
cos_halfA0
);
float
A1
=
2
*
acos
(
cos_halfA1
);
return
0.5
*
sqr_r0
*
(
A0
-
sin
(
A0
))
+
0.5
*
sqr_r1
*
(
A1
-
sin
(
A1
));
return
0.5
f
*
sqr_r0
*
(
A0
-
sin
(
A0
))
+
0.5
f
*
sqr_r1
*
(
A1
-
sin
(
A1
));
}
static
float
calcIntersectRatio
(
const
Point2f
&
p0
,
float
r0
,
const
Point2f
&
p1
,
float
r1
)
{
float
intersectArea
=
calcCirclesIntersectArea
(
p0
,
r0
,
p1
,
r1
);
float
unionArea
=
CV_PI
*
(
r0
*
r0
+
r1
*
r1
)
-
intersectArea
;
float
unionArea
=
static_cast
<
float
>
(
CV_PI
)
*
(
r0
*
r0
+
r1
*
r1
)
-
intersectArea
;
return
intersectArea
/
unionArea
;
}
...
...
@@ -160,7 +160,7 @@ void matchKeyPoints(const vector<KeyPoint>& keypoints0, const Mat& H,
matches
.
clear
();
vector
<
uchar
>
usedMask
(
keypoints1
.
size
(),
0
);
for
(
size_t
i0
=
0
;
i0
<
keypoints0
.
size
(
);
i0
++
)
for
(
int
i0
=
0
;
i0
<
static_cast
<
int
>
(
keypoints0
.
size
()
);
i0
++
)
{
int
nearestPointIndex
=
-
1
;
float
maxIntersectRatio
=
0.
f
;
...
...
@@ -176,7 +176,7 @@ void matchKeyPoints(const vector<KeyPoint>& keypoints0, const Mat& H,
if
(
intersectRatio
>
maxIntersectRatio
)
{
maxIntersectRatio
=
intersectRatio
;
nearestPointIndex
=
i1
;
nearestPointIndex
=
static_cast
<
int
>
(
i1
)
;
}
}
...
...
@@ -222,7 +222,7 @@ protected:
const
int
maxAngle
=
360
,
angleStep
=
15
;
for
(
int
angle
=
0
;
angle
<
maxAngle
;
angle
+=
angleStep
)
{
Mat
H
=
rotateImage
(
image0
,
angle
,
image1
,
mask1
);
Mat
H
=
rotateImage
(
image0
,
static_cast
<
float
>
(
angle
)
,
image1
,
mask1
);
vector
<
KeyPoint
>
keypoints1
;
featureDetector
->
detect
(
image1
,
keypoints1
,
mask1
);
...
...
@@ -339,10 +339,10 @@ protected:
const
int
maxAngle
=
360
,
angleStep
=
15
;
for
(
int
angle
=
0
;
angle
<
maxAngle
;
angle
+=
angleStep
)
{
Mat
H
=
rotateImage
(
image0
,
angle
,
image1
,
mask1
);
Mat
H
=
rotateImage
(
image0
,
static_cast
<
float
>
(
angle
)
,
image1
,
mask1
);
vector
<
KeyPoint
>
keypoints1
;
rotateKeyPoints
(
keypoints0
,
H
,
angle
,
keypoints1
);
rotateKeyPoints
(
keypoints0
,
H
,
static_cast
<
float
>
(
angle
)
,
keypoints1
);
Mat
descriptors1
;
descriptorExtractor
->
compute
(
image1
,
keypoints1
,
descriptors1
);
...
...
@@ -457,7 +457,7 @@ protected:
keyPointMatchesCount
++
;
// Check does this inlier have consistent sizes
const
float
maxSizeDiff
=
0.8
;
//0.9f; // grad
const
float
maxSizeDiff
=
0.8
f
;
//0.9f; // grad
float
size0
=
keypoints0
[
matches
[
m
].
trainIdx
].
size
;
float
size1
=
osiKeypoints1
[
matches
[
m
].
queryIdx
].
size
;
CV_Assert
(
size0
>
0
&&
size1
>
0
);
...
...
@@ -545,7 +545,7 @@ protected:
resize
(
image0
,
image1
,
Size
(),
1.
/
scale
,
1.
/
scale
);
vector
<
KeyPoint
>
keypoints1
;
scaleKeyPoints
(
keypoints0
,
keypoints1
,
1.
/
scale
);
scaleKeyPoints
(
keypoints0
,
keypoints1
,
1.
0
f
/
scale
);
Mat
descriptors1
;
descriptorExtractor
->
compute
(
image1
,
keypoints1
,
descriptors1
);
...
...
modules/objdetect/src/hog.cpp
浏览文件 @
1a621c29
...
...
@@ -2563,7 +2563,7 @@ void HOGDescriptor::readALTModel(std::string modelfile)
throw
Exception
();
}
int
kernel_type
;
in
t
nread
;
size_
t
nread
;
nread
=
fread
(
&
(
kernel_type
),
sizeof
(
int
),
1
,
modelfl
);
{
// ignore these
...
...
modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp
浏览文件 @
1a621c29
...
...
@@ -120,7 +120,7 @@ private:
ImagePairLess
(
const
std
::
vector
<
Mat
>
&
images
,
const
std
::
vector
<
Point
>
&
corners
)
:
src_
(
&
images
[
0
]),
corners_
(
&
corners
[
0
])
{}
bool
operator
()
(
const
std
::
pair
<
int
,
int
>
&
l
,
const
std
::
pair
<
int
,
in
t
>
&
r
)
const
bool
operator
()
(
const
std
::
pair
<
size_t
,
size_t
>
&
l
,
const
std
::
pair
<
size_t
,
size_
t
>
&
r
)
const
{
Point
c1
=
corners_
[
l
.
first
]
+
Point
(
src_
[
l
.
first
].
cols
/
2
,
src_
[
l
.
first
].
rows
/
2
);
Point
c2
=
corners_
[
l
.
second
]
+
Point
(
src_
[
l
.
second
].
cols
/
2
,
src_
[
l
.
second
].
rows
/
2
);
...
...
modules/stitching/src/seam_finders.cpp
浏览文件 @
1a621c29
...
...
@@ -166,7 +166,7 @@ void DpSeamFinder::find(const vector<Mat> &src, const vector<Point> &corners, ve
if
(
src
.
size
()
==
0
)
return
;
vector
<
pair
<
int
,
in
t
>
>
pairs
;
vector
<
pair
<
size_t
,
size_
t
>
>
pairs
;
for
(
size_t
i
=
0
;
i
+
1
<
src
.
size
();
++
i
)
for
(
size_t
j
=
i
+
1
;
j
<
src
.
size
();
++
j
)
...
...
@@ -177,7 +177,7 @@ void DpSeamFinder::find(const vector<Mat> &src, const vector<Point> &corners, ve
for
(
size_t
i
=
0
;
i
<
pairs
.
size
();
++
i
)
{
in
t
i0
=
pairs
[
i
].
first
,
i1
=
pairs
[
i
].
second
;
size_
t
i0
=
pairs
[
i
].
first
,
i1
=
pairs
[
i
].
second
;
process
(
src
[
i0
],
src
[
i1
],
corners
[
i0
],
corners
[
i1
],
masks
[
i0
],
masks
[
i1
]);
}
...
...
@@ -393,7 +393,7 @@ void DpSeamFinder::resolveConflicts(
bool
hasConflict
=
true
;
while
(
hasConflict
)
{
int
c1
,
c2
;
int
c1
=
0
,
c2
=
0
;
hasConflict
=
false
;
for
(
set
<
pair
<
int
,
int
>
>::
iterator
itr
=
edges_
.
begin
();
itr
!=
edges_
.
end
();
++
itr
)
...
...
@@ -635,7 +635,7 @@ bool DpSeamFinder::getSeamTips(int comp1, int comp2, Point &p1, Point &p2)
double
cx
=
cvRound
(
sum
[
idx
[
i
]].
x
/
size
);
double
cy
=
cvRound
(
sum
[
idx
[
i
]].
y
/
size
);
int
closest
=
-
1
;
size_t
closest
=
points
[
idx
[
i
]].
size
()
;
double
minDist
=
numeric_limits
<
double
>::
max
();
for
(
size_t
j
=
0
;
j
<
points
[
idx
[
i
]].
size
();
++
j
)
...
...
modules/video/src/bgfg_gmg.cpp
浏览文件 @
1a621c29
...
...
@@ -290,7 +290,7 @@ namespace
normalizeHistogram
(
weights
,
nfeatures
);
}
fgmask_row
[
x
]
=
(
uchar
)(
-
isForeground
);
fgmask_row
[
x
]
=
(
uchar
)(
-
(
schar
)
isForeground
);
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录