Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
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
Container 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
David Youssefi
otb
Commits
6fa4f9b2
Commit
6fa4f9b2
authored
16 years ago
by
Cyrille Valladeau
Browse files
Options
Downloads
Patches
Plain Diff
STYLE : add comments in TextureFunctorBase
parent
5d3124ee
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
Code/FeatureExtraction/otbTextureFunctorBase.h
+7
-3
7 additions, 3 deletions
Code/FeatureExtraction/otbTextureFunctorBase.h
Examples/FeatureExtraction/CloudDetectionExample.cxx
+1
-1
1 addition, 1 deletion
Examples/FeatureExtraction/CloudDetectionExample.cxx
with
8 additions
and
4 deletions
Code/FeatureExtraction/otbTextureFunctorBase.h
+
7
−
3
View file @
6fa4f9b2
...
...
@@ -29,9 +29,10 @@ namespace otb
namespace
Functor
{
/** \class TextureFunctorBase
* \brief This functor i
u
s the base for all texture functors.
* \brief This functor is the base for all texture functors.
*
* It uses a neighborhood and an offset (m_Offset) to compute texture.
* It uses a neighborhood iterator which radius is the one of the considered
* neighborhood plsu an offset (m_Offset) to compute texture.
* It computes the mean, standard deviation of the two areas and the joint histogram using
* Scott formula for the bins lengths computation.
* TIterInput is an iterator, TOutput is a PixelType.
...
...
@@ -171,17 +172,19 @@ public:
outPix
.
Fill
(
0
);
OffsetType
offset
;
offset
.
Fill
(
0
);
// Compute the neighborhood radius from the neigh+offset iterator to extract the neighborhood area from the iterator
RadiusType
radius
;
radius
[
0
]
=
static_cast
<
unsigned
int
>
(
0.5
*
(
static_cast
<
double
>
(
itOff
.
GetSize
()[
0
]
-
1
)
)
-
static_cast
<
double
>
(
vcl_abs
(
m_Offset
[
0
]))
);
radius
[
1
]
=
static_cast
<
unsigned
int
>
(
0.5
*
(
static_cast
<
double
>
(
itOff
.
GetSize
()[
1
]
-
1
)
)
-
static_cast
<
double
>
(
vcl_abs
(
m_Offset
[
1
]))
);
// For each channel
for
(
unsigned
int
i
=
0
;
i
<
itOff
.
GetCenterPixel
().
GetSize
();
i
++
)
{
NeighborhoodType
inNeigh
;
inNeigh
.
SetRadius
(
radius
);
NeighborhoodType
offNeigh
;
offNeigh
.
SetRadius
(
radiusOff
);
// Extract the neighborhood area
for
(
int
l
=
-
static_cast
<
int
>
(
radius
[
0
]);
l
<=
static_cast
<
int
>
(
radius
[
0
]);
l
++
)
{
offset
[
0
]
=
l
;
...
...
@@ -191,6 +194,7 @@ public:
inNeigh
[
offset
]
=
itOff
.
GetPixel
(
offset
)[
i
];
}
}
// Extract the offset area
offset
.
Fill
(
0
);
for
(
int
l
=
-
static_cast
<
int
>
(
radiusOff
[
0
]);
l
<=
static_cast
<
int
>
(
radiusOff
[
0
]);
l
++
)
{
...
...
This diff is collapsed.
Click to expand it.
Examples/FeatureExtraction/CloudDetectionExample.cxx
+
1
−
1
View file @
6fa4f9b2
...
...
@@ -111,7 +111,7 @@ int main( int argc, char * argv[] )
// Software Guide : BeginCodeSnippet
typedef
otb
::
Functor
::
CloudDetectionFunctor
<
VectorPixelType
,
InputPixelType
>
FunctorType
;
typedef
otb
::
Functor
::
CloudDetectionFunctor
<
VectorPixelType
,
OutputPixelType
/*
InputPixelType
*/
>
FunctorType
;
// Software Guide : EndCodeSnippet
...
...
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