Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hydra-image-processor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
hydra-image-processor
Commits
c45b77e6
Commit
c45b77e6
authored
10 years ago
by
Eric Wait
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a type bug
parent
29faa354
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/CWrappers.cuh
+9
-1
9 additions, 1 deletion
include/CWrappers.cuh
src/c/Mex/MexThresholdFilter.cpp
+15
-1
15 additions, 1 deletion
src/c/Mex/MexThresholdFilter.cpp
with
24 additions
and
2 deletions
include/CWrappers.cuh
+
9
−
1
View file @
c45b77e6
...
...
@@ -190,9 +190,17 @@ IMAGE_PROCESSOR_API size_t sumArray(const int* imageIn, size_t n, int device=0);
IMAGE_PROCESSOR_API
double
sumArray
(
const
float
*
imageIn
,
size_t
n
,
int
device
=
0
);
IMAGE_PROCESSOR_API
double
sumArray
(
const
double
*
imageIn
,
size_t
n
,
int
device
=
0
);
IMAGE_PROCESSOR_API
unsigned
char
*
segment
(
const
unsigned
char
*
imageIn
,
Vec
<
size_t
>
dims
,
double
alpha
,
Vec
<
size_t
>
kernelDims
,
float
*
kernel
=
NULL
,
unsigned
char
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
unsigned
short
*
segment
(
const
unsigned
short
*
imageIn
,
Vec
<
size_t
>
dims
,
double
alpha
,
Vec
<
size_t
>
kernelDims
,
float
*
kernel
=
NULL
,
unsigned
short
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
short
*
segment
(
const
short
*
imageIn
,
Vec
<
size_t
>
dims
,
double
alpha
,
Vec
<
size_t
>
kernelDims
,
float
*
kernel
=
NULL
,
short
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
unsigned
int
*
segment
(
const
unsigned
int
*
imageIn
,
Vec
<
size_t
>
dims
,
double
alpha
,
Vec
<
size_t
>
kernelDims
,
float
*
kernel
=
NULL
,
unsigned
int
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
int
*
segment
(
const
int
*
imageIn
,
Vec
<
size_t
>
dims
,
double
alpha
,
Vec
<
size_t
>
kernelDims
,
float
*
kernel
=
NULL
,
int
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
float
*
segment
(
const
float
*
imageIn
,
Vec
<
size_t
>
dims
,
double
alpha
,
Vec
<
size_t
>
kernelDims
,
float
*
kernel
=
NULL
,
float
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
double
*
segment
(
const
double
*
imageIn
,
Vec
<
size_t
>
dims
,
double
alpha
,
Vec
<
size_t
>
kernelDims
,
float
*
kernel
=
NULL
,
double
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
unsigned
char
*
thresholdFilter
(
const
unsigned
char
*
imageIn
,
Vec
<
size_t
>
dims
,
unsigned
char
thresh
,
unsigned
char
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
unsigned
short
*
thresholdFilter
(
const
unsigned
short
*
imageIn
,
Vec
<
size_t
>
dims
,
unsigned
short
thresh
,
unsigned
short
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
short
*
thresholdFilter
(
const
short
*
imageIn
,
Vec
<
size_t
>
dims
,
in
t
thresh
,
short
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
short
*
thresholdFilter
(
const
short
*
imageIn
,
Vec
<
size_t
>
dims
,
shor
t
thresh
,
short
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
unsigned
int
*
thresholdFilter
(
const
unsigned
int
*
imageIn
,
Vec
<
size_t
>
dims
,
unsigned
int
thresh
,
unsigned
int
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
int
*
thresholdFilter
(
const
int
*
imageIn
,
Vec
<
size_t
>
dims
,
int
thresh
,
int
**
imageOut
=
NULL
,
int
device
=
0
);
IMAGE_PROCESSOR_API
float
*
thresholdFilter
(
const
float
*
imageIn
,
Vec
<
size_t
>
dims
,
float
thresh
,
float
**
imageOut
=
NULL
,
int
device
=
0
);
...
...
This diff is collapsed.
Click to expand it.
src/c/Mex/MexThresholdFilter.cpp
+
15
−
1
View file @
c45b77e6
...
...
@@ -20,13 +20,27 @@ void MexThresholdFilter::execute( int nlhs, mxArray* plhs[], int nrhs, const mxA
thresholdFilter
(
imageIn
,
imageDims
,(
unsigned
char
)
thresh
,
&
imageOut
,
device
);
}
else
if
(
mxIsUint16
(
prhs
[
0
]))
{
unsigned
short
*
imageIn
,
*
imageOut
;
setupImagePointers
(
prhs
[
0
],
&
imageIn
,
&
imageDims
,
&
plhs
[
0
],
&
imageOut
);
thresholdFilter
(
imageIn
,
imageDims
,(
unsigned
short
)
thresh
,
&
imageOut
,
device
);
}
else
if
(
mxIsInt16
(
prhs
[
0
]))
{
short
*
imageIn
,
*
imageOut
;
setupImagePointers
(
prhs
[
0
],
&
imageIn
,
&
imageDims
,
&
plhs
[
0
],
&
imageOut
);
thresholdFilter
(
imageIn
,
imageDims
,(
short
)
thresh
,
&
imageOut
,
device
);
}
else
if
(
mxIsUint32
(
prhs
[
0
]))
{
unsigned
int
*
imageIn
,
*
imageOut
;
setupImagePointers
(
prhs
[
0
],
&
imageIn
,
&
imageDims
,
&
plhs
[
0
],
&
imageOut
);
thresholdFilter
(
imageIn
,
imageDims
,(
unsigned
int
)
thresh
,
&
imageOut
,
device
);
}
else
if
(
mxIsInt
16
(
prhs
[
0
]))
else
if
(
mxIsInt
32
(
prhs
[
0
]))
{
int
*
imageIn
,
*
imageOut
;
setupImagePointers
(
prhs
[
0
],
&
imageIn
,
&
imageDims
,
&
plhs
[
0
],
&
imageOut
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment