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
3d9cb082
Commit
3d9cb082
authored
Jul 22, 2011
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
making CV data type to be int
parent
8378ba75
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
94 additions
and
123 deletions
+94
-123
OpenCVTestCase.java
...java/android_test/src/org/opencv/test/OpenCVTestCase.java
+1
-1
Converters.java
modules/java/src/java/Converters.java
+5
-5
core+CvType.java
modules/java/src/java/core+CvType.java
+31
-50
core+Mat.java
modules/java/src/java/core+Mat.java
+32
-42
puzzle15View.java
...-puzzle/src/org/opencv/samples/puzzle15/puzzle15View.java
+4
-4
FdView.java
...roid/face-detection/src/org/opencv/samples/fd/FdView.java
+2
-2
ImageManipulationsView.java
...cv/samples/imagemanipulations/ImageManipulationsView.java
+8
-8
Sample1View.java
...dopencv/src/org/opencv/samples/tutorial1/Sample1View.java
+4
-4
Sample2View.java
...vcamera/src/org/opencv/samples/tutorial2/Sample2View.java
+3
-3
Sample4View.java
...4-mixed/src/org/opencv/samples/tutorial4/Sample4View.java
+4
-4
No files found.
modules/java/android_test/src/org/opencv/test/OpenCVTestCase.java
View file @
3d9cb082
...
...
@@ -122,7 +122,7 @@ public class OpenCVTestCase extends TestCase {
//OpenCVTestRunner.Log(m1.toString());
//OpenCVTestRunner.Log(m2.toString());
if
(
!
m1
.
type
().
equals
(
m2
.
type
()
)
||
if
(
m1
.
type
()
!=
m2
.
type
(
)
||
m1
.
cols
()
!=
m2
.
cols
()
||
m1
.
rows
()
!=
m2
.
rows
())
{
throw
new
UnsupportedOperationException
();
}
...
...
modules/java/src/java/Converters.java
View file @
3d9cb082
...
...
@@ -32,7 +32,7 @@ public class Converters {
if
(
pts
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
();
int
cols
=
m
.
cols
();
if
(
!
CvType
.
CV_32SC2
.
equals
(
m
.
type
()
)
||
m
.
rows
()!=
1
)
if
(
CvType
.
CV_32SC2
!=
m
.
type
(
)
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
();
pts
.
clear
();
...
...
@@ -65,7 +65,7 @@ public class Converters {
if
(
mats
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
();
int
cols
=
m
.
cols
();
if
(
!
CvType
.
CV_32SC2
.
equals
(
m
.
type
()
)
||
m
.
rows
()!=
1
)
if
(
CvType
.
CV_32SC2
!=
m
.
type
(
)
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
();
mats
.
clear
();
...
...
@@ -102,7 +102,7 @@ public class Converters {
if
(
fs
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
();
int
cols
=
m
.
cols
();
if
(
!
CvType
.
CV_32FC1
.
equals
(
m
.
type
()
)
||
m
.
rows
()!=
1
)
if
(
CvType
.
CV_32FC1
!=
m
.
type
(
)
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
();
fs
.
clear
();
...
...
@@ -151,7 +151,7 @@ public class Converters {
if
(
is
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
();
int
cols
=
m
.
cols
();
if
(
!
CvType
.
CV_32SC1
.
equals
(
m
.
type
()
)
||
m
.
rows
()!=
1
)
if
(
CvType
.
CV_32SC1
!=
m
.
type
(
)
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
();
is
.
clear
();
...
...
@@ -186,7 +186,7 @@ public class Converters {
if
(
rs
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
();
int
cols
=
m
.
cols
();
if
(
!
CvType
.
CV_32SC4
.
equals
(
m
.
type
()
)
||
m
.
rows
()!=
1
)
if
(
CvType
.
CV_32SC4
!=
m
.
type
(
)
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
();
rs
.
clear
();
...
...
modules/java/src/java/core+CvType.java
View file @
3d9cb082
...
...
@@ -3,8 +3,16 @@ package org.opencv.core;
public
final
class
CvType
{
// type depth constants
public
static
final
int
CV_8U
=
0
,
CV_8S
=
1
,
CV_16U
=
2
,
CV_16S
=
3
,
CV_32S
=
4
,
CV_32F
=
5
,
CV_64F
=
6
,
CV_USRTYPE1
=
7
;
// predefined type constants
public
static
final
CvType
public
static
final
int
CV_8UC1
=
CV_8UC
(
1
),
CV_8UC2
=
CV_8UC
(
2
),
CV_8UC3
=
CV_8UC
(
3
),
CV_8UC4
=
CV_8UC
(
4
),
CV_8SC1
=
CV_8SC
(
1
),
CV_8SC2
=
CV_8SC
(
2
),
CV_8SC3
=
CV_8SC
(
3
),
CV_8SC4
=
CV_8SC
(
4
),
CV_16UC1
=
CV_16UC
(
1
),
CV_16UC2
=
CV_16UC
(
2
),
CV_16UC3
=
CV_16UC
(
3
),
CV_16UC4
=
CV_16UC
(
4
),
...
...
@@ -13,21 +21,9 @@ public final class CvType {
CV_32FC1
=
CV_32FC
(
1
),
CV_32FC2
=
CV_32FC
(
2
),
CV_32FC3
=
CV_32FC
(
3
),
CV_32FC4
=
CV_32FC
(
4
),
CV_64FC1
=
CV_64FC
(
1
),
CV_64FC2
=
CV_64FC
(
2
),
CV_64FC3
=
CV_64FC
(
3
),
CV_64FC4
=
CV_64FC
(
4
);
// type depth constants
public
static
final
int
CV_8U
=
0
,
CV_8S
=
1
,
CV_16U
=
2
,
CV_16S
=
3
,
CV_32S
=
4
,
CV_32F
=
5
,
CV_64F
=
6
,
CV_USRTYPE1
=
7
;
private
static
final
int
CV_CN_MAX
=
512
,
CV_CN_SHIFT
=
3
,
CV_DEPTH_MAX
=
(
1
<<
CV_CN_SHIFT
);
private
final
int
value
;
protected
CvType
(
int
depth
,
int
channels
)
{
public
static
final
int
makeType
(
int
depth
,
int
channels
)
{
if
(
channels
<=
0
||
channels
>=
CV_CN_MAX
)
{
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Channels count should be 1.."
+
(
CV_CN_MAX
-
1
)
);
...
...
@@ -36,56 +32,52 @@ public final class CvType {
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Data type depth should be 0.."
+
(
CV_DEPTH_MAX
-
1
)
);
}
value
=
(
depth
&
(
CV_DEPTH_MAX
-
1
))
+
((
channels
-
1
)
<<
CV_CN_SHIFT
);
return
(
depth
&
(
CV_DEPTH_MAX
-
1
))
+
((
channels
-
1
)
<<
CV_CN_SHIFT
);
}
protected
CvType
(
int
val
)
{
value
=
val
;
}
public
static
final
CvType
CV_8UC
(
int
ch
)
{
return
new
CvType
(
CV_8U
,
ch
);
}
public
static
final
CvType
CV_8SC
(
int
ch
)
{
return
new
CvType
(
CV_8S
,
ch
);
}
public
static
final
int
CV_8UC
(
int
ch
)
{
return
makeType
(
CV_8U
,
ch
);
}
public
static
final
CvType
CV_16UC
(
int
ch
)
{
return
new
CvType
(
CV_16U
,
ch
);
}
public
static
final
int
CV_8SC
(
int
ch
)
{
return
makeType
(
CV_8S
,
ch
);
}
public
static
final
CvType
CV_16SC
(
int
ch
)
{
return
new
CvType
(
CV_16S
,
ch
);
}
public
static
final
int
CV_16UC
(
int
ch
)
{
return
makeType
(
CV_16U
,
ch
);
}
public
static
final
CvType
CV_32SC
(
int
ch
)
{
return
new
CvType
(
CV_32
S
,
ch
);
}
public
static
final
int
CV_16SC
(
int
ch
)
{
return
makeType
(
CV_16
S
,
ch
);
}
public
static
final
CvType
CV_32FC
(
int
ch
)
{
return
new
CvType
(
CV_32F
,
ch
);
}
public
static
final
int
CV_32SC
(
int
ch
)
{
return
makeType
(
CV_32S
,
ch
);
}
public
static
final
CvType
CV_64FC
(
int
ch
)
{
return
new
CvType
(
CV_64
F
,
ch
);
}
public
static
final
int
CV_32FC
(
int
ch
)
{
return
makeType
(
CV_32
F
,
ch
);
}
public
final
int
toInt
()
{
return
value
;
}
public
static
final
int
CV_64FC
(
int
ch
)
{
return
makeType
(
CV_64F
,
ch
)
;
}
public
final
int
channels
()
{
return
(
valu
e
>>
CV_CN_SHIFT
)
+
1
;
}
public
static
final
int
channels
(
int
type
)
{
return
(
typ
e
>>
CV_CN_SHIFT
)
+
1
;
}
public
final
int
depth
()
{
return
valu
e
&
(
CV_DEPTH_MAX
-
1
);
}
public
static
final
int
depth
(
int
type
)
{
return
typ
e
&
(
CV_DEPTH_MAX
-
1
);
}
public
final
boolean
isInteger
()
{
return
depth
(
)
<
CV_32F
;
}
public
static
final
boolean
isInteger
(
int
type
)
{
return
depth
(
type
)
<
CV_32F
;
}
public
final
int
CV_ELEM_SIZE
()
{
switch
(
depth
(
))
{
public
static
final
int
ELEM_SIZE
(
int
type
)
{
switch
(
depth
(
type
))
{
case
CV_8U:
case
CV_8S:
return
channels
(
);
return
channels
(
type
);
case
CV_16U:
case
CV_16S:
return
2
*
channels
(
);
return
2
*
channels
(
type
);
case
CV_32S:
case
CV_32F:
return
4
*
channels
(
);
return
4
*
channels
(
type
);
case
CV_64F:
return
8
*
channels
(
);
return
8
*
channels
(
type
);
default
:
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Unsupported CvType value: "
+
valu
e
);
"Unsupported CvType value: "
+
typ
e
);
}
}
@Override
public
final
String
toString
()
{
public
static
final
String
typeToString
(
int
type
)
{
String
s
;
switch
(
depth
(
))
{
switch
(
depth
(
type
))
{
case
CV_8U:
s
=
"CV_8U"
;
break
;
...
...
@@ -111,20 +103,9 @@ public final class CvType {
s
=
"CV_USRTYPE1"
;
}
int
ch
=
channels
(
);
int
ch
=
channels
(
type
);
if
(
ch
<=
4
)
return
s
+
"C"
+
ch
;
else
return
s
+
"C("
+
ch
+
")"
;
}
// hashCode() has to be overridden if equals() is
@Override
public
final
int
hashCode
()
{
return
value
;
}
@Override
public
final
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
return
true
;
if
(
!(
obj
instanceof
CvType
)
)
return
false
;
CvType
other
=
(
CvType
)
obj
;
return
value
==
other
.
value
;
}
}
modules/java/src/java/core+Mat.java
View file @
3d9cb082
...
...
@@ -16,27 +16,17 @@ public class Mat {
}
//javadoc:Mat::Mat(rows,cols,type)
public
Mat
(
int
rows
,
int
cols
,
CvType
type
)
{
this
(
nCreateMat
(
rows
,
cols
,
type
.
toInt
())
);
}
//javadoc:Mat::Mat(rows,cols,depth)
public
Mat
(
int
rows
,
int
cols
,
int
depth
)
{
this
(
rows
,
cols
,
new
CvType
(
depth
,
1
)
);
public
Mat
(
int
rows
,
int
cols
,
int
type
)
{
this
(
nCreateMat
(
rows
,
cols
,
type
)
);
}
//javadoc:Mat::Mat(rows,cols,type,s)
public
Mat
(
int
rows
,
int
cols
,
CvType
type
,
Scalar
s
)
{
this
(
nCreateMat
(
rows
,
cols
,
type
.
toInt
(),
s
.
val
[
0
],
s
.
val
[
1
],
s
.
val
[
2
],
s
.
val
[
3
])
);
}
//javadoc:Mat::Mat(rows,cols,depth,s)
public
Mat
(
int
rows
,
int
cols
,
int
depth
,
Scalar
s
)
{
this
(
rows
,
cols
,
new
CvType
(
depth
,
1
),
s
);
public
Mat
(
int
rows
,
int
cols
,
int
type
,
Scalar
s
)
{
this
(
nCreateMat
(
rows
,
cols
,
type
,
s
.
val
[
0
],
s
.
val
[
1
],
s
.
val
[
2
],
s
.
val
[
3
])
);
}
//javadoc:Mat::
dispo
se()
public
void
dispo
se
()
{
//javadoc:Mat::
relea
se()
public
void
relea
se
()
{
nRelease
(
nativeObj
);
}
...
...
@@ -52,7 +42,7 @@ public class Mat {
public
String
toString
()
{
if
(
nativeObj
==
0
)
return
"Mat [ nativeObj=NULL ]"
;
return
"Mat [ "
+
rows
()
+
"*"
+
cols
()
+
"*"
+
type
()
+
rows
()
+
"*"
+
cols
()
+
"*"
+
CvType
.
typeToString
(
type
())
+
", isCont="
+
isContinuous
()
+
", isSubmat="
+
isSubmatrix
()
+
", nativeObj=0x"
+
Long
.
toHexString
(
nativeObj
)
+
", dataAddr=0x"
+
Long
.
toHexString
(
dataAddr
())
+
...
...
@@ -82,19 +72,19 @@ public class Mat {
}
//javadoc:Mat::type()
public
CvType
type
()
{
public
int
type
()
{
checkNull
();
return
n
ew
CvType
(
nType
(
nativeObj
)
);
return
n
Type
(
nativeObj
);
}
//javadoc:Mat::depth()
public
int
depth
()
{
return
type
().
depth
(
);
}
public
int
depth
()
{
return
CvType
.
depth
(
type
()
);
}
//javadoc:Mat::channels()
public
int
channels
()
{
return
type
().
channels
(
);
}
public
int
channels
()
{
return
CvType
.
channels
(
type
()
);
}
//javadoc:Mat::elemSize()
public
int
elemSize
()
{
return
type
().
CV_ELEM_SIZE
(
);
}
public
int
elemSize
()
{
return
CvType
.
ELEM_SIZE
(
type
()
);
}
//javadoc:Mat::rows()
public
int
rows
()
{
...
...
@@ -177,8 +167,8 @@ public class Mat {
public
int
put
(
int
row
,
int
col
,
float
[]
data
)
{
checkNull
();
if
(
data
!=
null
)
{
CvType
t
=
type
();
if
(
t
.
depth
(
)
==
CvType
.
CV_32F
)
{
int
t
=
type
();
if
(
CvType
.
depth
(
t
)
==
CvType
.
CV_32F
)
{
return
nPutF
(
nativeObj
,
row
,
col
,
data
.
length
,
data
);
}
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Mat data type is not compatible: "
+
t
);
...
...
@@ -189,8 +179,8 @@ public class Mat {
public
int
put
(
int
row
,
int
col
,
int
[]
data
)
{
checkNull
();
if
(
data
!=
null
)
{
CvType
t
=
type
();
if
(
t
.
depth
(
)
==
CvType
.
CV_32S
)
{
int
t
=
type
();
if
(
CvType
.
depth
(
t
)
==
CvType
.
CV_32S
)
{
return
nPutI
(
nativeObj
,
row
,
col
,
data
.
length
,
data
);
}
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Mat data type is not compatible: "
+
t
);
...
...
@@ -201,8 +191,8 @@ public class Mat {
public
int
put
(
int
row
,
int
col
,
short
[]
data
)
{
checkNull
();
if
(
data
!=
null
)
{
CvType
t
=
type
();
if
(
t
.
depth
()
==
CvType
.
CV_16U
||
t
.
depth
(
)
==
CvType
.
CV_16S
)
{
int
t
=
type
();
if
(
CvType
.
depth
(
t
)
==
CvType
.
CV_16U
||
CvType
.
depth
(
t
)
==
CvType
.
CV_16S
)
{
return
nPutS
(
nativeObj
,
row
,
col
,
data
.
length
,
data
);
}
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Mat data type is not compatible: "
+
t
);
...
...
@@ -213,8 +203,8 @@ public class Mat {
public
int
put
(
int
row
,
int
col
,
byte
[]
data
)
{
checkNull
();
if
(
data
!=
null
)
{
CvType
t
=
type
();
if
(
t
.
depth
()
==
CvType
.
CV_8U
||
t
.
depth
(
)
==
CvType
.
CV_8S
)
{
int
t
=
type
();
if
(
CvType
.
depth
(
t
)
==
CvType
.
CV_8U
||
CvType
.
depth
(
t
)
==
CvType
.
CV_8S
)
{
return
nPutB
(
nativeObj
,
row
,
col
,
data
.
length
,
data
);
}
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Mat data type is not compatible: "
+
t
);
...
...
@@ -224,8 +214,8 @@ public class Mat {
//javadoc:Mat::get(row,col,data)
public
int
get
(
int
row
,
int
col
,
byte
[]
data
)
{
checkNull
();
CvType
t
=
type
();
if
(
t
.
depth
()
==
CvType
.
CV_8U
||
t
.
depth
(
)
==
CvType
.
CV_8S
)
{
int
t
=
type
();
if
(
CvType
.
depth
(
t
)
==
CvType
.
CV_8U
||
CvType
.
depth
(
t
)
==
CvType
.
CV_8S
)
{
return
nGetB
(
nativeObj
,
row
,
col
,
data
.
length
,
data
);
}
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Mat data type is not compatible: "
+
t
);
...
...
@@ -234,8 +224,8 @@ public class Mat {
//javadoc:Mat::get(row,col,data)
public
int
get
(
int
row
,
int
col
,
short
[]
data
)
{
checkNull
();
CvType
t
=
type
();
if
(
t
.
depth
()
==
CvType
.
CV_16U
||
t
.
depth
(
)
==
CvType
.
CV_16S
)
{
int
t
=
type
();
if
(
CvType
.
depth
(
t
)
==
CvType
.
CV_16U
||
CvType
.
depth
(
t
)
==
CvType
.
CV_16S
)
{
return
nGetS
(
nativeObj
,
row
,
col
,
data
.
length
,
data
);
}
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Mat data type is not compatible: "
+
t
);
...
...
@@ -244,8 +234,8 @@ public class Mat {
//javadoc:Mat::get(row,col,data)
public
int
get
(
int
row
,
int
col
,
int
[]
data
)
{
checkNull
();
CvType
t
=
type
();
if
(
t
.
depth
(
)
==
CvType
.
CV_32S
)
{
int
t
=
type
();
if
(
CvType
.
depth
(
t
)
==
CvType
.
CV_32S
)
{
return
nGetI
(
nativeObj
,
row
,
col
,
data
.
length
,
data
);
}
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Mat data type is not compatible: "
+
t
);
...
...
@@ -254,8 +244,8 @@ public class Mat {
//javadoc:Mat::get(row,col,data)
public
int
get
(
int
row
,
int
col
,
float
[]
data
)
{
checkNull
();
CvType
t
=
type
();
if
(
t
.
depth
(
)
==
CvType
.
CV_32F
)
{
int
t
=
type
();
if
(
CvType
.
depth
(
t
)
==
CvType
.
CV_32F
)
{
return
nGetF
(
nativeObj
,
row
,
col
,
data
.
length
,
data
);
}
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Mat data type is not compatible: "
+
t
);
...
...
@@ -264,8 +254,8 @@ public class Mat {
//javadoc:Mat::get(row,col,data)
public
int
get
(
int
row
,
int
col
,
double
[]
data
)
{
checkNull
();
CvType
t
=
type
();
if
(
t
.
depth
(
)
==
CvType
.
CV_64F
)
{
int
t
=
type
();
if
(
CvType
.
depth
(
t
)
==
CvType
.
CV_64F
)
{
return
nGetD
(
nativeObj
,
row
,
col
,
data
.
length
,
data
);
}
throw
new
java
.
lang
.
UnsupportedOperationException
(
"Mat data type is not compatible: "
+
t
);
...
...
@@ -320,8 +310,8 @@ public class Mat {
}
//javadoc:Mat::eye(rows,cols,type)
static
public
Mat
eye
(
int
rows
,
int
cols
,
CvType
type
)
{
return
new
Mat
(
nEye
(
rows
,
cols
,
type
.
toInt
()
)
);
static
public
Mat
eye
(
int
rows
,
int
cols
,
int
type
)
{
return
new
Mat
(
nEye
(
rows
,
cols
,
type
)
);
}
// native stuff
...
...
samples/android/15-puzzle/src/org/opencv/samples/puzzle15/puzzle15View.java
View file @
3d9cb082
...
...
@@ -159,16 +159,16 @@ public class puzzle15View extends SampleCvViewBase implements OnTouchListener {
// Explicitly deallocate Mats
if
(
mCells
!=
null
)
{
for
(
Mat
m
:
mCells
)
m
.
dispo
se
();
m
.
relea
se
();
}
if
(
mCells15
!=
null
)
{
for
(
Mat
m
:
mCells15
)
m
.
dispo
se
();
m
.
relea
se
();
}
if
(
mRgba
!=
null
)
mRgba
.
dispo
se
();
mRgba
.
relea
se
();
if
(
mRgba15
!=
null
)
mRgba15
.
dispo
se
();
mRgba15
.
relea
se
();
mRgba
=
null
;
mRgba15
=
null
;
...
...
samples/android/face-detection/src/org/opencv/samples/fd/FdView.java
View file @
3d9cb082
...
...
@@ -105,9 +105,9 @@ class FdView extends SampleCvViewBase {
synchronized
(
this
)
{
// Explicitly deallocate Mats
if
(
mRgba
!=
null
)
mRgba
.
dispo
se
();
mRgba
.
relea
se
();
if
(
mGray
!=
null
)
mGray
.
dispo
se
();
mGray
.
relea
se
();
mRgba
=
null
;
mGray
=
null
;
...
...
samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsView.java
View file @
3d9cb082
...
...
@@ -149,21 +149,21 @@ class ImageManipulationsView extends SampleCvViewBase {
synchronized
(
this
)
{
// Explicitly deallocate Mats
if
(
mZoomWindow
!=
null
)
mZoomWindow
.
dispo
se
();
mZoomWindow
.
relea
se
();
if
(
mZoomCorner
!=
null
)
mZoomCorner
.
dispo
se
();
mZoomCorner
.
relea
se
();
if
(
mBlurWindow
!=
null
)
mBlurWindow
.
dispo
se
();
mBlurWindow
.
relea
se
();
if
(
mGrayInnerWindow
!=
null
)
mGrayInnerWindow
.
dispo
se
();
mGrayInnerWindow
.
relea
se
();
if
(
mRgbaInnerWindow
!=
null
)
mRgbaInnerWindow
.
dispo
se
();
mRgbaInnerWindow
.
relea
se
();
if
(
mRgba
!=
null
)
mRgba
.
dispo
se
();
mRgba
.
relea
se
();
if
(
mGray
!=
null
)
mGray
.
dispo
se
();
mGray
.
relea
se
();
if
(
mIntermediateMat
!=
null
)
mIntermediateMat
.
dispo
se
();
mIntermediateMat
.
relea
se
();
mRgba
=
null
;
mGray
=
null
;
...
...
samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1View.java
View file @
3d9cb082
...
...
@@ -70,13 +70,13 @@ class Sample1View extends SampleViewBase {
synchronized
(
this
)
{
// Explicitly deallocate Mats
if
(
mYuv
!=
null
)
mYuv
.
dispo
se
();
mYuv
.
relea
se
();
if
(
mRgba
!=
null
)
mRgba
.
dispo
se
();
mRgba
.
relea
se
();
if
(
mGraySubmat
!=
null
)
mGraySubmat
.
dispo
se
();
mGraySubmat
.
relea
se
();
if
(
mIntermediateMat
!=
null
)
mIntermediateMat
.
dispo
se
();
mIntermediateMat
.
relea
se
();
mYuv
=
null
;
mRgba
=
null
;
...
...
samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2View.java
View file @
3d9cb082
...
...
@@ -68,11 +68,11 @@ class Sample2View extends SampleCvViewBase {
synchronized
(
this
)
{
// Explicitly deallocate Mats
if
(
mRgba
!=
null
)
mRgba
.
dispo
se
();
mRgba
.
relea
se
();
if
(
mGray
!=
null
)
mGray
.
dispo
se
();
mGray
.
relea
se
();
if
(
mIntermediateMat
!=
null
)
mIntermediateMat
.
dispo
se
();
mIntermediateMat
.
relea
se
();
mRgba
=
null
;
mGray
=
null
;
...
...
samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4View.java
View file @
3d9cb082
...
...
@@ -70,13 +70,13 @@ class Sample4View extends SampleViewBase {
synchronized
(
this
)
{
// Explicitly deallocate Mats
if
(
mYuv
!=
null
)
mYuv
.
dispo
se
();
mYuv
.
relea
se
();
if
(
mRgba
!=
null
)
mRgba
.
dispo
se
();
mRgba
.
relea
se
();
if
(
mGraySubmat
!=
null
)
mGraySubmat
.
dispo
se
();
mGraySubmat
.
relea
se
();
if
(
mIntermediateMat
!=
null
)
mIntermediateMat
.
dispo
se
();
mIntermediateMat
.
relea
se
();
mYuv
=
null
;
mRgba
=
null
;
...
...
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