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
018d85dd
Commit
018d85dd
authored
Jun 08, 2012
by
Alexander Kapustin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New Tegra Optimized thresh_16s and thresh_32f functions were added
parent
2f409055
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
8 deletions
+92
-8
thresh.cpp
modules/imgproc/src/thresh.cpp
+92
-8
No files found.
modules/imgproc/src/thresh.cpp
View file @
018d85dd
...
@@ -63,19 +63,34 @@ thresh_8u( const Mat& _src, Mat& _dst, uchar thresh, uchar maxval, int type )
...
@@ -63,19 +63,34 @@ thresh_8u( const Mat& _src, Mat& _dst, uchar thresh, uchar maxval, int type )
switch
(
type
)
switch
(
type
)
{
{
case
THRESH_BINARY
:
case
THRESH_BINARY
:
if
(
tegra
::
thresh_8u_binary
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
,
maxval
))
return
;
if
(
tegra
::
thresh_8u_binary
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
,
maxval
))
break
;
{
return
;
}
break
;
case
THRESH_BINARY_INV
:
case
THRESH_BINARY_INV
:
if
(
tegra
::
thresh_8u_binary_inv
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
,
maxval
))
return
;
if
(
tegra
::
thresh_8u_binary_inv
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
,
maxval
))
{
return
;
}
break
;
break
;
case
THRESH_TRUNC
:
case
THRESH_TRUNC
:
if
(
tegra
::
thresh_8u_trunc
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
return
;
if
(
tegra
::
thresh_8u_trunc
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
break
;
{
return
;
}
break
;
case
THRESH_TOZERO
:
case
THRESH_TOZERO
:
if
(
tegra
::
thresh_8u_tozero
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
return
;
if
(
tegra
::
thresh_8u_tozero
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
{
return
;
}
break
;
break
;
case
THRESH_TOZERO_INV
:
case
THRESH_TOZERO_INV
:
if
(
tegra
::
thresh_8u_tozero_inv
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
return
;
if
(
tegra
::
thresh_8u_tozero_inv
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
{
return
;
}
break
;
break
;
}
}
#endif
#endif
...
@@ -292,7 +307,41 @@ thresh_16s( const Mat& _src, Mat& _dst, short thresh, short maxval, int type )
...
@@ -292,7 +307,41 @@ thresh_16s( const Mat& _src, Mat& _dst, short thresh, short maxval, int type )
roi
.
width
*=
roi
.
height
;
roi
.
width
*=
roi
.
height
;
roi
.
height
=
1
;
roi
.
height
=
1
;
}
}
#ifdef HAVE_TEGRA_OPTIMIZATION
switch
(
type
)
{
case
THRESH_BINARY
:
if
(
tegra
::
thresh_16s_binary
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
,
maxval
))
{
return
;
}
break
;
case
THRESH_BINARY_INV
:
if
(
tegra
::
thresh_16s_binary_inv
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
,
maxval
))
{
return
;
}
break
;
case
THRESH_TRUNC
:
if
(
tegra
::
thresh_16s_trunc
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
{
return
;
}
break
;
case
THRESH_TOZERO
:
if
(
tegra
::
thresh_16s_tozero
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
{
return
;
}
break
;
case
THRESH_TOZERO_INV
:
if
(
tegra
::
thresh_16s_tozero_inv
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
{
return
;
}
break
;
}
#endif
switch
(
type
)
switch
(
type
)
{
{
case
THRESH_BINARY
:
case
THRESH_BINARY
:
...
@@ -460,6 +509,41 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
...
@@ -460,6 +509,41 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
roi
.
height
=
1
;
roi
.
height
=
1
;
}
}
#ifdef HAVE_TEGRA_OPTIMIZATION
switch
(
type
)
{
case
THRESH_BINARY
:
if
(
tegra
::
thresh_32f_binary
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
,
maxval
))
{
return
;
}
break
;
case
THRESH_BINARY_INV
:
if
(
tegra
::
thresh_32f_binary_inv
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
,
maxval
))
{
return
;
}
break
;
case
THRESH_TRUNC
:
if
(
tegra
::
thresh_32f_trunc
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
{
return
;
}
break
;
case
THRESH_TOZERO
:
if
(
tegra
::
thresh_32f_tozero
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
{
return
;
}
break
;
case
THRESH_TOZERO_INV
:
if
(
tegra
::
thresh_32f_tozero_inv
(
_src
,
_dst
,
roi
.
width
,
roi
.
height
,
thresh
))
{
return
;
}
break
;
}
#endif
switch
(
type
)
switch
(
type
)
{
{
case
THRESH_BINARY
:
case
THRESH_BINARY
:
...
...
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