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
801079e2
Commit
801079e2
authored
Jul 13, 2011
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
partial implementation of complex out args in Java wrappers
parent
066039fd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
0 deletions
+55
-0
gen_java.py
modules/java/gen_java.py
+0
-0
Point.java
modules/java/src/java/Point.java
+8
-0
Point3.java
modules/java/src/java/Point3.java
+9
-0
Rect.java
modules/java/src/java/Rect.java
+10
-0
RotatedRect.java
modules/java/src/java/RotatedRect.java
+11
-0
Scalar.java
modules/java/src/java/Scalar.java
+9
-0
Size.java
modules/java/src/java/Size.java
+8
-0
No files found.
modules/java/gen_java.py
View file @
801079e2
This diff is collapsed.
Click to expand it.
modules/java/src/java/Point.java
View file @
801079e2
...
...
@@ -14,6 +14,14 @@ public class Point {
this
(
0
,
0
);
}
public
Point
(
double
[]
vals
)
{
this
();
if
(
vals
!=
null
)
{
x
=
vals
.
length
>
0
?
vals
[
0
]
:
0
;
y
=
vals
.
length
>
1
?
vals
[
1
]
:
0
;
}
}
public
Point
clone
()
{
return
new
Point
(
x
,
y
);
}
...
...
modules/java/src/java/Point3.java
View file @
801079e2
...
...
@@ -21,6 +21,15 @@ public class Point3 {
z
=
0
;
}
public
Point3
(
double
[]
vals
)
{
this
();
if
(
vals
!=
null
)
{
x
=
vals
.
length
>
0
?
vals
[
0
]
:
0
;
y
=
vals
.
length
>
1
?
vals
[
1
]
:
0
;
z
=
vals
.
length
>
2
?
vals
[
2
]
:
0
;
}
}
public
Point3
clone
()
{
return
new
Point3
(
x
,
y
,
z
);
}
...
...
modules/java/src/java/Rect.java
View file @
801079e2
...
...
@@ -27,6 +27,16 @@ public class Rect {
this
((
int
)
p
.
x
,
(
int
)
p
.
y
,
(
int
)
s
.
width
,
(
int
)
s
.
height
);
}
public
Rect
(
double
[]
vals
)
{
this
();
if
(
vals
!=
null
)
{
x
=
vals
.
length
>
0
?
(
int
)
vals
[
0
]
:
0
;
y
=
vals
.
length
>
1
?
(
int
)
vals
[
1
]
:
0
;
width
=
vals
.
length
>
2
?
(
int
)
vals
[
2
]
:
0
;
height
=
vals
.
length
>
3
?
(
int
)
vals
[
3
]
:
0
;
}
}
public
Rect
clone
()
{
return
new
Rect
(
x
,
y
,
width
,
height
);
}
...
...
modules/java/src/java/RotatedRect.java
View file @
801079e2
...
...
@@ -17,6 +17,17 @@ public class RotatedRect {
this
.
angle
=
a
;
}
public
RotatedRect
(
double
[]
vals
)
{
this
();
if
(
vals
!=
null
)
{
center
.
x
=
vals
.
length
>
0
?
(
int
)
vals
[
0
]
:
0
;
center
.
x
=
vals
.
length
>
1
?
(
int
)
vals
[
1
]
:
0
;
size
.
width
=
vals
.
length
>
2
?
(
int
)
vals
[
2
]
:
0
;
size
.
height
=
vals
.
length
>
3
?
(
int
)
vals
[
3
]
:
0
;
angle
=
vals
.
length
>
4
?
(
int
)
vals
[
4
]
:
0
;
}
}
public
void
points
(
Point
pt
[])
{
double
_angle
=
angle
*
Math
.
PI
/
180.0
;
...
...
modules/java/src/java/Scalar.java
View file @
801079e2
...
...
@@ -24,6 +24,15 @@ public class Scalar {
this
(
v0
,
0
,
0
,
0
);
}
public
Scalar
(
double
[]
vals
)
{
if
(
vals
!=
null
)
{
v0
=
vals
.
length
>
0
?
(
int
)
vals
[
0
]
:
0
;
v1
=
vals
.
length
>
1
?
(
int
)
vals
[
1
]
:
0
;
v2
=
vals
.
length
>
2
?
(
int
)
vals
[
2
]
:
0
;
v3
=
vals
.
length
>
3
?
(
int
)
vals
[
3
]
:
0
;
}
}
public
static
Scalar
all
(
double
v
)
{
return
new
Scalar
(
v
,
v
,
v
,
v
);
}
...
...
modules/java/src/java/Size.java
View file @
801079e2
...
...
@@ -19,6 +19,14 @@ public class Size {
height
=
(
double
)
p
.
y
;
}
public
Size
(
double
[]
vals
)
{
this
();
if
(
vals
!=
null
)
{
width
=
vals
.
length
>
0
?
vals
[
0
]
:
0
;
height
=
vals
.
length
>
1
?
vals
[
1
]
:
0
;
}
}
public
double
area
()
{
return
width
*
height
;
}
...
...
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