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
2291faed
Commit
2291faed
authored
Apr 06, 2012
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java API: changing CvVectorXxx to MatOfXxx
parent
6c0ab28d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
FdView.java
...roid/face-detection/src/org/opencv/samples/fd/FdView.java
+3
-3
Sample2View.java
...vcamera/src/org/opencv/samples/tutorial2/Sample2View.java
+2
-2
No files found.
samples/android/face-detection/src/org/opencv/samples/fd/FdView.java
View file @
2291faed
...
...
@@ -7,8 +7,8 @@ import java.io.InputStream;
import
org.opencv.android.Utils
;
import
org.opencv.core.Core
;
import
org.opencv.core.CvVectorRect
;
import
org.opencv.core.Mat
;
import
org.opencv.core.MatOfRect
;
import
org.opencv.core.Rect
;
import
org.opencv.core.Scalar
;
import
org.opencv.core.Size
;
...
...
@@ -80,11 +80,11 @@ class FdView extends SampleCvViewBase {
if
(
mCascade
!=
null
)
{
int
height
=
mGray
.
rows
();
int
faceSize
=
Math
.
round
(
height
*
FdActivity
.
minFaceSize
);
CvVectorRect
faces
=
new
CvVector
Rect
();
MatOfRect
faces
=
new
MatOf
Rect
();
mCascade
.
detectMultiScale
(
mGray
,
faces
,
1.1
,
2
,
2
// TODO: objdetect.CV_HAAR_SCALE_IMAGE
,
new
Size
(
faceSize
,
faceSize
),
new
Size
());
for
(
Rect
r
:
faces
.
toArray
(
null
))
for
(
Rect
r
:
faces
.
toArray
())
Core
.
rectangle
(
mRgba
,
r
.
tl
(),
r
.
br
(),
new
Scalar
(
0
,
255
,
0
,
255
),
3
);
}
...
...
samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2View.java
View file @
2291faed
...
...
@@ -5,8 +5,8 @@ import java.util.List;
import
org.opencv.android.Utils
;
import
org.opencv.core.Core
;
import
org.opencv.core.CvVectorPoint
;
import
org.opencv.core.Mat
;
import
org.opencv.core.MatOfPoint
;
import
org.opencv.core.Point
;
import
org.opencv.core.Scalar
;
import
org.opencv.highgui.Highgui
;
...
...
@@ -71,7 +71,7 @@ class Sample2View extends SampleCvViewBase {
Core
.
inRange
(
mIntermediateMat
,
lo
,
hi
,
mIntermediateMat2
);
// green
Imgproc
.
dilate
(
mIntermediateMat2
,
mIntermediateMat2
,
mEmpty
);
//
List
<
CvVectorPoint
>
contours
=
new
ArrayList
<
CvVector
Point
>();
List
<
MatOfPoint
>
contours
=
new
ArrayList
<
MatOf
Point
>();
Mat
hierarchy
=
new
Mat
();
Imgproc
.
findContours
(
mIntermediateMat2
,
contours
,
hierarchy
,
Imgproc
.
RETR_LIST
,
Imgproc
.
CHAIN_APPROX_SIMPLE
);
Log
.
d
(
"processFrame"
,
"contours.size()"
+
contours
.
size
());
...
...
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