Discussion:
[otb-users] Input Image type in HaralickTextureExtraction
Agustin Lobo
2018-11-05 17:05:23 UTC
Permalink
We have computed HaralickTextureExtraction (simple) with a float32
image and got a result with many 0, while if we input the same image
previously stretched to a 0-255 interval and written as
UINT8 data type the results make a lot of sense. It looks like there
are limitations on the data type and range of the the input data. As
a co-occurrence matrices must be computed, I imagine that
a 0-64 or 0-255 range is required, but the doc in
https://www.orfeo-toolbox.org/packages/doc/test-cookbook-workshops/Applications/app_HaralickTextureExtraction.html
does not mention any limitation and does not tell about default values
for the parameters (and in some cases even not the definitions).

Could anyone tell me if there are actual limitations for the input
images to HaralickTextureExtraction? And what about the default values
of the parameters? For example for
X Offset: X Offset.
Y Offset: Y Offset.
Image Minimum: Image Minimum.
Image Maximum: Image Maximum.
Histogram number of bin: Histogram number of bin.

Thanks

Agus
--
--
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.
Antoine Regimbeau
2018-11-06 11:55:46 UTC
Permalink
Hi Agus,

Indeed a co-occurrence matrix - like object must be computed (in otb we
are using an indexed list for better computational efficiency). The
range is computed from Image minimum , image maximum and histogram
number of bin.

The image is "discretized" into /n/ values (number of bin) between min
and max. That would give you a /n/x/n /co-occurence matrix.

I am not sure that there is any limitation on the input as the process
is clamping the input (in float value) then computing the co-occurerence
indexed list. Nevertheless you need to be careful with the input that
needs to be coherent with the input value /parameters.min /and
/parameters.max/ . Defautl value for those parameters are displayed in
the otbcli help :

/./bin/otbcli_HaralickTextureExtraction -help //
/

/[...]/

/Parameters: //
//MISSING -in               <string>         Input Image  (mandatory)//
//        -channel          <int32>          Selected Channel 
(mandatory, default value is 1)//
//        -step             <int32> Computation step  (optional, off by
default, default value is 1)//
//        -ram              <int32> Available RAM (Mb)  (optional, off
by default, default value is 128)//
//        -parameters       <group>          Texture feature parameters //
//        -parameters.xrad  <int32>          X Radius  (mandatory,
default value is 2)//
//        -parameters.yrad  <int32>          Y Radius  (mandatory,
default value is 2)//
//        -parameters.xoff  <int32>          X Offset  (mandatory,
default value is 1)//
//        -parameters.yoff  <int32>          Y Offset  (mandatory,
default value is 1)//
//        -parameters.min   <float>          Image Minimum  (mandatory,
default value is 0)//
//        -parameters.max   <float>          Image Maximum  (mandatory,
default value is 255)//
//        -parameters.nbbin <int32> Histogram number of bin  (mandatory,
default value is 8)//
//        -texture          <string>         Texture Set Selection
[simple/advanced/higher] (mandatory, default value is simple)//
//        -out              <string> [pixel] Output Image
[pixel=uint8/uint16/int16/uint32/int32/float/double/cint16/cint32/cfloat/cdouble]
(default value is float) (optional, on by default)//
//        -inxml            <string>         Load otb application from
xml file  (optional, off by default)//
//        -progress         <boolean>        Report progress //
//        -help             <string list>    Display long help (empty
list), or help for given parameters keys/

If I understand correctly you "stretched" your input on a 8bit interval,
does this mean that your input was between /[a,b]/ with /a,b /any float
values before the stretch ?
If so then you should use the application with min and max set to /a
/and /b /respectively.


Hope it helps.

Antoine
Post by Agustin Lobo
We have computed HaralickTextureExtraction (simple) with a float32
image and got a result with many 0, while if we input the same image
previously stretched to a 0-255 interval and written as
UINT8 data type the results make a lot of sense. It looks like there
are limitations on the data type and range of the the input data. As
a co-occurrence matrices must be computed, I imagine that
a 0-64 or 0-255 range is required, but the doc in
https://www.orfeo-toolbox.org/packages/doc/test-cookbook-workshops/Applications/app_HaralickTextureExtraction.html
does not mention any limitation and does not tell about default values
for the parameters (and in some cases even not the definitions).
Could anyone tell me if there are actual limitations for the input
images to HaralickTextureExtraction? And what about the default values
of the parameters? For example for
X Offset: X Offset.
Y Offset: Y Offset.
Image Minimum: Image Minimum.
Image Maximum: Image Maximum.
Histogram number of bin: Histogram number of bin.
Thanks
Agus
--
--
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.
Agustin Lobo
2018-11-06 12:29:23 UTC
Permalink
Thanks Antoine.
I also understand that the X and Y Offsets refer to the jump between
consecutive slicing windows.
Weird the command line help is actually more informative than the help
page! Will keep it in mind for the future before asking!
Best,
Agus
On Tue, Nov 6, 2018 at 12:55 PM Antoine Regimbeau
Post by Antoine Regimbeau
Hi Agus,
Indeed a co-occurrence matrix - like object must be computed (in otb we are using an indexed list for better computational efficiency). The range is computed from Image minimum , image maximum and histogram number of bin.
The image is "discretized" into n values (number of bin) between min and max. That would give you a nxn co-occurence matrix.
./bin/otbcli_HaralickTextureExtraction -help
[...]
MISSING -in <string> Input Image (mandatory)
-channel <int32> Selected Channel (mandatory, default value is 1)
-step <int32> Computation step (optional, off by default, default value is 1)
-ram <int32> Available RAM (Mb) (optional, off by default, default value is 128)
-parameters <group> Texture feature parameters
-parameters.xrad <int32> X Radius (mandatory, default value is 2)
-parameters.yrad <int32> Y Radius (mandatory, default value is 2)
-parameters.xoff <int32> X Offset (mandatory, default value is 1)
-parameters.yoff <int32> Y Offset (mandatory, default value is 1)
-parameters.min <float> Image Minimum (mandatory, default value is 0)
-parameters.max <float> Image Maximum (mandatory, default value is 255)
-parameters.nbbin <int32> Histogram number of bin (mandatory, default value is 8)
-texture <string> Texture Set Selection [simple/advanced/higher] (mandatory, default value is simple)
-out <string> [pixel] Output Image [pixel=uint8/uint16/int16/uint32/int32/float/double/cint16/cint32/cfloat/cdouble] (default value is float) (optional, on by default)
-inxml <string> Load otb application from xml file (optional, off by default)
-progress <boolean> Report progress
-help <string list> Display long help (empty list), or help for given parameters keys
If I understand correctly you "stretched" your input on a 8bit interval, does this mean that your input was between [a,b] with a,b any float values before the stretch ?
If so then you should use the application with min and max set to a and b respectively.
Hope it helps.
Antoine
We have computed HaralickTextureExtraction (simple) with a float32
image and got a result with many 0, while if we input the same image
previously stretched to a 0-255 interval and written as
UINT8 data type the results make a lot of sense. It looks like there
are limitations on the data type and range of the the input data. As
a co-occurrence matrices must be computed, I imagine that
a 0-64 or 0-255 range is required, but the doc in
https://www.orfeo-toolbox.org/packages/doc/test-cookbook-workshops/Applications/app_HaralickTextureExtraction.html
does not mention any limitation and does not tell about default values
for the parameters (and in some cases even not the definitions).
Could anyone tell me if there are actual limitations for the input
images to HaralickTextureExtraction? And what about the default values
of the parameters? For example for
X Offset: X Offset.
Y Offset: Y Offset.
Image Minimum: Image Minimum.
Image Maximum: Image Maximum.
Histogram number of bin: Histogram number of bin.
Thanks
Agus
--
--
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 unsubscribe from this group, send email to
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.
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-***@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.
Loading...