Hi Robin,
The application Convert doesn't not allow to do band re-composition. You
have to use the application ExtractROI for that. If you don't specify
the ROI region, the whole image is used :
otbcli_ExtractROI -in your_multispectral_image.tif
-out output_3bands_image.tif
-cl Channel5 Channel3 Channel2
The channel numbers have to be prefixed with "Channel". First channel is
Channel1.
If your input image has pixel encoded on 16bit unsigned integers, you
can also add "uint16" after the output file name, so that the image
produced uses this pixel type. The default pixel type is float (takes
more space).
Regards,
Guillaume
Le 04/09/2014 20:53, Robin Holler a écrit :
One more thx Guillaume! =)
I understand that my image is edited in tiles and I have to calculate
and use absolute min/max values to be sure, each tile is processed the
same way. Thx for that! I'll try soon, but I first have to make other
things running and to do that faster, I'd like to know, if otbConvert
is able to extract three selected bands only while converting format?
I'd like to give three integers (e.g. 5,3,2) as arguments and having
converted a multispectral image TIFF to a 3-channel RGB PNG, for
instance. Is that possible?
Thx again,
Robin
Am Mittwoch, 3. September 2014 14:21:13 UTC+2 schrieb Guillaume Pasero:
Hi Robin,
There is a cleaner way to do it.
In your example, the input minimum and maximum are not given to
the VectorRescaler, so it has to estimate them on each buffered
region (i.e. each stream block). This is why you get a different
rescaling for each block (some block may also have black borders,
which gives a "wrong" minimum value of 0).
What you can do is :
- estimate the min / max values in your input image using an
otb::StreamingStatisticsVectorImageFilter.
- set the input min/max values in the rescale filter.
- disable the automatic computation of input min/max
You can have a look to the application Convert
(Applications/Utils/otbConvert.cxx), which does nearly the same thing.
Regards,
Guillaume
Le 03/09/2014 13:33, Robin Holler a écrit :
I'm as glad as proud having resolved this by myself. Don't know
if it's the finest solution, but for now it works. The problem
was writing output through streaming TIFF in tiles ... some
researching brought
http://wiki.orfeo-toolbox.org/index.php/Writing_large_images
<http://wiki.orfeo-toolbox.org/index.php/Writing_large_images>
and
http://www.orfeo-toolbox.org/doxygen-current/otbImageFileWriter_8h_source.html
<http://www.orfeo-toolbox.org/doxygen-current/otbImageFileWriter_8h_source.html>
... So I did some experiments and since export GDAL_CACHEMAX=256
didn't have any effect I finally ended with changing to stripped
Streaming but without dividing in lines or tiles:
|
Writer->SetAutomaticStrippedStreaming();
Writer->SetNumberOfLinesStrippedStreaming(0);
|
Works for now, but maybe somebody once will come up with a better
(more experienced) solution.
Regards,
Robin
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
<http://www.orfeo-toolbox.org/FAQ.html>
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
<javascript:>
To unsubscribe from this group, send email to
[email protected] <javascript:>
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
<http://groups.google.com/group/otb-users?hl=en>
---
You received this message because you are subscribed to the
Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected] <javascript:>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
<http://www.c-s.fr> *Guillaume PASERO*
Ingénieur d'études et développement
*Business Unit E-SPACE & Geo Information*
<https://thor.si.c-s.fr/blogs/cs-blogs-business/>*- Département
APPLICATIONS*
*CS Systèmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
+33 561 17 64 21 - [email protected] <javascript:>
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
<www.c-s.fr> *Guillaume PASERO*
Ingénieur d'études et développement
*Business Unit E-SPACE & Geo Information*
<https://thor.si.c-s.fr/blogs/cs-blogs-business/>*- Département
APPLICATIONS*
*CS Systèmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
+33 561 17 64 21 - [email protected]
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.