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
00b21248
Commit
00b21248
authored
Aug 14, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing more compile problems with Java bindings etc
parent
4530c7ad
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
80 additions
and
74 deletions
+80
-74
java_dev_intro.rst
doc/tutorials/introduction/desktop_java/java_dev_intro.rst
+1
-1
core.rst
modules/core/doc/core.rst
+0
-1
CoreTest.java
.../java/android_test/src/org/opencv/test/core/CoreTest.java
+0
-0
BRIEFDescriptorExtractorTest.java
.../opencv/test/features2d/BRIEFDescriptorExtractorTest.java
+2
-2
BruteForceDescriptorMatcherTest.java
...encv/test/features2d/BruteForceDescriptorMatcherTest.java
+4
-4
BruteForceHammingDescriptorMatcherTest.java
...st/features2d/BruteForceHammingDescriptorMatcherTest.java
+2
-2
BruteForceHammingLUTDescriptorMatcherTest.java
...features2d/BruteForceHammingLUTDescriptorMatcherTest.java
+2
-2
BruteForceL1DescriptorMatcherTest.java
...cv/test/features2d/BruteForceL1DescriptorMatcherTest.java
+4
-4
BruteForceSL2DescriptorMatcherTest.java
...v/test/features2d/BruteForceSL2DescriptorMatcherTest.java
+4
-4
FASTFeatureDetectorTest.java
...c/org/opencv/test/features2d/FASTFeatureDetectorTest.java
+1
-1
FlannBasedDescriptorMatcherTest.java
...encv/test/features2d/FlannBasedDescriptorMatcherTest.java
+4
-4
ORBDescriptorExtractorTest.java
...rg/opencv/test/features2d/ORBDescriptorExtractorTest.java
+2
-2
SIFTDescriptorExtractorTest.java
...g/opencv/test/features2d/SIFTDescriptorExtractorTest.java
+2
-2
SURFDescriptorExtractorTest.java
...g/opencv/test/features2d/SURFDescriptorExtractorTest.java
+2
-2
SURFFeatureDetectorTest.java
...c/org/opencv/test/features2d/SURFFeatureDetectorTest.java
+2
-2
ImgprocTest.java
...android_test/src/org/opencv/test/imgproc/ImgprocTest.java
+0
-0
BackgroundSubtractorMOGTest.java
...rc/org/opencv/test/video/BackgroundSubtractorMOGTest.java
+2
-2
gen_java.py
modules/java/generator/gen_java.py
+26
-21
Puzzle15Processor.java
...le/src/org/opencv/samples/puzzle15/Puzzle15Processor.java
+4
-4
CameraCalibrator.java
...rg/opencv/samples/cameracalibration/CameraCalibrator.java
+1
-1
OnCameraFrameRender.java
...opencv/samples/cameracalibration/OnCameraFrameRender.java
+3
-3
FdActivity.java
...tection/src/org/opencv/samples/facedetect/FdActivity.java
+1
-1
main.cpp
samples/android/hello-android/main.cpp
+4
-3
ImageManipulationsActivity.java
...amples/imagemanipulations/ImageManipulationsActivity.java
+4
-4
em.cpp
samples/cpp/em.cpp
+1
-0
DetectFaceDemo.java
samples/java/sbt/src/main/java/DetectFaceDemo.java
+1
-1
ScalaDetectFaceDemo.scala
samples/java/sbt/src/main/scala/ScalaDetectFaceDemo.scala
+1
-1
No files found.
doc/tutorials/introduction/desktop_java/java_dev_intro.rst
View file @
00b21248
...
...
@@ -398,7 +398,7 @@ Now modify src/main/java/HelloOpenCV.java so it contains the following Java code
// Draw a bounding box around each face.
for (Rect rect : faceDetections.toArray()) {
Core
.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height), new Scalar(0, 255, 0));
Imgproc
.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height), new Scalar(0, 255, 0));
}
// Save the visualized detection.
...
...
modules/core/doc/core.rst
View file @
00b21248
...
...
@@ -10,7 +10,6 @@ core. The Core Functionality
old_basic_structures
dynamic_structures
operations_on_arrays
drawing_functions
xml_yaml_persistence
old_xml_yaml_persistence
clustering
...
...
modules/java/android_test/src/org/opencv/test/core/CoreTest.java
View file @
00b21248
This diff is collapsed.
Click to expand it.
modules/java/android_test/src/org/opencv/test/features2d/BRIEFDescriptorExtractorTest.java
View file @
00b21248
...
...
@@ -18,8 +18,8 @@ public class BRIEFDescriptorExtractorTest extends OpenCVTestCase {
private
Mat
getTestImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
return
cross
;
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/BruteForceDescriptorMatcherTest.java
View file @
00b21248
...
...
@@ -53,8 +53,8 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getQueryImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
30
,
matSize
/
2
),
new
Point
(
matSize
-
31
,
matSize
/
2
),
new
Scalar
(
100
),
3
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
30
),
new
Point
(
matSize
/
2
,
matSize
-
31
),
new
Scalar
(
100
),
3
);
Imgproc
.
line
(
cross
,
new
Point
(
30
,
matSize
/
2
),
new
Point
(
matSize
-
31
,
matSize
/
2
),
new
Scalar
(
100
),
3
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
30
),
new
Point
(
matSize
/
2
,
matSize
-
31
),
new
Scalar
(
100
),
3
);
return
cross
;
}
...
...
@@ -73,8 +73,8 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getTrainImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
return
cross
;
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/BruteForceHammingDescriptorMatcherTest.java
View file @
00b21248
...
...
@@ -38,7 +38,7 @@ public class BruteForceHammingDescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getQueryImg
()
{
Mat
img
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
img
,
new
Point
(
40
,
matSize
-
40
),
new
Point
(
matSize
-
50
,
50
),
new
Scalar
(
0
),
8
);
Imgproc
.
line
(
img
,
new
Point
(
40
,
matSize
-
40
),
new
Point
(
matSize
-
50
,
50
),
new
Scalar
(
0
),
8
);
return
img
;
}
...
...
@@ -61,7 +61,7 @@ public class BruteForceHammingDescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getTrainImg
()
{
Mat
img
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
img
,
new
Point
(
40
,
40
),
new
Point
(
matSize
-
40
,
matSize
-
40
),
new
Scalar
(
0
),
8
);
Imgproc
.
line
(
img
,
new
Point
(
40
,
40
),
new
Point
(
matSize
-
40
,
matSize
-
40
),
new
Scalar
(
0
),
8
);
return
img
;
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/BruteForceHammingLUTDescriptorMatcherTest.java
View file @
00b21248
...
...
@@ -37,7 +37,7 @@ public class BruteForceHammingLUTDescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getQueryImg
()
{
Mat
img
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
img
,
new
Point
(
40
,
matSize
-
40
),
new
Point
(
matSize
-
50
,
50
),
new
Scalar
(
0
),
8
);
Imgproc
.
line
(
img
,
new
Point
(
40
,
matSize
-
40
),
new
Point
(
matSize
-
50
,
50
),
new
Scalar
(
0
),
8
);
return
img
;
}
...
...
@@ -60,7 +60,7 @@ public class BruteForceHammingLUTDescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getTrainImg
()
{
Mat
img
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
img
,
new
Point
(
40
,
40
),
new
Point
(
matSize
-
40
,
matSize
-
40
),
new
Scalar
(
0
),
8
);
Imgproc
.
line
(
img
,
new
Point
(
40
,
40
),
new
Point
(
matSize
-
40
,
matSize
-
40
),
new
Scalar
(
0
),
8
);
return
img
;
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/BruteForceL1DescriptorMatcherTest.java
View file @
00b21248
...
...
@@ -53,8 +53,8 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getQueryImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
30
,
matSize
/
2
),
new
Point
(
matSize
-
31
,
matSize
/
2
),
new
Scalar
(
100
),
3
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
30
),
new
Point
(
matSize
/
2
,
matSize
-
31
),
new
Scalar
(
100
),
3
);
Imgproc
.
line
(
cross
,
new
Point
(
30
,
matSize
/
2
),
new
Point
(
matSize
-
31
,
matSize
/
2
),
new
Scalar
(
100
),
3
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
30
),
new
Point
(
matSize
/
2
,
matSize
-
31
),
new
Scalar
(
100
),
3
);
return
cross
;
}
...
...
@@ -73,8 +73,8 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getTrainImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
return
cross
;
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/BruteForceSL2DescriptorMatcherTest.java
View file @
00b21248
...
...
@@ -58,8 +58,8 @@ public class BruteForceSL2DescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getQueryImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
30
,
matSize
/
2
),
new
Point
(
matSize
-
31
,
matSize
/
2
),
new
Scalar
(
100
),
3
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
30
),
new
Point
(
matSize
/
2
,
matSize
-
31
),
new
Scalar
(
100
),
3
);
Imgproc
.
line
(
cross
,
new
Point
(
30
,
matSize
/
2
),
new
Point
(
matSize
-
31
,
matSize
/
2
),
new
Scalar
(
100
),
3
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
30
),
new
Point
(
matSize
/
2
,
matSize
-
31
),
new
Scalar
(
100
),
3
);
return
cross
;
}
...
...
@@ -78,8 +78,8 @@ public class BruteForceSL2DescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getTrainImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
return
cross
;
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/FASTFeatureDetectorTest.java
View file @
00b21248
...
...
@@ -27,7 +27,7 @@ public class FASTFeatureDetectorTest extends OpenCVTestCase {
private
Mat
getTestImg
()
{
Mat
img
=
new
Mat
(
100
,
100
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
img
,
new
Point
(
30
,
30
),
new
Point
(
70
,
70
),
new
Scalar
(
0
),
8
);
Imgproc
.
line
(
img
,
new
Point
(
30
,
30
),
new
Point
(
70
,
70
),
new
Scalar
(
0
),
8
);
return
img
;
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/FlannBasedDescriptorMatcherTest.java
View file @
00b21248
...
...
@@ -127,8 +127,8 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getQueryImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
30
,
matSize
/
2
),
new
Point
(
matSize
-
31
,
matSize
/
2
),
new
Scalar
(
100
),
3
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
30
),
new
Point
(
matSize
/
2
,
matSize
-
31
),
new
Scalar
(
100
),
3
);
Imgproc
.
line
(
cross
,
new
Point
(
30
,
matSize
/
2
),
new
Point
(
matSize
-
31
,
matSize
/
2
),
new
Scalar
(
100
),
3
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
30
),
new
Point
(
matSize
/
2
,
matSize
-
31
),
new
Scalar
(
100
),
3
);
return
cross
;
}
...
...
@@ -147,8 +147,8 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
private
Mat
getTrainImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
return
cross
;
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/ORBDescriptorExtractorTest.java
View file @
00b21248
...
...
@@ -23,8 +23,8 @@ public class ORBDescriptorExtractorTest extends OpenCVTestCase {
private
Mat
getTestImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
return
cross
;
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/SIFTDescriptorExtractorTest.java
View file @
00b21248
...
...
@@ -20,8 +20,8 @@ public class SIFTDescriptorExtractorTest extends OpenCVTestCase {
private
Mat
getTestImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
return
cross
;
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/SURFDescriptorExtractorTest.java
View file @
00b21248
...
...
@@ -18,8 +18,8 @@ public class SURFDescriptorExtractorTest extends OpenCVTestCase {
private
Mat
getTestImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
return
cross
;
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/SURFFeatureDetectorTest.java
View file @
00b21248
...
...
@@ -32,8 +32,8 @@ public class SURFFeatureDetectorTest extends OpenCVTestCase {
private
Mat
getTestImg
()
{
Mat
cross
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
,
new
Scalar
(
255
));
Core
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Core
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
20
,
matSize
/
2
),
new
Point
(
matSize
-
21
,
matSize
/
2
),
new
Scalar
(
100
),
2
);
Imgproc
.
line
(
cross
,
new
Point
(
matSize
/
2
,
20
),
new
Point
(
matSize
/
2
,
matSize
-
21
),
new
Scalar
(
100
),
2
);
return
cross
;
}
...
...
modules/java/android_test/src/org/opencv/test/imgproc/ImgprocTest.java
View file @
00b21248
This diff is collapsed.
Click to expand it.
modules/java/android_test/src/org/opencv/test/video/BackgroundSubtractorMOGTest.java
View file @
00b21248
...
...
@@ -14,12 +14,12 @@ public class BackgroundSubtractorMOGTest extends OpenCVTestCase {
Scalar color = new Scalar(128);
Mat mask = new Mat(rgbLena.size(), CvType.CV_16UC3, new Scalar(1));
Core
.rectangle(rgbLena, bottomRight, topLeft, color, Core.FILLED);
Imgproc
.rectangle(rgbLena, bottomRight, topLeft, color, Core.FILLED);
backGroundSubtract.apply(rgbLena, mask);
Mat truth = new Mat(rgbLena.size(), rgbLena.type(), new Scalar(0));
Core
.rectangle(truth, bottomRight, topLeft, color, Core.FILLED);
Imgproc
.rectangle(truth, bottomRight, topLeft, color, Core.FILLED);
assertMatEqual(truth, rgbLena);
*/
}
...
...
modules/java/generator/gen_java.py
View file @
00b21248
...
...
@@ -415,10 +415,22 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
"""
,
},
# minMaxLoc
## "checkRange" : #TBD
## {'j_code' : '/* TBD: checkRange() */', 'jn_code' : '', 'cpp_code' : '' },
"checkHardwareSupport"
:
{
'j_code'
:
''
,
'jn_code'
:
''
,
'cpp_code'
:
''
},
"setUseOptimized"
:
{
'j_code'
:
''
,
'jn_code'
:
''
,
'cpp_code'
:
''
},
"useOptimized"
:
{
'j_code'
:
''
,
'jn_code'
:
''
,
'cpp_code'
:
''
},
},
# Core
'Imgproc'
:
{
'getTextSize'
:
{
'j_code'
:
"""
"""
// C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);
//javadoc:getTextSize(text, fontFace, fontScale, thickness, baseLine)
public static Size getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine) {
...
...
@@ -427,17 +439,17 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
Size retVal = new Size(n_getTextSize(text, fontFace, fontScale, thickness, baseLine));
return retVal;
}
"""
,
"""
,
'jn_code'
:
""" private static native double[] n_getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine);
\n
"""
,
""" private static native double[] n_getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine);
\n
"""
,
'cpp_code'
:
"""
// C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize (JNIEnv*, jclass, jstring, jint, jdouble, jint, jintArray);
"""
// C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize (JNIEnv*, jclass, jstring, jint, jdouble, jint, jintArray);
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize
(JNIEnv* env, jclass, jstring text, jint fontFace, jdouble fontScale, jint thickness, jintArray baseLine)
{
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize
(JNIEnv* env, jclass, jstring text, jint fontFace, jdouble fontScale, jint thickness, jintArray baseLine)
{
try {
LOGD("Core::n_1getTextSize()");
jdoubleArray result;
...
...
@@ -483,18 +495,11 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize
env->ThrowNew(je, "Unknown exception in JNI code {core::getTextSize()}");
return NULL;
}
}
"""
,
},
# getTextSize
## "checkRange" : #TBD
## {'j_code' : '/* TBD: checkRange() */', 'jn_code' : '', 'cpp_code' : '' },
"checkHardwareSupport"
:
{
'j_code'
:
''
,
'jn_code'
:
''
,
'cpp_code'
:
''
},
"setUseOptimized"
:
{
'j_code'
:
''
,
'jn_code'
:
''
,
'cpp_code'
:
''
},
"useOptimized"
:
{
'j_code'
:
''
,
'jn_code'
:
''
,
'cpp_code'
:
''
},
},
# Core
}
"""
,
},
# getTextSize
},
# Imgproc
'Highgui'
:
{
...
...
samples/android/15-puzzle/src/org/opencv/samples/puzzle15/Puzzle15Processor.java
View file @
00b21248
...
...
@@ -63,7 +63,7 @@ public class Puzzle15Processor {
}
for
(
int
i
=
0
;
i
<
GRID_AREA
;
i
++)
{
Size
s
=
Core
.
getTextSize
(
Integer
.
toString
(
i
+
1
),
3
/* CV_FONT_HERSHEY_COMPLEX */
,
1
,
2
,
null
);
Size
s
=
Imgproc
.
getTextSize
(
Integer
.
toString
(
i
+
1
),
3
/* CV_FONT_HERSHEY_COMPLEX */
,
1
,
2
,
null
);
mTextHeights
[
i
]
=
(
int
)
s
.
height
;
mTextWidths
[
i
]
=
(
int
)
s
.
width
;
}
...
...
@@ -98,7 +98,7 @@ public class Puzzle15Processor {
else
{
cells
[
idx
].
copyTo
(
mCells15
[
i
]);
if
(
mShowTileNumbers
)
{
Core
.
putText
(
mCells15
[
i
],
Integer
.
toString
(
1
+
idx
),
new
Point
((
cols
/
GRID_SIZE
-
mTextWidths
[
idx
])
/
2
,
Imgproc
.
putText
(
mCells15
[
i
],
Integer
.
toString
(
1
+
idx
),
new
Point
((
cols
/
GRID_SIZE
-
mTextWidths
[
idx
])
/
2
,
(
rows
/
GRID_SIZE
+
mTextHeights
[
idx
])
/
2
),
3
/* CV_FONT_HERSHEY_COMPLEX */
,
1
,
new
Scalar
(
255
,
0
,
0
,
255
),
2
);
}
}
...
...
@@ -160,8 +160,8 @@ public class Puzzle15Processor {
private
void
drawGrid
(
int
cols
,
int
rows
,
Mat
drawMat
)
{
for
(
int
i
=
1
;
i
<
GRID_SIZE
;
i
++)
{
Core
.
line
(
drawMat
,
new
Point
(
0
,
i
*
rows
/
GRID_SIZE
),
new
Point
(
cols
,
i
*
rows
/
GRID_SIZE
),
new
Scalar
(
0
,
255
,
0
,
255
),
3
);
Core
.
line
(
drawMat
,
new
Point
(
i
*
cols
/
GRID_SIZE
,
0
),
new
Point
(
i
*
cols
/
GRID_SIZE
,
rows
),
new
Scalar
(
0
,
255
,
0
,
255
),
3
);
Imgproc
.
line
(
drawMat
,
new
Point
(
0
,
i
*
rows
/
GRID_SIZE
),
new
Point
(
cols
,
i
*
rows
/
GRID_SIZE
),
new
Scalar
(
0
,
255
,
0
,
255
),
3
);
Imgproc
.
line
(
drawMat
,
new
Point
(
i
*
cols
/
GRID_SIZE
,
0
),
new
Point
(
i
*
cols
/
GRID_SIZE
,
rows
),
new
Scalar
(
0
,
255
,
0
,
255
),
3
);
}
}
...
...
samples/android/camera-calibration/src/org/opencv/samples/cameracalibration/CameraCalibrator.java
View file @
00b21248
...
...
@@ -139,7 +139,7 @@ public class CameraCalibrator {
private
void
renderFrame
(
Mat
rgbaFrame
)
{
drawPoints
(
rgbaFrame
);
Core
.
putText
(
rgbaFrame
,
"Captured: "
+
mCornersBuffer
.
size
(),
new
Point
(
rgbaFrame
.
cols
()
/
3
*
2
,
rgbaFrame
.
rows
()
*
0.1
),
Imgproc
.
putText
(
rgbaFrame
,
"Captured: "
+
mCornersBuffer
.
size
(),
new
Point
(
rgbaFrame
.
cols
()
/
3
*
2
,
rgbaFrame
.
rows
()
*
0.1
),
Core
.
FONT_HERSHEY_SIMPLEX
,
1.0
,
new
Scalar
(
255
,
255
,
0
));
}
...
...
samples/android/camera-calibration/src/org/opencv/samples/cameracalibration/OnCameraFrameRender.java
View file @
00b21248
...
...
@@ -80,11 +80,11 @@ class ComparisonFrameRender extends FrameRender {
final
int
shift
=
(
int
)(
mWidth
*
0.005
);
border
.
add
(
new
MatOfPoint
(
new
Point
(
mWidth
/
2
-
shift
,
0
),
new
Point
(
mWidth
/
2
+
shift
,
0
),
new
Point
(
mWidth
/
2
+
shift
,
mHeight
),
new
Point
(
mWidth
/
2
-
shift
,
mHeight
)));
Core
.
fillPoly
(
comparisonFrame
,
border
,
new
Scalar
(
255
,
255
,
255
));
Imgproc
.
fillPoly
(
comparisonFrame
,
border
,
new
Scalar
(
255
,
255
,
255
));
Core
.
putText
(
comparisonFrame
,
mResources
.
getString
(
R
.
string
.
original
),
new
Point
(
mWidth
*
0.1
,
mHeight
*
0.1
),
Imgproc
.
putText
(
comparisonFrame
,
mResources
.
getString
(
R
.
string
.
original
),
new
Point
(
mWidth
*
0.1
,
mHeight
*
0.1
),
Core
.
FONT_HERSHEY_SIMPLEX
,
1.0
,
new
Scalar
(
255
,
255
,
0
));
Core
.
putText
(
comparisonFrame
,
mResources
.
getString
(
R
.
string
.
undistorted
),
new
Point
(
mWidth
*
0.6
,
mHeight
*
0.1
),
Imgproc
.
putText
(
comparisonFrame
,
mResources
.
getString
(
R
.
string
.
undistorted
),
new
Point
(
mWidth
*
0.6
,
mHeight
*
0.1
),
Core
.
FONT_HERSHEY_SIMPLEX
,
1.0
,
new
Scalar
(
255
,
255
,
0
));
return
comparisonFrame
;
...
...
samples/android/face-detection/src/org/opencv/samples/facedetect/FdActivity.java
View file @
00b21248
...
...
@@ -193,7 +193,7 @@ public class FdActivity extends Activity implements CvCameraViewListener2 {
Rect
[]
facesArray
=
faces
.
toArray
();
for
(
int
i
=
0
;
i
<
facesArray
.
length
;
i
++)
Core
.
rectangle
(
mRgba
,
facesArray
[
i
].
tl
(),
facesArray
[
i
].
br
(),
FACE_RECT_COLOR
,
3
);
Imgproc
.
rectangle
(
mRgba
,
facesArray
[
i
].
tl
(),
facesArray
[
i
].
br
(),
FACE_RECT_COLOR
,
3
);
return
mRgba
;
}
...
...
samples/android/hello-android/main.cpp
View file @
00b21248
#include <opencv2/core/core.hpp>
#include <opencv2/imgcodecs/imgcodecs.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
using
namespace
cv
;
const
char
*
message
=
"Hello Android!"
;
...
...
samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsActivity.java
View file @
00b21248
...
...
@@ -231,7 +231,7 @@ public class ImageManipulationsActivity extends Activity implements CvCameraView
mP1
.
x
=
mP2
.
x
=
offset
+
(
c
*
(
mHistSizeNum
+
10
)
+
h
)
*
thikness
;
mP1
.
y
=
sizeRgba
.
height
-
1
;
mP2
.
y
=
mP1
.
y
-
2
-
(
int
)
mBuff
[
h
];
Core
.
line
(
rgba
,
mP1
,
mP2
,
mColorsRGB
[
c
],
thikness
);
Imgproc
.
line
(
rgba
,
mP1
,
mP2
,
mColorsRGB
[
c
],
thikness
);
}
}
// Value and Hue
...
...
@@ -244,7 +244,7 @@ public class ImageManipulationsActivity extends Activity implements CvCameraView
mP1
.
x
=
mP2
.
x
=
offset
+
(
3
*
(
mHistSizeNum
+
10
)
+
h
)
*
thikness
;
mP1
.
y
=
sizeRgba
.
height
-
1
;
mP2
.
y
=
mP1
.
y
-
2
-
(
int
)
mBuff
[
h
];
Core
.
line
(
rgba
,
mP1
,
mP2
,
mWhilte
,
thikness
);
Imgproc
.
line
(
rgba
,
mP1
,
mP2
,
mWhilte
,
thikness
);
}
// Hue
Imgproc
.
calcHist
(
Arrays
.
asList
(
mIntermediateMat
),
mChannels
[
0
],
mMat0
,
hist
,
mHistSize
,
mRanges
);
...
...
@@ -254,7 +254,7 @@ public class ImageManipulationsActivity extends Activity implements CvCameraView
mP1
.
x
=
mP2
.
x
=
offset
+
(
4
*
(
mHistSizeNum
+
10
)
+
h
)
*
thikness
;
mP1
.
y
=
sizeRgba
.
height
-
1
;
mP2
.
y
=
mP1
.
y
-
2
-
(
int
)
mBuff
[
h
];
Core
.
line
(
rgba
,
mP1
,
mP2
,
mColorsHue
[
h
],
thikness
);
Imgproc
.
line
(
rgba
,
mP1
,
mP2
,
mColorsHue
[
h
],
thikness
);
}
break
;
...
...
@@ -287,7 +287,7 @@ public class ImageManipulationsActivity extends Activity implements CvCameraView
Mat
mZoomWindow
=
rgba
.
submat
(
rows
/
2
-
9
*
rows
/
100
,
rows
/
2
+
9
*
rows
/
100
,
cols
/
2
-
9
*
cols
/
100
,
cols
/
2
+
9
*
cols
/
100
);
Imgproc
.
resize
(
mZoomWindow
,
zoomCorner
,
zoomCorner
.
size
());
Size
wsize
=
mZoomWindow
.
size
();
Core
.
rectangle
(
mZoomWindow
,
new
Point
(
1
,
1
),
new
Point
(
wsize
.
width
-
2
,
wsize
.
height
-
2
),
new
Scalar
(
255
,
0
,
0
,
255
),
2
);
Imgproc
.
rectangle
(
mZoomWindow
,
new
Point
(
1
,
1
),
new
Point
(
wsize
.
width
-
2
,
wsize
.
height
-
2
),
new
Scalar
(
255
,
0
,
0
,
255
),
2
);
zoomCorner
.
release
();
mZoomWindow
.
release
();
break
;
...
...
samples/cpp/em.cpp
View file @
00b21248
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/ml.hpp"
using
namespace
cv
;
...
...
samples/java/sbt/src/main/java/DetectFaceDemo.java
View file @
00b21248
...
...
@@ -32,7 +32,7 @@ public class DetectFaceDemo {
// Draw a bounding box around each face.
for
(
Rect
rect
:
faceDetections
.
toArray
())
{
Core
.
rectangle
(
image
,
new
Point
(
rect
.
x
,
rect
.
y
),
new
Point
(
rect
.
x
Imgproc
.
rectangle
(
image
,
new
Point
(
rect
.
x
,
rect
.
y
),
new
Point
(
rect
.
x
+
rect
.
width
,
rect
.
y
+
rect
.
height
),
new
Scalar
(
0
,
255
,
0
));
}
...
...
samples/java/sbt/src/main/scala/ScalaDetectFaceDemo.scala
View file @
00b21248
...
...
@@ -27,7 +27,7 @@ object ScalaDetectFaceDemo {
// Draw a bounding box around each face.
for
(
rect
<-
faceDetections
.
toArray
)
{
Core
.
rectangle
(
Imgproc
.
rectangle
(
image
,
new
Point
(
rect
.
x
,
rect
.
y
),
new
Point
(
rect
.
x
+
rect
.
width
,
...
...
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