Hi Kimi,

The components are given as directions (eigenvectors) and are therefore
normalized (unit vectors). You can use the eigenvalues (the variance of
each direction) to select the components[1]. They are stored in a file
which has the same name as the model but with a .txt extension.

Best wishes,

Jordi

[1]  https://en.wikipedia.org/wiki/Principal_component_analysis#Intuition

On Wed 22-Aug-2018 at 15:47:54 +02, Kimi <[email protected]> wrote: 
> Hi all,
>
> I would like to do the pca (principal component analysis) of my Sentinel-2 
> multiband image composed of nine 20m-L2A rasters. I tried with the 
> otbcli_DimensionalityReduction module (the method parameter was set to 
> “pca”), but the statistics of the output image is not as I expected.
> Namely, all the bands of the output image has the standard deviation equal to 
> 1.
>
> Generally, I expected that the output pca bands have standard deviations 
> different from 1. This would then allow me to select the most significant 
> bands according to the variance loss criteria.
>
> Is this a bug of the DimensionalityReduction –pca algorithm, or there is 
> maybe another way in orfeo toolbox to get the pca bands without std 
> normalized to 1?
>
> Thank you in advance for your time and the help!
>
> Cheers,
>
> Kimi
>
> PS.
>
> I am using orfeo 6.4.0 from the command line, and there is my code:
>
>>>otbcli_DimensionalityReduction -in test2.tif -out pca_norOFF.tif -method pca 
>>>-normalize 0
>
>>>otbcli_ComputeImagesStatistics -il pca_norOFF.tif
>
> and this is the statistics for 9 bands from the pca output image:
>
> Mean: 2.14067, -1.29191, 0.554654, 0.996805, -0.267422, 0.423317, 0.285117, 
> 0.281447, -0.183358 Standard Deviation: [1, 1, 1, 1, 1, 1, 1, 1, 1]
>
> My input multiband image can be downloaded from here:
>
> https://files.fm/u/2vh7aqvu
>
> -- 


-- 
-- 
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.

Reply via email to