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
232c37e8
Commit
232c37e8
authored
Apr 25, 2014
by
Alexander Karsakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ippiComputeThreshold_Otsu to cv::threshold
parent
32b25de5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
thresh.cpp
modules/imgproc/src/thresh.cpp
+14
-1
No files found.
modules/imgproc/src/thresh.cpp
View file @
232c37e8
...
...
@@ -675,16 +675,29 @@ static double
getThreshVal_Otsu_8u
(
const
Mat
&
_src
)
{
Size
size
=
_src
.
size
();
int
step
=
(
int
)
_src
.
step
;
if
(
_src
.
isContinuous
()
)
{
size
.
width
*=
size
.
height
;
size
.
height
=
1
;
step
=
size
.
width
;
}
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 801
IppiSize
srcSize
=
{
size
.
width
,
size
.
height
};
Ipp8u
thresh
;
CV_SUPPRESS_DEPRECATED_START
IppStatus
ok
=
ippiComputeThreshold_Otsu_8u_C1R
(
_src
.
data
,
step
,
srcSize
,
&
thresh
);
CV_SUPPRESS_DEPRECATED_END
if
(
ok
>=
0
)
return
thresh
;
#endif
const
int
N
=
256
;
int
i
,
j
,
h
[
N
]
=
{
0
};
for
(
i
=
0
;
i
<
size
.
height
;
i
++
)
{
const
uchar
*
src
=
_src
.
data
+
_src
.
step
*
i
;
const
uchar
*
src
=
_src
.
data
+
step
*
i
;
j
=
0
;
#if CV_ENABLE_UNROLLED
for
(
;
j
<=
size
.
width
-
4
;
j
+=
4
)
...
...
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