PCA + Segmentation
Anybody has worked with Principal Component Analysis layers to do segmentation before?
I ran the PCA algorithm and created 3 layers and one of them looks very promising to discern urban boundaries. However, when I use multi-threshold or multi-resolution segmentation it doesn't give me any good objects back. I also tried using the PCA layer as a base for unsupervised classification and I didn't get the results I hoped. Best I could do is to run unsupervised on the PCA layer that I liked and also include another layer (like Red or NIR), then run a segmentation. it's ok but not great.
Any advice?
Was this article helpful?
8 comments
Hi Lynn, what type of values does your PCA layer have? If the value range is very low, for example, you will also have to decrease the Scale Parameter for the multiresolution segmentation.
Hello Lynn, pls normalize the PCA layers to a value range between [0 ... 255] before you using the layers as input for the multi resolution segmentation. Please try this customized algorithm for it: https://support.ecognition.com/hc/en-us/articles/360016381399-Modify-Layer-Histogram. You can set the features "smallest actual pixel value" and "largest actual pixel value" as input parameters and set the output value range to [0 ... 255]. The output layers can be "easier" used as input for a MRS. Please let me know if that works...
Another possibility is change the image layer weights in the multiresolution segmentation for the PCA layers. See the weight as a factor to bring the standard deviation of the layer to the same level like the highest standard deviation value from all input layers. For instance, if the RED layer has a StdDev of 7 and the PCA layer 0,7, please use 10 for the PCA layer.
Follow-up Q&A 1: Please load the customized algorithm 'modify layer histogram - CA v04.dcp' from the link above, after it, the algorithm 'modify layer histogram' should be available under 'customized' in the algorithm list. In older eCognition versions you have to define the available algorithms in the list by selecting them under 'more ...' at the end of the list (pls check if the 'modify layer histogram' algorithm is available here).
Follow-up Q&A 2: Please use the right mouse button in the 'Image Object Information" window and use 'Select Features to Display...', under "Map features>Image layer>Statistics>Standard deviation" you can generate needed StdDev scene features. In older eCognition versions you have to generate the 'Standard deviation' scene features under "Scene features>Scene-related>Standard deviation".
You can find the StdDev value for each layer under "Map features>Image layer>Statistics>Standard deviation>..."
Thank you very much! I appreciate this.
I cut out a subset and indeed the value range for PCA layer was very small (Min:-4.75 ; Max:5.75). Increasing the SP didn't quite cut it but I will keep that useful information in mind for next time there's a value pinch. Stretching the values worked for a multi-resolution segmentation but not for a multi-threshold.
Christian, this is most instructive. A couple follow-up questions:
1. I tried to load your algorithm into the process tree but nothing showed up. I also opened your example project. When I went to add a process and typed "modify algorithm" in the search bar, it popped up and I was able to use it to stretch the values. is that the way this is supposed to work?
2. I should know this by now but where can I find the map features? I accessed the histograms by clicking Tools > Image Layer Histograms.
Ah yes of course! Thank you so much Christian. I will also try to increase the layer weight to see if it works. I will report back on findings. Appreciate this and happy monday!