Hexagon Geospatial
MENU

Spatial Modeler

Discuss topics with other Hexagon Geospatial Product pioneers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Super Contributor
Posts: 421
Registered: ‎10-27-2015
Accepted Solution

Covariance between two bands

[ Edited ]

Dear all,

I need to calculate the covariance between two bands.

I have used the Statistics Operator to obtain a covariance matrix. 

Thane I converted the matrix in string and (using split string/nth item) I have obtained the value of the covariance.

Is this approach right? In order to obtain the covariance value is available a faster way (whitout using the string operators)?


Thank you very much

Regards

Technical Evangelist
Posts: 613
Registered: ‎10-01-2015

Re: Covariance between two bands

HI Giuseppe,

 

Not saying it's the best way, but this would do it:

 

covariance.PNG

 

...where the Custom Matrix Input  kernel is defined like this:

 

cov_kernel.PNG

 

It does seem like we need an ability to say "Get the value at position 2,1" or something similar. I may add that to the backlog.

 

Cheers

 

 

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Technical Evangelist
Posts: 613
Registered: ‎10-01-2015

Re: Covariance between two bands

[ Edited ]

Or you could just implement the covariance formula directly:

 

covariance2.PNG

 

The formula is given in Jensen, John R, "Introductory Digital Image Processing" Third Edition, p138

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Super Contributor
Posts: 421
Registered: ‎10-27-2015

Re: Covariance between two bands

Thank you Ian!

Technical Evangelist
Posts: 613
Registered: ‎10-01-2015

Re: Covariance between two bands

Annoyingly, a colleague just pointed out that this would do it too:

 

Covariance3.PNG

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Highlighted
Super Contributor
Posts: 421
Registered: ‎10-27-2015

Re: Covariance between two bands

Thank you!

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.