我正在研究皮肤癌分类项目。我使用内置的MATLAB函数extractLBPFeatures()
进行纹理分析。
我在参数中使用了'假'。我得到了10个元素的向量。但是我没能将癌症图像与非癌图像区分开来。因为我看到如果感兴趣的区域关闭的话,两种情况的值都是相似的(意味着几乎相同的区域)。对于小区域我得到的价值很小,对于大区域我有更大的价值。我该怎么做才能分类?
clc;
close all;
imtool close all;
clear;
fontSize=10;
%Input image from current directory...
[file path]=uigetfile('.jpg','Select Image from the folder');
temp=[path file];
a=imread(temp);
a=imresize(a,[300 300]);
mkr=a;
%convert to gray scale image...
im=rgb2gray(a);
%a = imresize(a,[200 200])
m1 = im2double(a);
%im= imadjust(im);
%DullRazor technique for hair removal
se = strel('disk',5);
hairs = imbothat(im,se);
BW = hairs > 15;
BW2 = imdilate(BW,strel('disk',2));
replacedImage = roifill(im,BW2);
%filtering for removing artifacts..
replacedImage=medfilt2(replacedImage);
grayImage=replacedImage;
%Applying Otsu thresholding method....
level=graythresh(replacedImage);
a=im2bw(replacedImage,level);
%Hole fills...
a=imfill(~a,'holes');
%Labeling the image
a=bwlabel(a);
%Selecting the biggest region ..
s = regionprops(a,'Area');
[maxValue,index] = max([s.Area]);
I=bwareaopen(a,maxValue);
%Morphological closing operation..
se = strel('disk',5);
I= imclose(I,se);
figure,imshow(I);
grayImage(~I)=nan;
figure,
imshow(grayImage);
lbp= extractLBPFeatures(grayImage,'Upright',false);
disp(lbp);