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
0a2c7803
Commit
0a2c7803
authored
Aug 08, 2011
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed mixChannels argument types
parent
dfaa8af6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
16 deletions
+19
-16
core.hpp
modules/core/include/opencv2/core/core.hpp
+1
-1
convert.cpp
modules/core/src/convert.cpp
+1
-1
CoreTest.java
.../java/android_test/src/org/opencv/test/core/CoreTest.java
+16
-13
ImgprocTest.java
...android_test/src/org/opencv/test/imgproc/ImgprocTest.java
+1
-1
No files found.
modules/core/include/opencv2/core/core.hpp
View file @
0a2c7803
...
...
@@ -2049,7 +2049,7 @@ CV_EXPORTS void mixChannels(const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts
const
int
*
fromTo
,
size_t
npairs
);
CV_EXPORTS
void
mixChannels
(
const
vector
<
Mat
>&
src
,
vector
<
Mat
>&
dst
,
const
int
*
fromTo
,
size_t
npairs
);
CV_EXPORTS_W
void
mixChannels
(
InputArrayOfArrays
src
,
Input
Output
ArrayOfArrays
dst
,
CV_EXPORTS_W
void
mixChannels
(
InputArrayOfArrays
src
,
InputArrayOfArrays
dst
,
const
vector
<
int
>&
fromTo
);
//! extracts a single channel from src (coi is 0-based index)
...
...
modules/core/src/convert.cpp
View file @
0a2c7803
...
...
@@ -503,7 +503,7 @@ void cv::mixChannels(const vector<Mat>& src, vector<Mat>& dst,
!
dst
.
empty
()
?
&
dst
[
0
]
:
0
,
dst
.
size
(),
fromTo
,
npairs
);
}
void
cv
::
mixChannels
(
InputArrayOfArrays
src
,
Input
Output
ArrayOfArrays
dst
,
void
cv
::
mixChannels
(
InputArrayOfArrays
src
,
InputArrayOfArrays
dst
,
const
vector
<
int
>&
fromTo
)
{
if
(
fromTo
.
empty
())
...
...
modules/java/android_test/src/org/opencv/test/core/CoreTest.java
View file @
0a2c7803
...
...
@@ -36,14 +36,14 @@ public class CoreTest extends OpenCVTestCase {
Core
.
add
(
gray127
,
gray1
,
dst
,
mask
);
assertMatEqual
(
makeMask
(
gray128
),
dst
);
assertMatEqual
(
makeMask
(
gray128
,
127
),
dst
);
/
* TODO: !!!! BUG !!!!
* Explaination:
*
1) dst is uninitialized => add allocates it
*
2) left half of mask is zeor => add do not assign it
*
3) so left part of dst remains uninitialized => filled with random
*
values *
/
/
/ FIXME: https://code.ros.org/trac/opencv/ticket/1286
/*
*
dst is uninitialized => add allocates it 2) left half of mask is zeor
*
=> add do not assign it 3) so left part of dst remains uninitialized
*
=> filled with random junk values
*/
}
public
void
testAddMatMatMatMatInt
()
{
...
...
@@ -286,10 +286,12 @@ public class CoreTest extends OpenCVTestCase {
Scalar
color128
=
new
Scalar
(
128
);
Scalar
color0
=
new
Scalar
(
0
);
Core
.
circle
(
gray0
,
center2
,
radius
*
2
,
color128
,
2
,
Core
.
LINE_4
,
1
/* Number
Core
.
circle
(
gray0
,
center2
,
radius
*
2
,
color128
,
2
,
Core
.
LINE_4
,
1
/*
* Number
* of
* fractional
* bits */
);
* bits
*/
);
assertFalse
(
0
==
Core
.
countNonZero
(
gray0
));
Core
.
circle
(
gray0
,
center
,
radius
,
color0
,
2
,
Core
.
LINE_4
,
0
);
...
...
@@ -1632,7 +1634,7 @@ public class CoreTest extends OpenCVTestCase {
};
Core
.
normalize
(
src
,
dst
,
1
,
2
,
Core
.
NORM_MINMAX
,
CvType
.
CV_32F
,
mask
);
//
OpenCVTestRunner.Log(dst);
//
FIXME: https://code.ros.org/trac/opencv/ticket/1286
Mat
expected
=
new
Mat
(
1
,
5
,
CvType
.
CV_32F
)
{
{
put
(
0
,
0
,
1
,
1
,
2
,
3
,
2
);
...
...
@@ -1912,7 +1914,7 @@ public class CoreTest extends OpenCVTestCase {
};
assertMatEqual
(
x
,
xCoordinate
,
EPS
);
assertMatEqual
(
y
,
yCoordinate
,
EPS
);
}
// TODO:FIX
}
public
void
testPolylinesMatListOfListOfPointBooleanScalar
()
{
Mat
img
=
gray0
;
...
...
@@ -2352,12 +2354,13 @@ public class CoreTest extends OpenCVTestCase {
assertMatEqual
(
gray127
,
dst
);
}
public
void
testSubtractMatMatMatMat
()
{
// TODO: fix
public
void
testSubtractMatMatMatMat
()
{
Mat
mask
=
makeMask
(
gray1
.
clone
());
Core
.
subtract
(
gray128
,
gray1
,
dst
,
mask
);
assertMatEqual
(
makeMask
(
gray127
),
dst
);
assertMatEqual
(
makeMask
(
gray127
,
128
),
dst
);
// FIXME: https://code.ros.org/trac/opencv/ticket/1286
}
public
void
testSubtractMatMatMatMatInt
()
{
...
...
modules/java/android_test/src/org/opencv/test/imgproc/ImgprocTest.java
View file @
0a2c7803
...
...
@@ -1655,7 +1655,7 @@ public class ImgprocTest extends OpenCVTestCase {
List
<
Point
>
contour
=
Arrays
.
asList
(
new
Point
(
0
,
0
),
new
Point
(
1
,
3
),
new
Point
(
3
,
4
),
new
Point
(
4
,
3
),
new
Point
(
2
,
1
));
double
sign1
=
Imgproc
.
pointPolygonTest
(
contour
,
new
Point
(
2
,
2
),
false
);
assertEquals
(
1
00.0
,
sign1
);
//FIXME: 1.0 should be expected
assertEquals
(
1
.0
,
sign1
);
double
sign2
=
Imgproc
.
pointPolygonTest
(
contour
,
new
Point
(
4
,
4
),
true
);
assertEquals
(-
Math
.
sqrt
(
0.5
),
sign2
);
...
...
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