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
a4ab6092
Commit
a4ab6092
authored
Nov 18, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13195 from alalek:legacy_constants
parents
22dbcf98
a574788e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
108 additions
and
75 deletions
+108
-75
Doxyfile.in
doc/Doxyfile.in
+1
-1
Features2dTest.java
modules/features2d/misc/java/test/Features2dTest.java
+1
-1
imgproc.hpp
modules/gapi/include/opencv2/gapi/imgproc.hpp
+1
-1
gfluidimgproc.cpp
modules/gapi/src/backends/fluid/gfluidimgproc.cpp
+4
-4
imgcodecs.hpp
modules/imgcodecs/include/opencv2/imgcodecs.hpp
+0
-46
imgcodecs_c.h
modules/imgcodecs/include/opencv2/imgcodecs/imgcodecs_c.h
+1
-0
constants_c.h
.../imgcodecs/include/opencv2/imgcodecs/legacy/constants_c.h
+54
-0
precomp.hpp
modules/imgcodecs/src/precomp.hpp
+1
-0
imgproc.hpp
modules/imgproc/include/opencv2/imgproc.hpp
+8
-4
gen_java.py
modules/java/generator/gen_java.py
+1
-1
photo.hpp
modules/photo/include/opencv2/photo.hpp
+0
-6
constants_c.h
modules/photo/include/opencv2/photo/legacy/constants_c.h
+14
-0
inpaint.cpp
modules/photo/src/inpaint.cpp
+1
-0
CMakeLists.txt
modules/python/bindings/CMakeLists.txt
+1
-0
constants_c.h
modules/video/include/opencv2/video/legacy/constants_c.h
+16
-0
tracking.hpp
modules/video/include/opencv2/video/tracking.hpp
+0
-8
constants_c.h
modules/videoio/include/opencv2/videoio/legacy/constants_c.h
+0
-0
videoio_c.h
modules/videoio/include/opencv2/videoio/videoio_c.h
+0
-0
cap_gphoto2.cpp
modules/videoio/src/cap_gphoto2.cpp
+1
-1
cap_images.cpp
modules/videoio/src/cap_images.cpp
+1
-1
cap_mjpeg_decoder.cpp
modules/videoio/src/cap_mjpeg_decoder.cpp
+1
-1
precomp.hpp
modules/videoio/src/precomp.hpp
+1
-0
No files found.
doc/Doxyfile.in
View file @
a4ab6092
...
...
@@ -106,7 +106,7 @@ FILE_PATTERNS =
RECURSIVE = YES
EXCLUDE = @CMAKE_DOXYGEN_EXCLUDE_LIST@
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = *.inl.hpp *.impl.hpp *_detail.hpp */cudev/**/detail/*.hpp *.m */opencl/runtime/*
EXCLUDE_PATTERNS = *.inl.hpp *.impl.hpp *_detail.hpp */cudev/**/detail/*.hpp *.m */opencl/runtime/*
*/legacy/* *_c.h @DOXYGEN_EXCLUDE_PATTERNS@
EXCLUDE_SYMBOLS = cv::DataType<*> cv::traits::* int void CV__* T __CV*
EXAMPLE_PATH = @CMAKE_DOXYGEN_EXAMPLE_PATH@
EXAMPLE_PATTERNS = *
...
...
modules/features2d/misc/java/test/Features2dTest.java
View file @
a4ab6092
...
...
@@ -92,7 +92,7 @@ public class Features2dTest extends OpenCVTestCase {
writeFile
(
extractorCfgFile
,
extractorCfg
);
extractor
.
read
(
extractorCfgFile
);
Mat
imgTrain
=
Imgcodecs
.
imread
(
OpenCVTestRunner
.
LENA_PATH
,
Imgcodecs
.
CV_LOAD_IMAGE
_GRAYSCALE
);
Mat
imgTrain
=
Imgcodecs
.
imread
(
OpenCVTestRunner
.
LENA_PATH
,
Imgcodecs
.
IMREAD
_GRAYSCALE
);
Mat
imgQuery
=
imgTrain
.
submat
(
new
Range
(
0
,
imgTrain
.
rows
()
-
100
),
Range
.
all
());
MatOfKeyPoint
trainKeypoints
=
new
MatOfKeyPoint
();
...
...
modules/gapi/include/opencv2/gapi/imgproc.hpp
View file @
a4ab6092
...
...
@@ -443,7 +443,7 @@ calculate the derivative. When \f$\texttt{ksize = 1}\f$, the \f$3 \times 1\f$ or
kernel is used (that is, no Gaussian smoothing is done). `ksize = 1` can only be used for the first
or the second x- or y- derivatives.
There is also the special value `ksize =
CV
_SCHARR (-1)` that corresponds to the \f$3\times3\f$ Scharr
There is also the special value `ksize =
FILTER
_SCHARR (-1)` that corresponds to the \f$3\times3\f$ Scharr
filter that may give more accurate results than the \f$3\times3\f$ Sobel. The Scharr aperture is
\f[\vecthreethree{-3}{0}{3}{-10}{0}{10}{-3}{0}{3}\f]
...
...
modules/gapi/src/backends/fluid/gfluidimgproc.cpp
View file @
a4ab6092
...
...
@@ -783,9 +783,9 @@ GAPI_FLUID_KERNEL(GFluidSobel, cv::gapi::imgproc::GSobel, true)
Buffer
&
scratch
)
{
// TODO: support kernel height 3, 5, 7, 9, ...
GAPI_Assert
(
ksize
==
3
||
ksize
==
CV
_SCHARR
);
GAPI_Assert
(
ksize
==
3
||
ksize
==
FILTER
_SCHARR
);
int
ksz
=
(
ksize
==
CV
_SCHARR
)
?
3
:
ksize
;
int
ksz
=
(
ksize
==
FILTER
_SCHARR
)
?
3
:
ksize
;
auto
*
kx
=
scratch
.
OutLine
<
float
>
();
auto
*
ky
=
kx
+
ksz
;
...
...
@@ -827,8 +827,8 @@ GAPI_FLUID_KERNEL(GFluidSobel, cv::gapi::imgproc::GSobel, true)
Buffer
&
scratch
)
{
// TODO: support kernel height 3, 5, 7, 9, ...
GAPI_Assert
(
ksize
==
3
||
ksize
==
CV
_SCHARR
);
int
ksz
=
(
ksize
==
CV
_SCHARR
)
?
3
:
ksize
;
GAPI_Assert
(
ksize
==
3
||
ksize
==
FILTER
_SCHARR
);
int
ksz
=
(
ksize
==
FILTER
_SCHARR
)
?
3
:
ksize
;
int
width
=
in
.
size
.
width
;
int
chan
=
in
.
chan
;
...
...
modules/imgcodecs/include/opencv2/imgcodecs.hpp
View file @
a4ab6092
...
...
@@ -53,52 +53,6 @@
@}
*/
/* duplicate of "ImreadModes" enumeration for better compatibility with OpenCV 3.x */
enum
{
/* 8bit, color or not */
CV_LOAD_IMAGE_UNCHANGED
=-
1
,
/* 8bit, gray */
CV_LOAD_IMAGE_GRAYSCALE
=
0
,
/* ?, color */
CV_LOAD_IMAGE_COLOR
=
1
,
/* any depth, ? */
CV_LOAD_IMAGE_ANYDEPTH
=
2
,
/* ?, any color */
CV_LOAD_IMAGE_ANYCOLOR
=
4
,
/* ?, no rotate */
CV_LOAD_IMAGE_IGNORE_ORIENTATION
=
128
};
/* duplicate of "ImwriteFlags" enumeration for better compatibility with OpenCV 3.x */
enum
{
CV_IMWRITE_JPEG_QUALITY
=
1
,
CV_IMWRITE_JPEG_PROGRESSIVE
=
2
,
CV_IMWRITE_JPEG_OPTIMIZE
=
3
,
CV_IMWRITE_JPEG_RST_INTERVAL
=
4
,
CV_IMWRITE_JPEG_LUMA_QUALITY
=
5
,
CV_IMWRITE_JPEG_CHROMA_QUALITY
=
6
,
CV_IMWRITE_PNG_COMPRESSION
=
16
,
CV_IMWRITE_PNG_STRATEGY
=
17
,
CV_IMWRITE_PNG_BILEVEL
=
18
,
CV_IMWRITE_PNG_STRATEGY_DEFAULT
=
0
,
CV_IMWRITE_PNG_STRATEGY_FILTERED
=
1
,
CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY
=
2
,
CV_IMWRITE_PNG_STRATEGY_RLE
=
3
,
CV_IMWRITE_PNG_STRATEGY_FIXED
=
4
,
CV_IMWRITE_PXM_BINARY
=
32
,
CV_IMWRITE_EXR_TYPE
=
48
,
CV_IMWRITE_WEBP_QUALITY
=
64
,
CV_IMWRITE_PAM_TUPLETYPE
=
128
,
CV_IMWRITE_PAM_FORMAT_NULL
=
0
,
CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE
=
1
,
CV_IMWRITE_PAM_FORMAT_GRAYSCALE
=
2
,
CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA
=
3
,
CV_IMWRITE_PAM_FORMAT_RGB
=
4
,
CV_IMWRITE_PAM_FORMAT_RGB_ALPHA
=
5
,
};
//////////////////////////////// image codec ////////////////////////////////
namespace
cv
{
...
...
modules/imgcodecs/include/opencv2/imgcodecs/imgcodecs_c.h
0 → 100644
View file @
a4ab6092
#error "This header with legacy C API declarations has been removed from OpenCV. Legacy contants are available from legacy/constants_c.h file."
modules/imgcodecs/include/opencv2/imgcodecs/legacy/constants_c.h
0 → 100644
View file @
a4ab6092
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#ifndef OPENCV_IMGCODECS_LEGACY_CONSTANTS_H
#define OPENCV_IMGCODECS_LEGACY_CONSTANTS_H
/* duplicate of "ImreadModes" enumeration for better compatibility with OpenCV 3.x */
enum
{
/* 8bit, color or not */
CV_LOAD_IMAGE_UNCHANGED
=-
1
,
/* 8bit, gray */
CV_LOAD_IMAGE_GRAYSCALE
=
0
,
/* ?, color */
CV_LOAD_IMAGE_COLOR
=
1
,
/* any depth, ? */
CV_LOAD_IMAGE_ANYDEPTH
=
2
,
/* ?, any color */
CV_LOAD_IMAGE_ANYCOLOR
=
4
,
/* ?, no rotate */
CV_LOAD_IMAGE_IGNORE_ORIENTATION
=
128
};
/* duplicate of "ImwriteFlags" enumeration for better compatibility with OpenCV 3.x */
enum
{
CV_IMWRITE_JPEG_QUALITY
=
1
,
CV_IMWRITE_JPEG_PROGRESSIVE
=
2
,
CV_IMWRITE_JPEG_OPTIMIZE
=
3
,
CV_IMWRITE_JPEG_RST_INTERVAL
=
4
,
CV_IMWRITE_JPEG_LUMA_QUALITY
=
5
,
CV_IMWRITE_JPEG_CHROMA_QUALITY
=
6
,
CV_IMWRITE_PNG_COMPRESSION
=
16
,
CV_IMWRITE_PNG_STRATEGY
=
17
,
CV_IMWRITE_PNG_BILEVEL
=
18
,
CV_IMWRITE_PNG_STRATEGY_DEFAULT
=
0
,
CV_IMWRITE_PNG_STRATEGY_FILTERED
=
1
,
CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY
=
2
,
CV_IMWRITE_PNG_STRATEGY_RLE
=
3
,
CV_IMWRITE_PNG_STRATEGY_FIXED
=
4
,
CV_IMWRITE_PXM_BINARY
=
32
,
CV_IMWRITE_EXR_TYPE
=
48
,
CV_IMWRITE_WEBP_QUALITY
=
64
,
CV_IMWRITE_PAM_TUPLETYPE
=
128
,
CV_IMWRITE_PAM_FORMAT_NULL
=
0
,
CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE
=
1
,
CV_IMWRITE_PAM_FORMAT_GRAYSCALE
=
2
,
CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA
=
3
,
CV_IMWRITE_PAM_FORMAT_RGB
=
4
,
CV_IMWRITE_PAM_FORMAT_RGB_ALPHA
=
5
,
};
#endif // OPENCV_IMGCODECS_LEGACY_CONSTANTS_H
modules/imgcodecs/src/precomp.hpp
View file @
a4ab6092
...
...
@@ -43,6 +43,7 @@
#define __IMGCODECS_H_
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgcodecs/legacy/constants_c.h"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp"
...
...
modules/imgproc/include/opencv2/imgproc.hpp
View file @
a4ab6092
...
...
@@ -204,6 +204,10 @@ namespace cv
//! @addtogroup imgproc_filter
//! @{
enum
SpecialFilter
{
FILTER_SCHARR
=
-
1
};
//! type of morphological operation
enum
MorphTypes
{
MORPH_ERODE
=
0
,
//!< see #erode
...
...
@@ -1349,14 +1353,14 @@ CV_EXPORTS_W Mat getGaussianKernel( int ksize, double sigma, int ktype = CV_64F
/** @brief Returns filter coefficients for computing spatial image derivatives.
The function computes and returns the filter coefficients for spatial image derivatives. When
`ksize=
CV
_SCHARR`, the Scharr \f$3 \times 3\f$ kernels are generated (see #Scharr). Otherwise, Sobel
`ksize=
FILTER
_SCHARR`, the Scharr \f$3 \times 3\f$ kernels are generated (see #Scharr). Otherwise, Sobel
kernels are generated (see #Sobel). The filters are normally passed to #sepFilter2D or to
@param kx Output matrix of row filter coefficients. It has the type ktype .
@param ky Output matrix of column filter coefficients. It has the type ktype .
@param dx Derivative order in respect of x.
@param dy Derivative order in respect of y.
@param ksize Aperture size. It can be
CV
_SCHARR, 1, 3, 5, or 7.
@param ksize Aperture size. It can be
FILTER
_SCHARR, 1, 3, 5, or 7.
@param normalize Flag indicating whether to normalize (scale down) the filter coefficients or not.
Theoretically, the coefficients should have the denominator \f$=2^{ksize*2-dx-dy-2}\f$. If you are
going to filter floating-point images, you are likely to use the normalized kernels. But if you
...
...
@@ -1623,7 +1627,7 @@ calculate the derivative. When \f$\texttt{ksize = 1}\f$, the \f$3 \times 1\f$ or
kernel is used (that is, no Gaussian smoothing is done). `ksize = 1` can only be used for the first
or the second x- or y- derivatives.
There is also the special value `ksize = #
CV
_SCHARR (-1)` that corresponds to the \f$3\times3\f$ Scharr
There is also the special value `ksize = #
FILTER
_SCHARR (-1)` that corresponds to the \f$3\times3\f$ Scharr
filter that may give more accurate results than the \f$3\times3\f$ Sobel. The Scharr aperture is
\f[\vecthreethree{-3}{0}{3}{-10}{0}{10}{-3}{0}{3}\f]
...
...
@@ -1694,7 +1698,7 @@ call
is equivalent to
\f[\texttt{Sobel(src, dst, ddepth, dx, dy,
CV
_SCHARR, scale, delta, borderType)} .\f]
\f[\texttt{Sobel(src, dst, ddepth, dx, dy,
FILTER
_SCHARR, scale, delta, borderType)} .\f]
@param src input image.
@param dst output image of the same size and the same number of channels as src.
...
...
modules/java/generator/gen_java.py
View file @
a4ab6092
...
...
@@ -1182,7 +1182,7 @@ if __name__ == "__main__":
with
open
(
srcfiles_fname
)
as
f
:
srcfiles
=
[
os
.
path
.
join
(
module_location
,
str
(
l
)
.
strip
())
for
l
in
f
.
readlines
()
if
str
(
l
)
.
strip
()]
else
:
re_bad
=
re
.
compile
(
r'(private|.inl.hpp$|_inl.hpp$|.details.hpp$|_winrt.hpp$|/cuda/)'
)
re_bad
=
re
.
compile
(
r'(private|.inl.hpp$|_inl.hpp$|.details.hpp$|_winrt.hpp$|/cuda/
|/legacy/
)'
)
# .h files before .hpp
h_files
=
[]
hpp_files
=
[]
...
...
modules/photo/include/opencv2/photo.hpp
View file @
a4ab6092
...
...
@@ -61,12 +61,6 @@ camera calibration with multiple exposures and exposure fusion.
@}
*/
enum
InpaintingModes
{
CV_INPAINT_NS
=
0
,
CV_INPAINT_TELEA
=
1
};
namespace
cv
{
...
...
modules/photo/include/opencv2/photo/legacy/constants_c.h
0 → 100644
View file @
a4ab6092
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#ifndef OPENCV_PHOTO_LEGACY_CONSTANTS_H
#define OPENCV_PHOTO_LEGACY_CONSTANTS_H
enum
InpaintingModes
{
CV_INPAINT_NS
=
0
,
CV_INPAINT_TELEA
=
1
};
#endif // OPENCV_PHOTO_LEGACY_CONSTANTS_H
modules/photo/src/inpaint.cpp
View file @
a4ab6092
...
...
@@ -47,6 +47,7 @@
#include "precomp.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/photo/legacy/constants_c.h"
#undef CV_MAT_ELEM_PTR_FAST
#define CV_MAT_ELEM_PTR_FAST( mat, row, col, pix_size ) \
...
...
modules/python/bindings/CMakeLists.txt
View file @
a4ab6092
...
...
@@ -43,6 +43,7 @@ ocv_list_filterout(opencv_hdrs "modules/.*_inl\\\\.h*")
ocv_list_filterout
(
opencv_hdrs
"modules/.*
\\\\
.details
\\\\
.h*"
)
ocv_list_filterout
(
opencv_hdrs
"modules/.*
\\\\
.private
\\\\
.h*"
)
ocv_list_filterout
(
opencv_hdrs
"modules/.*/private
\\\\
.h*"
)
ocv_list_filterout
(
opencv_hdrs
"modules/.*/legacy/.*"
)
ocv_list_filterout
(
opencv_hdrs
"modules/.*/detection_based_tracker
\\\\
.hpp"
)
# Conditional compilation
if
(
NOT HAVE_CUDA
)
ocv_list_filterout
(
opencv_hdrs
"modules/cuda.*"
)
...
...
modules/video/include/opencv2/video/legacy/constants_c.h
0 → 100644
View file @
a4ab6092
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#ifndef OPENCV_VIDEO_LEGACY_CONSTANTS_H
#define OPENCV_VIDEO_LEGACY_CONSTANTS_H
enum
{
CV_LKFLOW_PYR_A_READY
=
1
,
CV_LKFLOW_PYR_B_READY
=
2
,
CV_LKFLOW_INITIAL_GUESSES
=
4
,
CV_LKFLOW_GET_MIN_EIGENVALS
=
8
};
#endif // OPENCV_VIDEO_LEGACY_CONSTANTS_H
modules/video/include/opencv2/video/tracking.hpp
View file @
a4ab6092
...
...
@@ -47,14 +47,6 @@
#include "opencv2/core.hpp"
#include "opencv2/imgproc.hpp"
enum
{
CV_LKFLOW_PYR_A_READY
=
1
,
CV_LKFLOW_PYR_B_READY
=
2
,
CV_LKFLOW_INITIAL_GUESSES
=
4
,
CV_LKFLOW_GET_MIN_EIGENVALS
=
8
};
namespace
cv
{
...
...
modules/videoio/include/opencv2/videoio/legacy/constants_c.h
0 → 100644
View file @
a4ab6092
This diff is collapsed.
Click to expand it.
modules/videoio/include/opencv2/videoio/videoio_c.h
View file @
a4ab6092
This diff is collapsed.
Click to expand it.
modules/videoio/src/cap_gphoto2.cpp
View file @
a4ab6092
...
...
@@ -1005,7 +1005,7 @@ void DigitalCameraCapture::readFrameFromFile(CameraFile * file, OutputArray outp
Mat
buf
=
Mat
(
1
,
size
,
CV_8UC1
,
(
void
*
)
data
);
if
(
!
buf
.
empty
())
{
frame
=
imdecode
(
buf
,
CV_LOAD_IMAGE
_UNCHANGED
);
frame
=
imdecode
(
buf
,
IMREAD
_UNCHANGED
);
}
frame
.
copyTo
(
outputFrame
);
}
...
...
modules/videoio/src/cap_images.cpp
View file @
a4ab6092
...
...
@@ -133,7 +133,7 @@ bool CvCapture_Images::grabFrame()
return
!
frame
.
empty
();
}
frame
=
imread
(
str
,
CV_LOAD_IMAGE
_UNCHANGED
);
frame
=
imread
(
str
,
IMREAD
_UNCHANGED
);
if
(
!
frame
.
empty
()
)
currentframe
++
;
...
...
modules/videoio/src/cap_mjpeg_decoder.cpp
View file @
a4ab6092
...
...
@@ -164,7 +164,7 @@ bool MotionJpegCapture::retrieveFrame(int, OutputArray output_frame)
if
(
data
.
size
())
{
m_current_frame
=
imdecode
(
data
,
CV_LOAD_IMAGE_ANYDEPTH
|
CV_LOAD_IMAGE
_COLOR
|
IMREAD_IGNORE_ORIENTATION
);
m_current_frame
=
imdecode
(
data
,
IMREAD_ANYDEPTH
|
IMREAD
_COLOR
|
IMREAD_IGNORE_ORIENTATION
);
}
m_current_frame
.
copyTo
(
output_frame
);
...
...
modules/videoio/src/precomp.hpp
View file @
a4ab6092
...
...
@@ -43,6 +43,7 @@
#define __VIDEOIO_H_
#include "opencv2/videoio.hpp"
#include "opencv2/videoio/legacy/constants_c.h"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp"
...
...
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