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
25db4538
Commit
25db4538
authored
Aug 03, 2011
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java API: (per code review) renaming and moving utility classes
Testing: 1079/0/584
parent
02d5d93c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
14 deletions
+14
-14
ConvertersTest.java
...java/android_test/src/org/opencv/test/ConvertersTest.java
+1
-1
OpenCVTestRunner.java
...va/android_test/src/org/opencv/test/OpenCVTestRunner.java
+4
-4
coreTest.java
.../java/android_test/src/org/opencv/test/core/coreTest.java
+1
-1
gen_java.py
modules/java/gen_java.py
+1
-1
utils.cpp
modules/java/src/cpp/utils.cpp
+4
-4
android+Utils.java
modules/java/src/java/android+Utils.java
+2
-2
utils+Converters.java
modules/java/src/java/utils+Converters.java
+1
-1
No files found.
modules/java/android_test/src/org/opencv/test/ConvertersTest.java
View file @
25db4538
...
...
@@ -3,7 +3,7 @@ package org.opencv.test;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.opencv.Converters
;
import
org.opencv.
utils.
Converters
;
import
org.opencv.core.CvType
;
import
org.opencv.core.Mat
;
import
org.opencv.core.Point
;
...
...
modules/java/android_test/src/org/opencv/test/OpenCVTestRunner.java
View file @
25db4538
...
...
@@ -5,7 +5,7 @@ import android.test.AndroidTestRunner;
import
android.test.InstrumentationTestRunner
;
import
android.util.Log
;
import
org.opencv.
Android
;
import
org.opencv.
android.Utils
;
import
java.io.File
;
import
java.io.IOException
;
...
...
@@ -50,9 +50,9 @@ public class OpenCVTestRunner extends InstrumentationTestRunner {
@Override
public
void
onStart
()
{
context
=
getContext
();
LENA_PATH
=
Android
.
ExportResource
(
context
,
R
.
drawable
.
lena
);
CHESS_PATH
=
Android
.
ExportResource
(
context
,
R
.
drawable
.
chessboard
);
LBPCASCADE_FRONTALFACE_PATH
=
Android
.
ExportResource
(
context
,
R
.
raw
.
lbpcascade_frontalface
);
LENA_PATH
=
Utils
.
ExportResource
(
context
,
R
.
drawable
.
lena
);
CHESS_PATH
=
Utils
.
ExportResource
(
context
,
R
.
drawable
.
chessboard
);
LBPCASCADE_FRONTALFACE_PATH
=
Utils
.
ExportResource
(
context
,
R
.
raw
.
lbpcascade_frontalface
);
// List<TestCase> testCases = androidTestRunner.getTestCases();
// Collections.shuffle(testCases); //shuffle the tests order
...
...
modules/java/android_test/src/org/opencv/test/core/coreTest.java
View file @
25db4538
...
...
@@ -3,7 +3,7 @@ package org.opencv.test.core;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.opencv.Converters
;
import
org.opencv.
utils.
Converters
;
import
org.opencv.core.Core
;
import
org.opencv.core.CvException
;
import
org.opencv.core.CvType
;
...
...
modules/java/gen_java.py
View file @
25db4538
...
...
@@ -811,7 +811,7 @@ extern "C" {
if
ctype
.
startswith
(
'vector'
):
imports
.
add
(
"java.util.List"
)
imports
.
add
(
"org.opencv.core.Mat"
)
imports
.
add
(
"org.opencv.Converters"
)
imports
.
add
(
"org.opencv.
utils.
Converters"
)
ctype
=
ctype
.
replace
(
'vector_'
,
''
)
j_type
=
''
if
ctype
in
type_dict
:
...
...
modules/java/src/cpp/
Android
.cpp
→
modules/java/src/cpp/
utils
.cpp
View file @
25db4538
...
...
@@ -9,12 +9,12 @@ extern "C" {
#endif
/*
* Class: org_opencv_
Android
* Class: org_opencv_
android_Utils
* Method: nBitmapToMat(Bitmap b)
* Signature: (L)J
*/
JNIEXPORT
jlong
JNICALL
Java_org_opencv_
Android
_nBitmapToMat
JNIEXPORT
jlong
JNICALL
Java_org_opencv_
android_Utils
_nBitmapToMat
(
JNIEnv
*
env
,
jclass
cls
,
jobject
bitmap
)
{
AndroidBitmapInfo
info
;
...
...
@@ -40,11 +40,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_Android_nBitmapToMat
}
/*
* Class: org_opencv_
Android
* Class: org_opencv_
android_Utils
* Method: nBitmapToMat(long m, Bitmap b)
* Signature: (JL)Z
*/
JNIEXPORT
jboolean
JNICALL
Java_org_opencv_
Android
_nMatToBitmap
JNIEXPORT
jboolean
JNICALL
Java_org_opencv_
android_Utils
_nMatToBitmap
(
JNIEnv
*
env
,
jclass
cls
,
jlong
m
,
jobject
bitmap
)
{
AndroidBitmapInfo
info
;
...
...
modules/java/src/java/
Android
.java
→
modules/java/src/java/
android+Utils
.java
View file @
25db4538
package
org
.
opencv
;
package
org
.
opencv
.
android
;
import
org.opencv.core.CvException
;
import
org.opencv.core.Mat
;
...
...
@@ -11,7 +11,7 @@ import java.io.InputStream;
import
android.content.Context
;
import
android.graphics.Bitmap
;
public
class
Android
{
public
class
Utils
{
public
static
String
ExportResource
(
Context
context
,
int
resourceId
)
{
return
ExportResource
(
context
,
resourceId
,
"OpenCV_data"
);
...
...
modules/java/src/java/Converters.java
→
modules/java/src/java/
utils+
Converters.java
View file @
25db4538
package
org
.
opencv
;
package
org
.
opencv
.
utils
;
import
java.util.List
;
...
...
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