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
0608227e
Commit
0608227e
authored
7 years ago
by
Jcrist99
Committed by
Alexander Alekhin
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge pull request #9698 from abratchik:parse.doxygen
Support @deprecated tag in java wrappers (#9698)
parent
65061948
master
4.3.0
4.2.0
4.1.2
4.1.2-openvino
4.1.1
4.1.1-openvino
4.1.0
4.1.0-openvino
4.0.1
4.0.1-openvino
4.0.0
4.0.0-rc
4.0.0-openvino
4.0.0-beta
4.0.0-alpha
3.4.10
3.4.9
3.4.8
3.4.7
3.4.6
3.4.5
3.4.4
3.4.3
3.4.3-openvino
3.4.2
3.4.2-openvino
3.4.1
3.4.1-cvsdk
3.4.0
3.4.0-rc
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
12 deletions
+45
-12
DnnTensorFlowTest.java
modules/dnn/misc/java/test/DnnTensorFlowTest.java
+0
-1
features2d_manual.hpp
modules/features2d/misc/java/src/cpp/features2d_manual.hpp
+11
-2
gen_java.py
modules/java/generator/gen_java.py
+34
-9
No files found.
modules/dnn/misc/java/test/DnnTensorFlowTest.java
View file @
0608227e
...
...
@@ -9,7 +9,6 @@ import org.opencv.core.Scalar;
import
org.opencv.core.Size
;
import
org.opencv.dnn.DictValue
;
import
org.opencv.dnn.Dnn
;
import
org.opencv.dnn.Importer
;
import
org.opencv.dnn.Layer
;
import
org.opencv.dnn.Net
;
import
org.opencv.imgcodecs.Imgcodecs
;
...
...
This diff is collapsed.
Click to expand it.
modules/features2d/misc/java/src/cpp/features2d_manual.hpp
View file @
0608227e
...
...
@@ -12,6 +12,9 @@
namespace
cv
{
/**
* @deprecated Please use direct instantiation of Feature2D classes
*/
class
CV_EXPORTS_AS
(
FeatureDetector
)
javaFeatureDetector
{
public
:
...
...
@@ -87,8 +90,11 @@ public:
DYNAMIC_AKAZE
=
DYNAMICDETECTOR
+
AKAZE
};
//supported: FAST STAR SIFT SURF ORB MSER GFTT HARRIS BRISK AKAZE Grid(XXXX) Pyramid(XXXX) Dynamic(XXXX)
//not supported: SimpleBlob, Dense
/**
* supported: FAST STAR SIFT SURF ORB MSER GFTT HARRIS BRISK AKAZE Grid(XXXX) Pyramid(XXXX) Dynamic(XXXX)
* not supported: SimpleBlob, Dense
* @deprecated
*/
CV_WRAP
static
Ptr
<
javaFeatureDetector
>
create
(
int
detectorType
)
{
//String name;
...
...
@@ -179,6 +185,9 @@ private:
Ptr
<
FeatureDetector
>
wrapped
;
};
/**
* @deprecated
*/
class
CV_EXPORTS_AS
(
DescriptorExtractor
)
javaDescriptorExtractor
{
public
:
...
...
This diff is collapsed.
Click to expand it.
modules/java/generator/gen_java.py
View file @
0608227e
...
...
@@ -91,8 +91,8 @@ package org.opencv.$module;
$imports
// C++: class $name
//javadoc: $name
$docs
$annotation
public class $jname extends $base {
protected $jname(long addr) { super(addr); }
...
...
@@ -107,8 +107,8 @@ package org.opencv.$module;
$imports
// C++: class $name
//javadoc: $name
$docs
$annotation
public class $jname {
protected final long nativeObj;
...
...
@@ -125,6 +125,8 @@ package org.opencv.$module;
$imports
$docs
$annotation
public class $jname {
"""
...
...
@@ -182,8 +184,22 @@ $code
"""
class
GeneralInfo
():
def
__init__
(
self
,
name
,
namespaces
):
self
.
namespace
,
self
.
classpath
,
self
.
classname
,
self
.
name
=
self
.
parseName
(
name
,
namespaces
)
def
__init__
(
self
,
type
,
decl
,
namespaces
):
self
.
namespace
,
self
.
classpath
,
self
.
classname
,
self
.
name
=
self
.
parseName
(
decl
[
0
],
namespaces
)
# parse doxygen comments
self
.
params
=
{}
self
.
annotation
=
[]
if
type
==
"class"
:
docstring
=
"// C++: class "
+
self
.
name
+
"
\n
//javadoc: "
+
self
.
name
else
:
docstring
=
""
if
len
(
decl
)
>
5
and
decl
[
5
]:
logging
.
info
(
'docstring:
%
s'
,
decl
[
5
])
if
re
.
search
(
"(@|
\\\\
)deprecated"
,
decl
[
5
]):
self
.
annotation
.
append
(
"@Deprecated"
)
self
.
docstring
=
docstring
def
parseName
(
self
,
name
,
namespaces
):
'''
...
...
@@ -218,7 +234,7 @@ class GeneralInfo():
class
ConstInfo
(
GeneralInfo
):
def
__init__
(
self
,
decl
,
addedManually
=
False
,
namespaces
=
[]):
GeneralInfo
.
__init__
(
self
,
decl
[
0
]
,
namespaces
)
GeneralInfo
.
__init__
(
self
,
"const"
,
decl
,
namespaces
)
self
.
cname
=
self
.
name
.
replace
(
"."
,
"::"
)
self
.
value
=
decl
[
1
]
self
.
addedManually
=
addedManually
...
...
@@ -245,7 +261,7 @@ class ClassPropInfo():
class
ClassInfo
(
GeneralInfo
):
def
__init__
(
self
,
decl
,
namespaces
=
[]):
# [ 'class/struct cname', ': base', [modlist] ]
GeneralInfo
.
__init__
(
self
,
decl
[
0
]
,
namespaces
)
GeneralInfo
.
__init__
(
self
,
"class"
,
decl
,
namespaces
)
self
.
cname
=
self
.
name
.
replace
(
"."
,
"::"
)
self
.
methods
=
[]
self
.
methods_suffixes
=
{}
...
...
@@ -335,6 +351,8 @@ class ClassInfo(GeneralInfo):
name
=
self
.
name
,
jname
=
self
.
jname
,
imports
=
"
\n
"
.
join
(
self
.
getAllImports
(
M
)),
docs
=
self
.
docstring
,
annotation
=
"
\n
"
.
join
(
self
.
annotation
),
base
=
self
.
base
)
def
generateCppCode
(
self
):
...
...
@@ -364,7 +382,7 @@ class ArgInfo():
class
FuncInfo
(
GeneralInfo
):
def
__init__
(
self
,
decl
,
namespaces
=
[]):
# [ funcname, return_ctype, [modifiers], [args] ]
GeneralInfo
.
__init__
(
self
,
decl
[
0
]
,
namespaces
)
GeneralInfo
.
__init__
(
self
,
"func"
,
decl
,
namespaces
)
self
.
cname
=
self
.
name
.
replace
(
"."
,
"::"
)
self
.
jname
=
self
.
name
self
.
isconstructor
=
self
.
name
==
self
.
classname
...
...
@@ -741,6 +759,13 @@ class JavaWrapperGenerator(object):
java_doc
=
"//javadoc: "
+
f_name
+
"(
%
s)"
%
", "
.
join
([
a
.
name
for
a
in
args
if
a
.
ctype
])
j_code
.
write
(
" "
*
4
+
java_doc
+
"
\n
"
)
if
fi
.
docstring
:
lines
=
StringIO
(
fi
.
docstring
)
for
line
in
lines
:
j_code
.
write
(
" "
*
4
+
line
+
"
\n
"
)
if
fi
.
annotation
:
j_code
.
write
(
" "
*
4
+
"
\n
"
.
join
(
fi
.
annotation
)
+
"
\n
"
)
# public java wrapper method impl (calling native one above)
# e.g.
# public static void add( Mat src1, Mat src2, Mat dst, Mat mask, int dtype )
...
...
This diff is collapsed.
Click to expand it.
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