File Exchange

image thumbnail

Soil Classification using a Multiclass SVM

version (4.66 MB) by Manu BN
A Matlab code for soil classification using a multiclass SVM classifier


Updated 26 Jan 2016

View License

A Matlab code is written to classify 7 different classes of soils namely 'Clay','Clayey Peat','Clayey Sand', 'Humus Clay', 'Peat','Sandy Clay', and 'Silty Sand'. The code uses a multiclass SVM classifier (one vs. all).
How to run ??
1. Place the Soil Detection_Code folder in the Matlab path, and add all the subfolders into that path
2. Run SoilDetect_GUI.m
3. In the GUI click on Load Image and load the image from Manu's Soil Dataset, enhance contrast. Click on classification results. Then measure accuracy (in this case clay vs others).

The code is loosely based on the paper included, please cite the below and give credit to the authors:
[1] Bhattacharya, Biswanath, and Dimitri P. Solomatine. "Machine learning in soil classification." Neural Networks 19.2 (2006): 186-195.
[2] Multiclass SVM link:

Comments and suggestions are always welcome

Thanks in advance,

Manu B.N

Cite As

Manu BN (2021). Soil Classification using a Multiclass SVM (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (16)

Apoorv Chauhan

When I click on classification result nothing happens. can anyone help?

Aditi Shukla

when i upload a picture of myself it classifies it as some soil. what should i do?

amruta naik

how to get .mat file sir.
we are not able to create it



I need to apply the same code on medical images with 6 diseases? How I can change in the data set of this code

José Padilla

Manu BN, me parece muy interesante el proyecto, estoy iniciando con lo que se refiere Inteligencia Artificial, me gustaría entender bien como lo realizaste y quería saber si me puedes ayudar con el código comentado, por favor.


Tien Le

Manu BN: Thanks for your support. I already know how to do it. Thanks again!

Manu BN

@Goma: You should find a feature set suitable for emotions, go thro lots of papers and find one.
@ Tien: Extract features first and store them in rows and assign a label. Plenty of online tutorials available.

Tien Le

How can I create a new TrainFeat_Soil.mat or Accuracy_Data.mat. Thanks!

Goma Najah

My topic about "Emotion recognition from facial images" and i have 7 classes (Emotions). Can i use this code with my topic? if so, what should i change?


Gökmen Dedemen

srunitha gunjan

good and worth full

Manu BN

No need of segmentation as the features extracted are all based on color.

Luu Thanh

why you don't perform image segment, sir ?

Luu Thanh

split range

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!