Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Cresson Remi
otbtf
Commits
e5ddc958
Commit
e5ddc958
authored
Oct 29, 2019
by
Cresson Remi
Browse files
ENH: fix bug with nodata
parent
7e11cd2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/otbTensorflowSampler.hxx
View file @
e5ddc958
...
...
@@ -206,7 +206,7 @@ TensorflowSampler<TInputImage, TVectorData>
break
;
}
}
if
(
!
hasBeenSampled
)
if
(
hasBeenSampled
)
{
break
;
}
...
...
@@ -216,19 +216,19 @@ TensorflowSampler<TInputImage, TVectorData>
}
// Next input
if
(
hasBeenSampled
)
{
//
// TODO: delete this
//
IndexType outIndex;
//
outIndex[0] = 0;
//
outIndex[1] = count * m_PatchSizes[0][1];
//
RegionType region(outIndex, m_PatchSizes[0]);
//
IteratorType it(m_OutputPatchImages[0], region);
//
for (it.GoToBegin(); !it.IsAtEnd(); ++it)
//
{
//
PixelType pix = it.Get();
//
for (unsigned int band; band < pix.Size(); band++)
//
if (pix[band] == m_NodataValue)
//
std::cout << band << std::endl;
//
}
// TODO: delete this
IndexType
outIndex
;
outIndex
[
0
]
=
0
;
outIndex
[
1
]
=
count
*
m_PatchSizes
[
0
][
1
];
RegionType
region
(
outIndex
,
m_PatchSizes
[
0
]);
IteratorType
it
(
m_OutputPatchImages
[
0
],
region
);
for
(
it
.
GoToBegin
();
!
it
.
IsAtEnd
();
++
it
)
{
PixelType
pix
=
it
.
Get
();
for
(
unsigned
int
band
;
band
<
pix
.
Size
();
band
++
)
if
(
pix
[
band
]
==
m_NodataValue
)
std
::
cout
<<
band
<<
std
::
endl
;
}
// Fill label
labelIndex
[
1
]
=
count
;
...
...
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