Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ImageINSA_Tanguy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Tanguy.Raufflet
ImageINSA_Tanguy
Commits
d24da62a
Commit
d24da62a
authored
12 years ago
by
Sacha Percot-Tétu
Browse files
Options
Downloads
Patches
Plain Diff
Updated segmentation plugin
parent
a0cc93b8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/Segmentation/segmentation.cpp
+15
-25
15 additions, 25 deletions
plugins/Segmentation/segmentation.cpp
with
15 additions
and
25 deletions
plugins/Segmentation/segmentation.cpp
+
15
−
25
View file @
d24da62a
...
...
@@ -35,9 +35,9 @@
using
namespace
std
;
using
namespace
imagein
;
class
Thresholding
:
public
Operation
{
class
Thresholding
:
public
Plug
Operation
{
public:
Thresholding
(
string
name
)
:
Operation
(
name
)
{
Thresholding
(
)
:
PlugOperation
(
"Thresholding"
)
{
this
->
addParam
(
CurrentImg
(),
&
Thresholding
::
img
);
this
->
addParam
(
IntParam
(
"Entier"
,
0
,
255
,
127
),
&
Thresholding
::
threshold
);
}
...
...
@@ -53,9 +53,9 @@ class Thresholding : public Operation {
Image
img
;
};
class
Otsu
:
public
Operation
{
class
Otsu
:
public
Plug
Operation
{
public:
Otsu
(
string
name
)
:
Operation
(
name
)
{
Otsu
()
:
Plug
Operation
(
"Otsu"
)
{
this
->
addParam
(
CurrentImg
(),
&
Otsu
::
img
);
}
...
...
@@ -69,9 +69,9 @@ class Otsu : public Operation {
Image
img
;
};
class
Dithering
:
public
Operation
{
class
Dithering
:
public
Plug
Operation
{
public:
Dithering
(
string
name
)
:
Operation
(
name
)
{
Dithering
(
)
:
PlugOperation
(
"Dithering"
)
{
this
->
addParam
(
CurrentImg
(),
&
Dithering
::
img
);
}
...
...
@@ -84,24 +84,14 @@ class Dithering : public Operation {
Image
img
;
};
class
Segmentation
:
public
Plugin
{
public:
Segmentation
(
string
name
)
:
Plugin
(
name
)
{
try
{
Thresholding
*
thresholding
=
new
Thresholding
(
"Thresholding"
);
this
->
addOperation
(
thresholding
);
Otsu
*
otsu
=
new
Otsu
(
"Otsu"
);
this
->
addOperation
(
otsu
);
Dithering
*
dithering
=
new
Dithering
(
"Dithering"
);
this
->
addOperation
(
dithering
);
}
catch
(
const
char
*
msg
)
{
std
::
cerr
<<
msg
<<
std
::
endl
;
}
}
};
extern
"C"
Plugin
*
loadPlugin
()
{
Plugin
*
plugin
=
new
Plugin
(
"Binarization"
);
plugin
->
addOperation
(
new
Thresholding
());
plugin
->
addOperation
(
new
Otsu
());
plugin
->
addOperation
(
new
Dithering
());
return
plugin
;
}
extern
"C"
Plugin
*
getPlugin
()
{
Plugin
*
segmentation
=
new
Segmentation
(
"Segmentation"
);
return
segmentation
;
extern
"C"
void
unloadPlugin
(
Plugin
*
plugin
)
{
delete
plugin
;
}
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