How to perform an image classification ?
14 ビュー (過去 30 日間)
古いコメントを表示
Hello. I have plenty of images, each one of them corresponds to a class. Knowing that I have 3 classes, I want to perform an image classification. I'm used to SVM and others, and I know how to perform the training and classification.
How do I proceed to the feature extraction from an image ?
Thank you!
0 件のコメント
回答 (6 件)
Image Analyst
2013 年 4 月 14 日
Once you have the classified image, you essentially have a labeled image. 0 = background, a value of 1 = class 1, and so on. If you want all blobs of a certain class to be measured as a group, then just call regionprops.
groupMeasurements = regionprops(classifiedImage, 'all');
If you want each blob for a certain class to be measured by itself, then turn it into a binary image and then call regionprops:
binaryImage = classifiedImage == theClassNumberYouWant;
Then call regionprops:
individualBlobMeasurements = regionprops(binaryImage, 'all');
See my "BlobsDemo" for a more comprehensive tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
0 件のコメント
Anand
2013 年 4 月 15 日
There are a bunch of different feature extraction approaches that are tied to what kind of images you have and the kind of problem you are attempting to solve. Here are some common feature descriptors you could extract: SURF features,MSER regions,FAST corners, Minimum Eigen Value corners and Harris corners.
Guess what, they are all in the Computer Vision System Toolbox!
Use the following functions to detect them:
and this function to extract them:
Image Analyst
2013 年 4 月 30 日
Did you see the help:
"points = detectFASTFeatures(I) returns a cornerPoints object, points. The object contains information about the feature points detected in a 2-D grayscale input image, I. "
You have a 3D image - a color image. The help says that it needs to be a 2D grayscale image. Either take one color channel
grayImage = x(:,:,2);
or a weighted average of the color channels:
grayImage = rgb2gray(x);
The first method is preferable.
0 件のコメント
Chaou
2013 年 5 月 1 日
編集済み: Chaou
2013 年 5 月 1 日
1 件のコメント
Image Analyst
2013 年 5 月 1 日
That pseudocolored image does not make sense. Even ignoring the colormap it doesn't look anything like what it should. You should see a bright band running through that glass slide or panel or whatever it is. What does it look like if you do
imshow(grayImage, []);
Plus you need to upload an image with no discharge, and one with full discharge, and maybe one or two more with "nearly occurring discharge" so I can see what it is that distinguishes the nearly occurring discharge from the full or no discharge image.
Chaou
2013 年 5 月 5 日
編集済み: Chaou
2013 年 5 月 5 日
1 件のコメント
Image Analyst
2013 年 5 月 5 日
Why don't you just get the mean gray level between certain rows? It looks like that should correlate pretty well with the level of discharge. Of course you'll want to turn off the automatic gain or exposure control in your camera because you can't have the camera trying to reduce the exposure when the image is supposed to be brighter. I can tell you have some sort of automatic gain or exposure because the intensity of the shaft on the bottom is different in the images.
Chaou
2013 年 5 月 18 日
編集済み: Chaou
2013 年 5 月 18 日
5 件のコメント
Florian S
2017 年 2 月 6 日
Perhaps your GPU Driver is too old. I have exactly the same problems. You must have the latest CUDA driver on your running system.
I am searching for a way to perform the 'detectFASTFeatures' script without using the GPU...
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
