Unsupervised classification

From AWF-Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "=Unsupervised K-Means classification= * In the search engine of the Processing Toolbox, type {{typed|text=kmeans}} and double click '''KMeansClassification''' of OTB. * Specif...")
 
 
(One intermediate revision by one user not shown)
Line 2: Line 2:
 
* In the search engine of the Processing Toolbox, type {{typed|text=kmeans}} and double click '''KMeansClassification''' of OTB.
 
* In the search engine of the Processing Toolbox, type {{typed|text=kmeans}} and double click '''KMeansClassification''' of OTB.
 
* Specify a multispectral image as Input Image.
 
* Specify a multispectral image as Input Image.
* Specify directory and name for the Output image. Select the output data type {{button|text=uint 8}} from the pull-down list.
+
* Specify directory and name for the Output image.
 
* Set the {{button|text=Number of classes}} to {{typed|text=20}}
 
* Set the {{button|text=Number of classes}} to {{typed|text=20}}
 
* Check the {{button|text=Training set size}} to {{typed|text=10000}}
 
* Check the {{button|text=Training set size}} to {{typed|text=10000}}
Line 10: Line 10:
  
 
* Load the resulting image into QGIS. It is single band file with 20 grey levels labeled from 0 to 19.
 
* Load the resulting image into QGIS. It is single band file with 20 grey levels labeled from 0 to 19.
* {{mitem|text=Layer Properties --> Symbology --> Render type}}. Switch to {{button|text=Singleband pseudocolor}} and select a '''Color ramp''' (e.g. Spectral). Select the '''Mode''' {{button|text=Equal interval}} and set the number of classes to {{typed|text=20}}
+
* {{mitem|text=Layer Properties --> Symbology --> Render type}}. Switch to {{button|text=Singleband pseudocolor}} and select a '''Color ramp''' (e.g. Spectral). Select the '''Mode''' {{button|text=Equal interval}} and set the number of classes to {{typed|text=20}}. Apply.
  
 
[[Category:QGIS Tutorial]]
 
[[Category:QGIS Tutorial]]

Latest revision as of 08:26, 4 December 2020

[edit] Unsupervised K-Means classification

  • In the search engine of the Processing Toolbox, type kmeans and double click KMeansClassification of OTB.
  • Specify a multispectral image as Input Image.
  • Specify directory and name for the Output image.
  • Set the Number of classes to 20
  • Check the Training set size to 10000
  • Output pixel type: uint8
  • Click on Run.

Qgis otb kmeans.png

  • Load the resulting image into QGIS. It is single band file with 20 grey levels labeled from 0 to 19.
  • Layer Properties --> Symbology --> Render type. Switch to Singleband pseudocolor and select a Color ramp (e.g. Spectral). Select the Mode Equal interval and set the number of classes to 20. Apply.
Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export