Re: [otb-users] introduction of negative DNs in otb

2019-01-14 Thread Antoine Regimbeau

Hi Gabrielle,

Actually OTB does not support half precision floating point... It will 
be read as a 32bits floating point.


The negative value can come from a No Data in your images, as you are 
interpolating values...


As a workaround you can try to use DynamicConvert (to be sure that it is 
not the conversion from 16 to 32 bits that is not done correctly), and 
then use a mask to avoid taking No Data into account (for instance set a 
No Data Value to -99, with the ManageNoData app, and threshold the 
result once interpolated to only keep positive values).


Hope it works, and don't hesitate if you have more questions!

Antoine


On 11/01/2019 16:30, Gabrielle Hoelzle wrote:

I have not been using command line but a script. I will attach.

On Friday, January 11, 2019 at 10:11:54 AM UTC-5, Julien Michel wrote:

Hi,

Can you post more details, such as command-lines ?

Regards,

Julien

*De :*otb-...@googlegroups.com 
> *De la part de* Gabrielle
Hoelzle
*Envoyé :* vendredi 11 janvier 2019 16:05
*À :* otb-users >
*Objet :* [otb-users] introduction of negative DNs in otb

I am having an issue with both Worldview and Pleaides when I run
(at minimuim) any of these steps : superimpose, pansharpening,
orthorectification. During the process, the 16bit float raw inputs
are being upgraded 32 bit and negative values are being
introduced. I am hoping someone is aware of a workaround for this.
Or an explanation of why this is happening. Thanks

-- 
-- 
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 otb-...@googlegroups.com

To unsubscribe from this group, send email to
otb-users+...@googlegroups.com 
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 otb-users+...@googlegroups.com .
For more options, visit https://groups.google.com/d/optout
.

--
--
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 otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
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 otb-users+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
This mailing will be abandoned soon in favor of a more friendly forum:
https://forum.orfeo-toolbox.org
Thanks to visit it for any question related to Orfeo Toolbox (OTB) usage, or to 
check the OTB FAQ:
http://www.orfeo-toolbox.org/FAQ.html
--- 
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 otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [otb-users] introduction of negative DNs in otb

2019-01-14 Thread Michel Julien
Hi,

You can set the output encoding with :

https://www.orfeo-toolbox.org/PythonDoc/stubs/otbApplication.Application.html#otbApplication.Application.SetParameterOutputImagePixelType

SetParameterOuptutImagePixelType(“out”, 2) should set it to unsigned int (16 
bits).

Regards,

Julien

De : otb-users@googlegroups.com  De la part de 
Gabrielle Hoelzle
Envoyé : vendredi 11 janvier 2019 16:31
À : otb-users 
Objet : Re: [otb-users] introduction of negative DNs in otb

I have not been using command line but a script. I will attach.

On Friday, January 11, 2019 at 10:11:54 AM UTC-5, Julien Michel wrote:
Hi,

Can you post more details, such as command-lines ?

Regards,

Julien

De : otb-...@googlegroups.com 
> De la part de Gabrielle Hoelzle
Envoyé : vendredi 11 janvier 2019 16:05
À : otb-users >
Objet : [otb-users] introduction of negative DNs in otb

I am having an issue with both Worldview and Pleaides when I run (at minimuim) 
any of these steps : superimpose, pansharpening, orthorectification. During the 
process, the 16bit float raw inputs are being upgraded 32 bit and negative 
values are being introduced. I am hoping someone is aware of a workaround for 
this. Or an explanation of why this is happening. Thanks

--
--
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 otb-...@googlegroups.com
To unsubscribe from this group, send email to
otb-users+...@googlegroups.com
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 otb-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
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 
otb-users@googlegroups.com<mailto:otb-users@googlegroups.com>
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com<mailto:otb-users+unsubscr...@googlegroups.com>
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 
otb-users+unsubscr...@googlegroups.com<mailto:otb-users+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

-- 
-- 
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 otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
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 otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [otb-users] introduction of negative DNs in otb

2019-01-11 Thread Gabrielle Hoelzle
I have not been using command line but a script. I will attach.

On Friday, January 11, 2019 at 10:11:54 AM UTC-5, Julien Michel wrote:
>
> Hi,
>
>  
>
> Can you post more details, such as command-lines ?
>
>  
>
> Regards,
>
>  
>
> Julien
>
>  
>
> *De :* otb-...@googlegroups.com   > *De la part de* Gabrielle Hoelzle
> *Envoyé :* vendredi 11 janvier 2019 16:05
> *À :* otb-users >
> *Objet :* [otb-users] introduction of negative DNs in otb
>
>  
>
> I am having an issue with both Worldview and Pleaides when I run (at 
> minimuim) any of these steps : superimpose, pansharpening, 
> orthorectification. During the process, the 16bit float raw inputs are 
> being upgraded 32 bit and negative values are being introduced. I am hoping 
> someone is aware of a workaround for this. Or an explanation of why this is 
> happening. Thanks
>
>  
>
> -- 
> -- 
> 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 otb-...@googlegroups.com 
> 
> To unsubscribe from this group, send email to
> otb-users+...@googlegroups.com 
> 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 otb-users+...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
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 otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
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 otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

import otbApplication

# The following line creates an instance of the Superimpose application
Superimpose = otbApplication.Registry.CreateApplication("Superimpose")

# The following lines set all the application parameters:
Superimpose.SetParameterString("inr", "/media/sf_hostmachine/WV2/056055876010_01_P001_PAN/16MAY05170335-P2AS-056055876010_01_P001.TIL?=true")

Superimpose.SetParameterString("inm", "/media/sf_hostmachine/WV2/056055876010_01_P001_MUL/16MAY05170335-M2AS-056055876010_01_P001.TIL?=true")

Superimpose.SetParameterString("out", "/media/sf_hostmachine/WV2/056055876010_01_P001_MUL/16MAY05170335-M2AS-056055876010_01_P001_superimpose.tif")

Superimpose.SetParameterString("interpolator", "bco")

# The following line execute the application
Superimpose.ExecuteAndWriteOutput()

# The following line creates an instance of the Pansharpening application
Pansharpening = otbApplication.Registry.CreateApplication("Pansharpening")

# The following lines set all the application parameters:
Pansharpening.SetParameterString("inp", "/media/sf_hostmachine/WV2/056055876010_01_P001_PAN/16MAY05170335-P2AS-056055876010_01_P001.TIL?=true")

Pansharpening.SetParameterString("inxs", "/media/sf_hostmachine/WV2/056055876010_01_P001_MUL/16MAY05170335-M2AS-056055876010_01_P001_superimpose.tif?=true")

Pansharpening.SetParameterString("method", "bayes")

Pansharpening.SetParameterString("out", "/media/sf_hostmachine/WV2/056055876010_01_P001_MUL/16MAY05170335-M2AS-056055876010_01_P001_pansharp.tif")

# The following line execute the application
Pansharpening.ExecuteAndWriteOutput()

import otbApplication

OrthoRectification = otbApplication.Registry.CreateApplication("OrthoRectification")

OrthoRectification.SetParameterString("io.in", "/home/ghoelzle/Downloads/pansharpSPOT_20171120.tif?=true")

OrthoRectification.SetParameterString("io.out", "/home/ghoelzle/Downloads/orthopansharp_SPOT_20171120.tif")

OrthoRectification.SetParameterString("elev.dem", "/home/ghoelzle/Downloads/DEM_EQT/") 

OrthoRectification.SetParameterString('elev.geoid', '/media/sf_SharedwithVM/Geoid/')

OrthoRectification.SetParameterString("map.epsg.code", "32617")

OrthoRectification.SetParameterString("interpolator", "bco")

OrthoRectification.ExecuteAndWriteOutput()




RE: [otb-users] introduction of negative DNs in otb

2019-01-11 Thread Michel Julien
Hi,

Can you post more details, such as command-lines ?

Regards,

Julien

De : otb-users@googlegroups.com  De la part de 
Gabrielle Hoelzle
Envoyé : vendredi 11 janvier 2019 16:05
À : otb-users 
Objet : [otb-users] introduction of negative DNs in otb

I am having an issue with both Worldview and Pleaides when I run (at minimuim) 
any of these steps : superimpose, pansharpening, orthorectification. During the 
process, the 16bit float raw inputs are being upgraded 32 bit and negative 
values are being introduced. I am hoping someone is aware of a workaround for 
this. Or an explanation of why this is happening. Thanks

--
--
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 
otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
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 
otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
-- 
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 otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
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 otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.