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
b7560332
Commit
b7560332
authored
Apr 11, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed several warnings on various platforms
parent
07f8bf92
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
25 additions
and
19 deletions
+25
-19
CMakeLists.txt
3rdparty/libjasper/CMakeLists.txt
+4
-0
colormap.cpp
modules/contrib/src/colormap.cpp
+3
-2
facerec.cpp
modules/contrib/src/facerec.cpp
+2
-2
lda.cpp
modules/contrib/src/lda.cpp
+4
-4
spinimages.cpp
modules/contrib/src/spinimages.cpp
+1
-1
dxt.cpp
modules/core/src/dxt.cpp
+1
-0
test_calib3d.cpp
modules/gpu/test/test_calib3d.cpp
+2
-2
test_video.cpp
modules/gpu/test/test_video.cpp
+1
-1
cv2.cpp
modules/python/src2/cv2.cpp
+3
-2
global_motion.cpp
modules/videostab/src/global_motion.cpp
+1
-1
stabilizer.cpp
modules/videostab/src/stabilizer.cpp
+1
-1
contours.c
samples/c/contours.c
+1
-1
fback_c.c
samples/c/fback_c.c
+1
-1
brox_optical_flow.cpp
samples/gpu/brox_optical_flow.cpp
+0
-1
No files found.
3rdparty/libjasper/CMakeLists.txt
View file @
b7560332
...
@@ -29,6 +29,10 @@ if(MSVC)
...
@@ -29,6 +29,10 @@ if(MSVC)
add_definitions
(
-DJAS_WIN_MSVC_BUILD
)
add_definitions
(
-DJAS_WIN_MSVC_BUILD
)
endif
()
endif
()
if
(
CMAKE_COMPILER_IS_GNUCXX
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-uninitialized"
)
endif
()
if
(
UNIX
)
if
(
UNIX
)
if
(
CMAKE_COMPILER_IS_GNUCXX OR CV_ICC
)
if
(
CMAKE_COMPILER_IS_GNUCXX OR CV_ICC
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fPIC"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fPIC"
)
...
...
modules/contrib/src/colormap.cpp
View file @
b7560332
...
@@ -47,7 +47,7 @@ static void sortMatrixRowsByIndices(InputArray _src, InputArray _indices, Output
...
@@ -47,7 +47,7 @@ static void sortMatrixRowsByIndices(InputArray _src, InputArray _indices, Output
Mat
dst
=
_dst
.
getMat
();
Mat
dst
=
_dst
.
getMat
();
for
(
size_t
idx
=
0
;
idx
<
indices
.
size
();
idx
++
)
{
for
(
size_t
idx
=
0
;
idx
<
indices
.
size
();
idx
++
)
{
Mat
originalRow
=
src
.
row
(
indices
[
idx
]);
Mat
originalRow
=
src
.
row
(
indices
[
idx
]);
Mat
sortedRow
=
dst
.
row
(
idx
);
Mat
sortedRow
=
dst
.
row
(
(
int
)
idx
);
originalRow
.
copyTo
(
sortedRow
);
originalRow
.
copyTo
(
sortedRow
);
}
}
}
}
...
@@ -127,8 +127,9 @@ static Mat interp1(InputArray _x, InputArray _Y, InputArray _xi)
...
@@ -127,8 +127,9 @@ static Mat interp1(InputArray _x, InputArray _Y, InputArray _xi)
case
CV_32SC1
:
return
interp1_
<
int
>
(
x
,
Y
,
xi
);
break
;
case
CV_32SC1
:
return
interp1_
<
int
>
(
x
,
Y
,
xi
);
break
;
case
CV_32FC1
:
return
interp1_
<
float
>
(
x
,
Y
,
xi
);
break
;
case
CV_32FC1
:
return
interp1_
<
float
>
(
x
,
Y
,
xi
);
break
;
case
CV_64FC1
:
return
interp1_
<
double
>
(
x
,
Y
,
xi
);
break
;
case
CV_64FC1
:
return
interp1_
<
double
>
(
x
,
Y
,
xi
);
break
;
default
:
CV_Error
(
CV_StsUnsupportedFormat
,
""
);
return
Mat
()
;
default
:
CV_Error
(
CV_StsUnsupportedFormat
,
""
);
break
;
}
}
return
Mat
();
}
}
namespace
colormap
namespace
colormap
...
...
modules/contrib/src/facerec.cpp
View file @
b7560332
...
@@ -384,7 +384,7 @@ void Fisherfaces::train(InputArray src, InputArray _lbls) {
...
@@ -384,7 +384,7 @@ void Fisherfaces::train(InputArray src, InputArray _lbls) {
if
(
labels
.
size
()
!=
(
size_t
)
N
)
if
(
labels
.
size
()
!=
(
size_t
)
N
)
CV_Error
(
CV_StsUnsupportedFormat
,
"Labels must be given as integer (CV_32SC1)."
);
CV_Error
(
CV_StsUnsupportedFormat
,
"Labels must be given as integer (CV_32SC1)."
);
// compute the Fisherfaces
// compute the Fisherfaces
int
C
=
remove_dups
(
labels
).
size
();
// number of unique classes
int
C
=
(
int
)
remove_dups
(
labels
).
size
();
// number of unique classes
// clip number of components to be a valid number
// clip number of components to be a valid number
if
((
_num_components
<=
0
)
||
(
_num_components
>
(
C
-
1
)))
if
((
_num_components
<=
0
)
||
(
_num_components
>
(
C
-
1
)))
_num_components
=
(
C
-
1
);
_num_components
=
(
C
-
1
);
...
@@ -549,7 +549,7 @@ histc_(const Mat& src, int minVal=0, int maxVal=255, bool normed=false)
...
@@ -549,7 +549,7 @@ histc_(const Mat& src, int minVal=0, int maxVal=255, bool normed=false)
calcHist
(
&
src
,
1
,
0
,
Mat
(),
result
,
1
,
&
histSize
,
&
histRange
,
true
,
false
);
calcHist
(
&
src
,
1
,
0
,
Mat
(),
result
,
1
,
&
histSize
,
&
histRange
,
true
,
false
);
// normalize
// normalize
if
(
normed
)
{
if
(
normed
)
{
result
/=
src
.
total
();
result
/=
(
int
)
src
.
total
();
}
}
return
result
.
reshape
(
1
,
1
);
return
result
.
reshape
(
1
,
1
);
}
}
...
...
modules/contrib/src/lda.cpp
View file @
b7560332
...
@@ -62,7 +62,7 @@ static Mat asRowMatrix(InputArrayOfArrays src, int rtype, double alpha=1, double
...
@@ -62,7 +62,7 @@ static Mat asRowMatrix(InputArrayOfArrays src, int rtype, double alpha=1, double
if
(
n
==
0
)
if
(
n
==
0
)
return
Mat
();
return
Mat
();
// dimensionality of samples
// dimensionality of samples
int
d
=
src
.
getMat
(
0
).
total
();
int
d
=
(
int
)
src
.
getMat
(
0
).
total
();
// create data matrix
// create data matrix
Mat
data
(
n
,
d
,
rtype
);
Mat
data
(
n
,
d
,
rtype
);
// copy data
// copy data
...
@@ -82,7 +82,7 @@ void sortMatrixColumnsByIndices(InputArray _src, InputArray _indices, OutputArra
...
@@ -82,7 +82,7 @@ void sortMatrixColumnsByIndices(InputArray _src, InputArray _indices, OutputArra
Mat
dst
=
_dst
.
getMat
();
Mat
dst
=
_dst
.
getMat
();
for
(
size_t
idx
=
0
;
idx
<
indices
.
size
();
idx
++
)
{
for
(
size_t
idx
=
0
;
idx
<
indices
.
size
();
idx
++
)
{
Mat
originalCol
=
src
.
col
(
indices
[
idx
]);
Mat
originalCol
=
src
.
col
(
indices
[
idx
]);
Mat
sortedCol
=
dst
.
col
(
idx
);
Mat
sortedCol
=
dst
.
col
(
(
int
)
idx
);
originalCol
.
copyTo
(
sortedCol
);
originalCol
.
copyTo
(
sortedCol
);
}
}
}
}
...
@@ -947,14 +947,14 @@ void LDA::lda(InputArray _src, InputArray _lbls) {
...
@@ -947,14 +947,14 @@ void LDA::lda(InputArray _src, InputArray _lbls) {
vector
<
int
>
num2label
=
remove_dups
(
labels
);
vector
<
int
>
num2label
=
remove_dups
(
labels
);
map
<
int
,
int
>
label2num
;
map
<
int
,
int
>
label2num
;
for
(
size_t
i
=
0
;
i
<
num2label
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
num2label
.
size
();
i
++
)
label2num
[
num2label
[
i
]]
=
i
;
label2num
[
num2label
[
i
]]
=
(
int
)
i
;
for
(
size_t
i
=
0
;
i
<
labels
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
labels
.
size
();
i
++
)
mapped_labels
[
i
]
=
label2num
[
labels
[
i
]];
mapped_labels
[
i
]
=
label2num
[
labels
[
i
]];
// get sample size, dimension
// get sample size, dimension
int
N
=
data
.
rows
;
int
N
=
data
.
rows
;
int
D
=
data
.
cols
;
int
D
=
data
.
cols
;
// number of unique labels
// number of unique labels
int
C
=
num2label
.
size
();
int
C
=
(
int
)
num2label
.
size
();
// throw error if less labels, than samples
// throw error if less labels, than samples
if
(
labels
.
size
()
!=
(
size_t
)
N
)
if
(
labels
.
size
()
!=
(
size_t
)
N
)
CV_Error
(
CV_StsBadArg
,
"Error: The number of samples must equal the number of labels."
);
CV_Error
(
CV_StsBadArg
,
"Error: The number of samples must equal the number of labels."
);
...
...
modules/contrib/src/spinimages.cpp
View file @
b7560332
...
@@ -1171,7 +1171,7 @@ private:
...
@@ -1171,7 +1171,7 @@ private:
break
;
break
;
std
::
transform
(
left
.
begin
(),
left
.
end
(),
buf_beg
,
WgcHelper
(
group
,
groupingMat
));
std
::
transform
(
left
.
begin
(),
left
.
end
(),
buf_beg
,
WgcHelper
(
group
,
groupingMat
));
in
t
minInd
=
min_element
(
buf_beg
,
buf_beg
+
left_size
)
-
buf_beg
;
size_
t
minInd
=
min_element
(
buf_beg
,
buf_beg
+
left_size
)
-
buf_beg
;
if
(
buf
[
minInd
]
<
model
.
T_GroupingCorespondances
)
/* can add corespondance to group */
if
(
buf
[
minInd
]
<
model
.
T_GroupingCorespondances
)
/* can add corespondance to group */
{
{
...
...
modules/core/src/dxt.cpp
View file @
b7560332
...
@@ -47,6 +47,7 @@ namespace cv
...
@@ -47,6 +47,7 @@ namespace cv
// On Win64 optimized versions of DFT and DCT fail the tests (fixed in VS2010)
// On Win64 optimized versions of DFT and DCT fail the tests (fixed in VS2010)
#if defined _MSC_VER && !defined CV_ICC && defined _M_X64 && _MSC_VER < 1600
#if defined _MSC_VER && !defined CV_ICC && defined _M_X64 && _MSC_VER < 1600
#pragma optimize("", off)
#pragma optimize("", off)
#pragma warning( disable : 4748 )
#endif
#endif
/****************************************************************************************\
/****************************************************************************************\
...
...
modules/gpu/test/test_calib3d.cpp
View file @
b7560332
...
@@ -249,7 +249,7 @@ TEST_P(ProjectPoints, Accuracy)
...
@@ -249,7 +249,7 @@ TEST_P(ProjectPoints, Accuracy)
for
(
size_t
i
=
0
;
i
<
dst_gold
.
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
dst_gold
.
size
();
++
i
)
{
{
cv
::
Point2f
res
=
h_dst
.
at
<
cv
::
Point2f
>
(
0
,
i
);
cv
::
Point2f
res
=
h_dst
.
at
<
cv
::
Point2f
>
(
0
,
(
int
)
i
);
cv
::
Point2f
res_gold
=
dst_gold
[
i
];
cv
::
Point2f
res_gold
=
dst_gold
[
i
];
ASSERT_LE
(
cv
::
norm
(
res_gold
-
res
)
/
cv
::
norm
(
res_gold
),
1e-3
f
);
ASSERT_LE
(
cv
::
norm
(
res_gold
-
res
)
/
cv
::
norm
(
res_gold
),
1e-3
f
);
...
@@ -291,7 +291,7 @@ TEST_P(SolvePnPRansac, Accuracy)
...
@@ -291,7 +291,7 @@ TEST_P(SolvePnPRansac, Accuracy)
cv
::
Mat
rvec
,
tvec
;
cv
::
Mat
rvec
,
tvec
;
std
::
vector
<
int
>
inliers
;
std
::
vector
<
int
>
inliers
;
cv
::
gpu
::
solvePnPRansac
(
object
,
cv
::
Mat
(
1
,
image_vec
.
size
(),
CV_32FC2
,
&
image_vec
[
0
]),
cv
::
gpu
::
solvePnPRansac
(
object
,
cv
::
Mat
(
1
,
(
int
)
image_vec
.
size
(),
CV_32FC2
,
&
image_vec
[
0
]),
camera_mat
,
cv
::
Mat
(
1
,
8
,
CV_32F
,
cv
::
Scalar
::
all
(
0
)),
camera_mat
,
cv
::
Mat
(
1
,
8
,
CV_32F
,
cv
::
Scalar
::
all
(
0
)),
rvec
,
tvec
,
false
,
200
,
2.
f
,
100
,
&
inliers
);
rvec
,
tvec
,
false
,
200
,
2.
f
,
100
,
&
inliers
);
...
...
modules/gpu/test/test_video.cpp
View file @
b7560332
...
@@ -244,7 +244,7 @@ TEST_P(PyrLKOpticalFlow, Sparse)
...
@@ -244,7 +244,7 @@ TEST_P(PyrLKOpticalFlow, Sparse)
cv
::
goodFeaturesToTrack
(
gray_frame
,
pts
,
1000
,
0.01
,
0.0
);
cv
::
goodFeaturesToTrack
(
gray_frame
,
pts
,
1000
,
0.01
,
0.0
);
cv
::
gpu
::
GpuMat
d_pts
;
cv
::
gpu
::
GpuMat
d_pts
;
cv
::
Mat
pts_mat
(
1
,
pts
.
size
(),
CV_32FC2
,
(
void
*
)
&
pts
[
0
]);
cv
::
Mat
pts_mat
(
1
,
(
int
)
pts
.
size
(),
CV_32FC2
,
(
void
*
)
&
pts
[
0
]);
d_pts
.
upload
(
pts_mat
);
d_pts
.
upload
(
pts_mat
);
cv
::
gpu
::
PyrLKOpticalFlow
pyrLK
;
cv
::
gpu
::
PyrLKOpticalFlow
pyrLK
;
...
...
modules/python/src2/cv2.cpp
View file @
b7560332
...
@@ -376,8 +376,9 @@ static bool pyopencv_to(PyObject* obj, uchar& value, const char* name = "<unknow
...
@@ -376,8 +376,9 @@ static bool pyopencv_to(PyObject* obj, uchar& value, const char* name = "<unknow
{
{
if
(
!
obj
||
obj
==
Py_None
)
if
(
!
obj
||
obj
==
Py_None
)
return
true
;
return
true
;
value
=
(
int
)
PyInt_AsLong
(
obj
);
int
ivalue
=
(
int
)
PyInt_AsLong
(
obj
);
return
value
!=
-
1
||
!
PyErr_Occurred
();
value
=
cv
::
saturate_cast
<
uchar
>
(
ivalue
);
return
ivalue
!=
-
1
||
!
PyErr_Occurred
();
}
}
static
PyObject
*
pyopencv_from
(
double
value
)
static
PyObject
*
pyopencv_from
(
double
value
)
...
...
modules/videostab/src/global_motion.cpp
View file @
b7560332
...
@@ -353,7 +353,7 @@ Mat getMotion(int from, int to, const Mat *motions, int size)
...
@@ -353,7 +353,7 @@ Mat getMotion(int from, int to, const Mat *motions, int size)
Mat
getMotion
(
int
from
,
int
to
,
const
vector
<
Mat
>
&
motions
)
Mat
getMotion
(
int
from
,
int
to
,
const
vector
<
Mat
>
&
motions
)
{
{
return
getMotion
(
from
,
to
,
&
motions
[
0
],
motions
.
size
());
return
getMotion
(
from
,
to
,
&
motions
[
0
],
(
int
)
motions
.
size
());
}
}
}
// namespace videostab
}
// namespace videostab
...
...
modules/videostab/src/stabilizer.cpp
View file @
b7560332
...
@@ -258,7 +258,7 @@ void OnePassStabilizer::estimateMotion()
...
@@ -258,7 +258,7 @@ void OnePassStabilizer::estimateMotion()
void
OnePassStabilizer
::
stabilizeFrame
()
void
OnePassStabilizer
::
stabilizeFrame
()
{
{
Mat
stabilizationMotion
=
motionFilter_
->
stabilize
(
curStabilizedPos_
,
&
motions_
[
0
],
motions_
.
size
());
Mat
stabilizationMotion
=
motionFilter_
->
stabilize
(
curStabilizedPos_
,
&
motions_
[
0
],
(
int
)
motions_
.
size
());
StabilizerBase
::
stabilizeFrame
(
stabilizationMotion
);
StabilizerBase
::
stabilizeFrame
(
stabilizationMotion
);
}
}
...
...
samples/c/contours.c
View file @
b7560332
...
@@ -49,7 +49,7 @@ static void findCComp( IplImage* img )
...
@@ -49,7 +49,7 @@ static void findCComp( IplImage* img )
}
}
int
main
(
int
argc
,
char
**
argv
)
int
main
()
{
{
int
i
,
j
;
int
i
,
j
;
CvMemStorage
*
storage
=
cvCreateMemStorage
(
0
);
CvMemStorage
*
storage
=
cvCreateMemStorage
(
0
);
...
...
samples/c/fback_c.c
View file @
b7560332
...
@@ -24,7 +24,7 @@ void drawOptFlowMap(const CvMat* flow, CvMat* cflowmap, int step,
...
@@ -24,7 +24,7 @@ void drawOptFlowMap(const CvMat* flow, CvMat* cflowmap, int step,
}
}
}
}
int
main
(
int
argc
,
char
**
argv
)
int
main
()
{
{
CvCapture
*
capture
=
cvCreateCameraCapture
(
0
);
CvCapture
*
capture
=
cvCreateCameraCapture
(
0
);
CvMat
*
prevgray
=
0
,
*
gray
=
0
,
*
flow
=
0
,
*
cflow
=
0
;
CvMat
*
prevgray
=
0
,
*
gray
=
0
,
*
flow
=
0
,
*
cflow
=
0
;
...
...
samples/gpu/brox_optical_flow.cpp
View file @
b7560332
...
@@ -215,7 +215,6 @@ int main(int argc, const char* argv[])
...
@@ -215,7 +215,6 @@ int main(int argc, const char* argv[])
switch
(
key
)
switch
(
key
)
{
{
case
27
:
case
27
:
return
0
;
break
;
break
;
case
'A'
:
case
'A'
:
...
...
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