Is the labeling performed by bwlabel() is the same label vector created for training a system for classification?
Ältere Kommentare anzeigen
Is the labeling performed by bwlabel() is the same label vector created for training a system for classification?
I want to know regarding SVM classification for image processing
Antworten (1)
Image Analyst
am 3 Mai 2014
0 Stimmen
No. A classification system will give each blob a number describing what kind of blob it is, whereas labeling gives each blob a unique ID number. For example let's say you have circles and squares. SVM should label all circles with a label #1, and all squares with a label #2. Then you can use ismember() to extract out just the circles and use bwlabel or bwconncomp to give each circle a unique number like 1,2,3,4,5,...N for the N circles that are there in the image.
11 Kommentare
Sheema Khattak
am 5 Mai 2014
Image Analyst
am 5 Mai 2014
svm tells you what the classes are, like there are 2 classes: circles and squares, maybe there are 7 circles, and 3 squares in your image. Labeling will identify each. Extract out the circles into a circles-only image, then label them 1 through 7, then extract a squares-only image and label them 1 through 3.
Sheema Khattak
am 6 Mai 2014
Sheema Khattak
am 6 Mai 2014
Image Analyst
am 6 Mai 2014
I don't have SVM so I don't know what you're doing with it exactly, but it classifies object or pixels based on some input parameters like intensity, color, location, or whatever you've chosen. Let's say you have an image with 7 circles and 3 squares in it. So let's say that every pixel in the new "classification" image is either a 0 for background, a 1 if the pixel lives in one of the 7 circles, or 2 if it lives in one of the 3 squares.
Let's say the 7 circles are all different diameters and you want to know the diameter of each. Well we can get an image with only background (0) and circles (1) and without any squares (2) using ismember(). But how to measure the 7 circles? All we have now is a collection of unrelated pixels with some numbers. You need to assign an ID number or "label" to each circle. Labeling will say that that group of pixels with value 1 are all touching, they're connected, so we'll call that blob #1. Then some physically separated circle will be identified as blob #2, and so on until you have a new image where each circle no longer has the value 1 but has the ID number (label) that it has been assigned. Then you can pass this labeled image (now with values 0 through 7) into regionprops() which will get the diameter of all 7 circles. Same basic thing when it comes to the squares: extract squares only, label it, then call regionprops().
Does that explain it? If so, can you mark the answer as "Accepted". If not, let me know what needs clarification.
Sheema Khattak
am 7 Mai 2014
Image Analyst
am 7 Mai 2014
bwlabel would just produce a labeled image. I don't think it would be appropriate for using in SVM since there would be no features clusters for SVM to divide it up into. What features are you planning on sending into SVM?
Sheema Khattak
am 10 Mai 2014
Image Analyst
am 10 Mai 2014
OK, those are the classes that you want it to classify your data into. But what is the feature vector? What goes into it? The color, the shape, the variance, what??? The SVM training will look at those measurements and decide what the classes are so that when you take a specific feature vector it can tell you what class it belongs to . You can't just put "diseased tissue,healthy and background" into the svm training function without any data that it needs to decide what those classes mean in terms of the values of the elements in the feature vectors.
Let's take another example. Let's say that you have two classes that you want to divide your set of animals into: insects and elephants. You can't just say I'm going to tell svmtrain that I want insects and elephants. You need to pass in a feature vector for a bunch of animals. So let's say your feature vector, that you get from measuring a bunch of animals with know species os, is [numberOfLegs, weight]. So you send in 1000 feature vectors for 1000 animals, and also what you know to be the true species . Then svmtrain will say that if the numberOfLegs is 6 and the weight is less than 250 kg, it must be an insect, otherwise it must be an elephant. So now it's trained and you can send in some measurements in a feature vector. Let's say you send in [4, 800]. SVM will then say that those measurements belong to an elephant.
Does that make sense?
Sheema Khattak
am 12 Mai 2014
Image Analyst
am 12 Mai 2014
I asked you first . Recall when I asked "But what is the feature vector? What goes into it? The color, the shape, the variance, what???" That means that I don't know what features might indicate diseased or healthy tissue.
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!