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
e60dcc9b
Commit
e60dcc9b
authored
Apr 28, 2015
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3966 from Dikay900:master_diff_to_2_4_2
parents
72458034
63dbeeaa
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
76 additions
and
71 deletions
+76
-71
OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+5
-0
OpenCVFindLibsVideo.cmake
cmake/OpenCVFindLibsVideo.cmake
+32
-38
test_reproject_image_to_3d.cpp
modules/calib3d/test/test_reproject_image_to_3d.cpp
+6
-1
test_undistort_badarg.cpp
modules/calib3d/test/test_undistort_badarg.cpp
+4
-1
affine.hpp
modules/core/include/opencv2/core/affine.hpp
+1
-1
datastructs.cpp
modules/core/src/datastructs.cpp
+1
-1
test_io.cpp
modules/core/test/test_io.cpp
+11
-3
perf_warping.cpp
modules/cudawarping/perf/perf_warping.cpp
+2
-2
miniflann.hpp
modules/flann/include/opencv2/flann/miniflann.hpp
+4
-4
window_QT.cpp
modules/highgui/src/window_QT.cpp
+6
-4
smooth.cpp
modules/imgproc/src/smooth.cpp
+2
-2
cv2.cpp
modules/python/src2/cv2.cpp
+1
-1
cap_msmf.hpp
modules/videoio/src/cap_msmf.hpp
+1
-13
No files found.
cmake/OpenCVCompilerOptions.cmake
View file @
e60dcc9b
...
...
@@ -281,6 +281,11 @@ if(MSVC)
endif
()
endif
()
if
(
MSVC12 AND NOT CMAKE_GENERATOR MATCHES
"Visual Studio"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
/FS"
)
set
(
OPENCV_EXTRA_CXX_FLAGS
"
${
OPENCV_EXTRA_CXX_FLAGS
}
/FS"
)
endif
()
# Extra link libs if the user selects building static libs:
if
(
NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID
)
# Android does not need these settings because they are already set by toolchain file
...
...
cmake/OpenCVFindLibsVideo.cmake
View file @
e60dcc9b
...
...
@@ -216,49 +216,43 @@ if(WITH_FFMPEG)
# Do an other trial
FIND_FILE
(
BZIP2_LIBRARIES NAMES libbz2.so.1 PATHS /lib
)
endif
()
e
ndif
(
HAVE_FFMPEG
)
endif
()
if
(
APPLE
)
find_path
(
FFMPEG_INCLUDE_DIR
"libavformat/avformat.h"
PATHS /usr/local /usr /opt
PATH_SUFFIXES include
DOC
"The path to FFMPEG headers
"
)
if
(
FFMPEG_INCLUDE_DIR
)
set
(
HAVE_GENTOO_FFMPEG TRUE
)
set
(
FFMPEG_LIB_DIR
"
${
FFMPEG_INCLUDE_DIR
}
/../lib"
CACHE PATH
"Full path of FFMPEG library directory
"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libavcodec.a
"
)
set
(
HAVE_FFMPEG_CODEC 1
)
set
(
ALIASOF_libavcodec_VERSION
"Unknown"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libavformat.a"
)
set
(
HAVE_FFMPEG_FORMAT 1
)
e
lse
(
)
find_path
(
FFMPEG_INCLUDE_DIR
"libavformat/avformat.h"
PATHS /usr/local /usr /opt
PATH_SUFFIXES include
DOC
"The path to FFMPEG headers"
)
if
(
FFMPEG_INCLUDE_DIR
)
set
(
HAVE_GENTOO_FFMPEG TRUE
)
set
(
FFMPEG_LIB_DIR
"
${
FFMPEG_INCLUDE_DIR
}
/../lib"
CACHE PATH
"Full path of FFMPEG library directory
"
)
find_library
(
FFMPEG_CODEC_LIB
"avcodec"
HINTS
"
${
FFMPEG_LIB_DIR
}
"
)
find_library
(
FFMPEG_FORMAT_LIB
"avformat"
HINTS
"
${
FFMPEG_LIB_DIR
}
"
)
find_library
(
FFMPEG_UTIL_LIB
"avutil"
HINTS
"
${
FFMPEG_LIB_DIR
}
"
)
find_library
(
FFMPEG_SWSCALE_LIB
"swscale"
HINTS
"
${
FFMPEG_LIB_DIR
}
"
)
find_library
(
FFMPEG_RESAMPLE_LIB
"avresample"
HINTS
"
${
FFMPEG_LIB_DIR
}
"
)
if
(
FFMPEG_CODEC_LIB AND FFMPEG_FORMAT_LIB AND
FFMPEG_UTIL_LIB AND FFMPEG_SWSCALE_LIB
)
set
(
ALIASOF_libavcodec_VERSION
"Unknown"
)
set
(
ALIASOF_libavformat_VERSION
"Unknown"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libavutil.a"
)
set
(
HAVE_FFMPEG_UTIL 1
)
set
(
ALIASOF_libavutil_VERSION
"Unknown"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libswscale.a"
)
set
(
HAVE_FFMPEG_SWSCALE 1
)
set
(
ALIASOF_libswscale_VERSION
"Unknown"
)
set
(
HAVE_FFMPEG 1
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libavresample.a"
)
set
(
HAVE_FFMPEG_RESAMPLE 1
)
set
(
ALIASOF_libavresample_VERSION
"Unknown"
)
endif
()
endif
()
set
(
ALIASOF_libavutil_VERSION
"Unknown"
)
set
(
ALIASOF_libswscale_VERSION
"Unknown"
)
set
(
HAVE_FFMPEG 1
)
if
(
FFMPEG_RESAMPLE_LIB
)
set
(
HAVE_FFMPEG_RESAMPLE 1
)
set
(
ALIASOF_libavresample_VERSION
"Unknown"
)
endif
()
endif
()
endif
()
endif
(
FFMPEG_INCLUDE_DIR
)
if
(
HAVE_FFMPEG
)
set
(
VIDEOIO_LIBRARIES
${
VIDEOIO_LIBRARIES
}
"
${
FFMPEG_LIB_DIR
}
/libavcodec.a"
"
${
FFMPEG_LIB_DIR
}
/libavformat.a"
"
${
FFMPEG_LIB_DIR
}
/libavutil.a"
"
${
FFMPEG_LIB_DIR
}
/libswscale.a"
)
if
(
HAVE_FFMPEG_RESAMPLE
)
endif
(
FFMPEG_INCLUDE_DIR
)
if
(
HAVE_FFMPEG
)
set
(
VIDEOIO_LIBRARIES
${
VIDEOIO_LIBRARIES
}
"
${
FFMPEG_LIB_DIR
}
/libavcodec.a"
"
${
FFMPEG_LIB_DIR
}
/libavformat.a"
"
${
FFMPEG_LIB_DIR
}
/libavutil.a"
"
${
FFMPEG_LIB_DIR
}
/libswscale.a"
)
if
(
HAVE_FFMPEG_RESAMPLE
)
set
(
VIDEOIO_LIBRARIES
${
VIDEOIO_LIBRARIES
}
"
${
FFMPEG_LIB_DIR
}
/libavresample.a"
)
endif
()
ocv_include_directories
(
${
FFMPEG_INCLUDE_DIR
}
)
endif
()
ocv_include_directories
(
${
FFMPEG_INCLUDE_DIR
}
)
endif
(
HAVE_FFMPEG
)
endif
()
endif
(
APPLE
)
endif
()
endif
(
WITH_FFMPEG
)
# --- VideoInput/DirectShow ---
...
...
modules/calib3d/test/test_reproject_image_to_3d.cpp
View file @
e60dcc9b
...
...
@@ -138,7 +138,12 @@ protected:
{
InT
d
=
disp
(
y
,
x
);
double
from
[
4
]
=
{
x
,
y
,
d
,
1
};
double
from
[
4
]
=
{
static_cast
<
double
>
(
x
),
static_cast
<
double
>
(
y
),
static_cast
<
double
>
(
d
),
1.0
,
};
Mat_
<
double
>
res
=
Q
*
Mat_
<
double
>
(
4
,
1
,
from
);
res
/=
res
(
3
,
0
);
...
...
modules/calib3d/test/test_undistort_badarg.cpp
View file @
e60dcc9b
...
...
@@ -104,7 +104,10 @@ void CV_UndistortPointsBadArgTest::run(int)
img_size
.
height
=
600
;
double
cam
[
9
]
=
{
150.
f
,
0.
f
,
img_size
.
width
/
2.
f
,
0
,
300.
f
,
img_size
.
height
/
2.
f
,
0.
f
,
0.
f
,
1.
f
};
double
dist
[
4
]
=
{
0.01
,
0.02
,
0.001
,
0.0005
};
double
s_points
[
N_POINTS2
]
=
{
img_size
.
width
/
4
,
img_size
.
height
/
4
};
double
s_points
[
N_POINTS2
]
=
{
static_cast
<
double
>
(
img_size
.
width
)
/
4.0
,
static_cast
<
double
>
(
img_size
.
height
)
/
4.0
,
};
double
d_points
[
N_POINTS2
];
double
p
[
9
]
=
{
155.
f
,
0.
f
,
img_size
.
width
/
2.
f
+
img_size
.
width
/
50.
f
,
0
,
310.
f
,
img_size
.
height
/
2.
f
+
img_size
.
height
/
50.
f
,
0.
f
,
0.
f
,
1.
f
};
double
r
[
9
]
=
{
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
};
...
...
modules/core/include/opencv2/core/affine.hpp
View file @
e60dcc9b
...
...
@@ -253,7 +253,7 @@ void cv::Affine3<T>::rotation(const Vec3& _rvec)
double
c
=
std
::
cos
(
theta
);
double
s
=
std
::
sin
(
theta
);
double
c1
=
1.
-
c
;
double
itheta
=
theta
?
1.
/
theta
:
0.
;
double
itheta
=
(
theta
!=
0
)
?
1.
/
theta
:
0.
;
rx
*=
itheta
;
ry
*=
itheta
;
rz
*=
itheta
;
...
...
modules/core/src/datastructs.cpp
View file @
e60dcc9b
...
...
@@ -651,7 +651,7 @@ icvGrowSeq( CvSeq *seq, int in_front_of )
/* If there is a free space just after last allocated block
and it is big enough then enlarge the last block.
This can happen only if the new block is added to the end of sequence: */
if
(
(
unsigned
)(
ICV_FREE_PTR
(
storage
)
-
seq
->
block_max
)
<
CV_STRUCT_ALIGN
&&
if
(
(
size_t
)(
ICV_FREE_PTR
(
storage
)
-
seq
->
block_max
)
<
CV_STRUCT_ALIGN
&&
storage
->
free_space
>=
seq
->
elem_size
&&
!
in_front_of
)
{
int
delta
=
storage
->
free_space
/
elem_size
;
...
...
modules/core/test/test_io.cpp
View file @
e60dcc9b
...
...
@@ -144,7 +144,11 @@ protected:
depth
=
cvtest
::
randInt
(
rng
)
%
(
CV_64F
+
1
);
cn
=
cvtest
::
randInt
(
rng
)
%
4
+
1
;
int
sz
[]
=
{
cvtest
::
randInt
(
rng
)
%
10
+
1
,
cvtest
::
randInt
(
rng
)
%
10
+
1
,
cvtest
::
randInt
(
rng
)
%
10
+
1
};
int
sz
[]
=
{
static_cast
<
int
>
(
cvtest
::
randInt
(
rng
)
%
10
+
1
),
static_cast
<
int
>
(
cvtest
::
randInt
(
rng
)
%
10
+
1
),
static_cast
<
int
>
(
cvtest
::
randInt
(
rng
)
%
10
+
1
),
};
MatND
test_mat_nd
(
3
,
sz
,
CV_MAKETYPE
(
depth
,
cn
));
rng0
.
fill
(
test_mat_nd
,
CV_RAND_UNI
,
Scalar
::
all
(
ranges
[
depth
][
0
]),
Scalar
::
all
(
ranges
[
depth
][
1
]));
...
...
@@ -156,8 +160,12 @@ protected:
multiply
(
test_mat_nd
,
test_mat_scale
,
test_mat_nd
);
}
int
ssz
[]
=
{
cvtest
::
randInt
(
rng
)
%
10
+
1
,
cvtest
::
randInt
(
rng
)
%
10
+
1
,
cvtest
::
randInt
(
rng
)
%
10
+
1
,
cvtest
::
randInt
(
rng
)
%
10
+
1
};
int
ssz
[]
=
{
static_cast
<
int
>
(
cvtest
::
randInt
(
rng
)
%
10
+
1
),
static_cast
<
int
>
(
cvtest
::
randInt
(
rng
)
%
10
+
1
),
static_cast
<
int
>
(
cvtest
::
randInt
(
rng
)
%
10
+
1
),
static_cast
<
int
>
(
cvtest
::
randInt
(
rng
)
%
10
+
1
),
};
SparseMat
test_sparse_mat
=
cvTsGetRandomSparseMat
(
4
,
ssz
,
cvtest
::
randInt
(
rng
)
%
(
CV_64F
+
1
),
cvtest
::
randInt
(
rng
)
%
10000
,
0
,
100
,
rng
);
...
...
modules/cudawarping/perf/perf_warping.cpp
View file @
e60dcc9b
...
...
@@ -253,7 +253,7 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border, WarpAffine,
const
double
aplha
=
CV_PI
/
4
;
const
double
mat
[
2
*
3
]
=
{
std
::
cos
(
aplha
),
-
std
::
sin
(
aplha
),
s
rc
.
cols
/
2
,
std
::
cos
(
aplha
),
-
std
::
sin
(
aplha
),
s
tatic_cast
<
double
>
(
src
.
cols
)
/
2.0
,
std
::
sin
(
aplha
),
std
::
cos
(
aplha
),
0
};
const
cv
::
Mat
M
(
2
,
3
,
CV_64F
,
(
void
*
)
mat
);
...
...
@@ -301,7 +301,7 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border, WarpPerspective,
declare
.
in
(
src
,
WARMUP_RNG
);
const
double
aplha
=
CV_PI
/
4
;
double
mat
[
3
][
3
]
=
{
{
std
::
cos
(
aplha
),
-
std
::
sin
(
aplha
),
s
rc
.
cols
/
2
},
double
mat
[
3
][
3
]
=
{
{
std
::
cos
(
aplha
),
-
std
::
sin
(
aplha
),
s
tatic_cast
<
double
>
(
src
.
cols
)
/
2.0
},
{
std
::
sin
(
aplha
),
std
::
cos
(
aplha
),
0
},
{
0.0
,
0.0
,
1.0
}};
const
cv
::
Mat
M
(
3
,
3
,
CV_64F
,
(
void
*
)
mat
);
...
...
modules/flann/include/opencv2/flann/miniflann.hpp
View file @
e60dcc9b
...
...
@@ -89,13 +89,13 @@ struct CV_EXPORTS LinearIndexParams : public IndexParams
struct
CV_EXPORTS
CompositeIndexParams
:
public
IndexParams
{
CompositeIndexParams
(
int
trees
=
4
,
int
branching
=
32
,
int
iterations
=
11
,
cvflann
::
flann_centers_init_t
centers_init
=
cvflann
::
FLANN_CENTERS_RANDOM
,
float
cb_index
=
0.2
);
cvflann
::
flann_centers_init_t
centers_init
=
cvflann
::
FLANN_CENTERS_RANDOM
,
float
cb_index
=
0.2
f
);
};
struct
CV_EXPORTS
AutotunedIndexParams
:
public
IndexParams
{
AutotunedIndexParams
(
float
target_precision
=
0.8
,
float
build_weight
=
0.01
,
float
memory_weight
=
0
,
float
sample_fraction
=
0.1
);
AutotunedIndexParams
(
float
target_precision
=
0.8
f
,
float
build_weight
=
0.01
f
,
float
memory_weight
=
0
,
float
sample_fraction
=
0.1
f
);
};
struct
CV_EXPORTS
HierarchicalClusteringIndexParams
:
public
IndexParams
...
...
@@ -107,7 +107,7 @@ struct CV_EXPORTS HierarchicalClusteringIndexParams : public IndexParams
struct
CV_EXPORTS
KMeansIndexParams
:
public
IndexParams
{
KMeansIndexParams
(
int
branching
=
32
,
int
iterations
=
11
,
cvflann
::
flann_centers_init_t
centers_init
=
cvflann
::
FLANN_CENTERS_RANDOM
,
float
cb_index
=
0.2
);
cvflann
::
flann_centers_init_t
centers_init
=
cvflann
::
FLANN_CENTERS_RANDOM
,
float
cb_index
=
0.2
f
);
};
struct
CV_EXPORTS
LshIndexParams
:
public
IndexParams
...
...
modules/highgui/src/window_QT.cpp
View file @
e60dcc9b
...
...
@@ -117,7 +117,7 @@ CV_IMPL void cvAddText(const CvArr* img, const char* text, CvPoint org, CvFont*
"putText"
,
autoBlockingConnection
(),
Q_ARG
(
void
*
,
(
void
*
)
img
),
Q_ARG
(
QString
,
QString
(
text
)),
Q_ARG
(
QString
,
QString
::
fromUtf8
(
text
)),
Q_ARG
(
QPoint
,
QPoint
(
org
.
x
,
org
.
y
)),
Q_ARG
(
void
*
,(
void
*
)
font
));
}
...
...
@@ -418,12 +418,14 @@ static CvBar* icvFindBarByName(QBoxLayout* layout, QString name_bar, typeBar typ
static
CvTrackbar
*
icvFindTrackBarByName
(
const
char
*
name_trackbar
,
const
char
*
name_window
,
QBoxLayout
*
layout
=
NULL
)
{
QString
nameQt
(
name_trackbar
);
if
((
!
name_window
||
!
name_window
[
0
])
&&
global_control_panel
)
//window name is null and we have a control panel
QString
nameWinQt
(
name_window
);
if
(
nameWinQt
.
isEmpty
()
&&
global_control_panel
)
//window name is null and we have a control panel
layout
=
global_control_panel
->
myLayout
;
if
(
!
layout
)
{
QPointer
<
CvWindow
>
w
=
icvFindWindowByName
(
QLatin1String
(
name_window
)
);
QPointer
<
CvWindow
>
w
=
icvFindWindowByName
(
nameWinQt
);
if
(
!
w
)
CV_Error
(
CV_StsNullPtr
,
"NULL window handler"
);
...
...
@@ -1875,7 +1877,7 @@ bool CvWindow::isOpenGl()
void
CvWindow
::
setViewportSize
(
QSize
_size
)
{
myView
->
getWidget
()
->
resize
(
_size
);
resize
(
_size
);
myView
->
setSize
(
_size
);
}
...
...
modules/imgproc/src/smooth.cpp
View file @
e60dcc9b
...
...
@@ -2770,7 +2770,7 @@ public:
#if CV_SSE3
int
CV_DECL_ALIGNED
(
16
)
buf
[
4
];
float
CV_DECL_ALIGNED
(
16
)
bufSum
[
4
];
static
const
int
CV_DECL_ALIGNED
(
16
)
bufSignMask
[]
=
{
0x80000000
,
0x80000000
,
0x80000000
,
0x80000000
};
static
const
unsigned
int
CV_DECL_ALIGNED
(
16
)
bufSignMask
[]
=
{
0x80000000
,
0x80000000
,
0x80000000
,
0x80000000
};
bool
haveSSE3
=
checkHardwareSupport
(
CV_CPU_SSE3
);
#endif
...
...
@@ -3152,7 +3152,7 @@ public:
#if CV_SSE3
int
CV_DECL_ALIGNED
(
16
)
idxBuf
[
4
];
float
CV_DECL_ALIGNED
(
16
)
bufSum32
[
4
];
static
const
int
CV_DECL_ALIGNED
(
16
)
bufSignMask
[]
=
{
0x80000000
,
0x80000000
,
0x80000000
,
0x80000000
};
static
const
unsigned
int
CV_DECL_ALIGNED
(
16
)
bufSignMask
[]
=
{
0x80000000
,
0x80000000
,
0x80000000
,
0x80000000
};
bool
haveSSE3
=
checkHardwareSupport
(
CV_CPU_SSE3
);
#endif
...
...
modules/python/src2/cv2.cpp
View file @
e60dcc9b
...
...
@@ -226,7 +226,7 @@ static bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo info)
if
(
PyInt_Check
(
o
)
)
{
double
v
[]
=
{
(
double
)
PyInt_AsLong
((
PyObject
*
)
o
),
0.
,
0.
,
0.
};
double
v
[]
=
{
static_cast
<
double
>
(
PyInt_AsLong
((
PyObject
*
)
o
)
),
0.
,
0.
,
0.
};
m
=
Mat
(
4
,
1
,
CV_64F
,
v
).
clone
();
return
true
;
}
...
...
modules/videoio/src/cap_msmf.hpp
View file @
e60dcc9b
...
...
@@ -603,11 +603,6 @@ public:
ComPtr
()
throw
()
{
}
ComPtr
(
int
nNull
)
throw
()
{
assert
(
nNull
==
0
);
p
=
NULL
;
}
ComPtr
(
T
*
lp
)
throw
()
{
p
=
lp
;
...
...
@@ -638,13 +633,6 @@ public:
{
return
p
.
operator
==
(
pT
);
}
// For comparison to NULL
bool
operator
==
(
int
nNull
)
const
{
assert
(
nNull
==
0
);
return
p
.
operator
==
(
NULL
);
}
bool
operator
!=
(
_In_opt_
T
*
pT
)
const
throw
()
{
return
p
.
operator
!=
(
pT
);
...
...
@@ -3123,7 +3111,7 @@ public:
HRESULT
hr
=
CheckShutdown
();
if
(
SUCCEEDED
(
hr
))
{
if
(
m_spClock
==
NULL
)
{
if
(
!
m_spClock
)
{
hr
=
MF_E_NO_CLOCK
;
// There is no presentation clock.
}
else
{
// Return the pointer to the caller.
...
...
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