Hi,
I'm trying to implement skin lesion detections as melanoma using "Texture Distinctiveness Lesion Segmentation (TDLS) Algorithm" in MATLAB.
*** step 1, 2 & 3 of TDLS***
Convert the corrected image to the XYZ color space.
* XYZ is not RGB, but approximately equal to RGB color space.
Learn the sparse texture model.
* For each pixel s in image I, extract the texture vector to obtain the set of texture vectors T.
? = { ??? |1 ≤ ? ≤ ? × ? }
* A set of N x M texture vectors extracted. (N x M – pixel size)
Cluster the texture vectors in T, using k-means clustering algorithm, to obtain the representative texture distributions.
1. K-means clustering algorithm.
Ck – kth set of texture vectors, μk – mean vector of kth set.
* Find K clusters that minimizes the sum of squared error between cluster members tsj
and cluster mean μk.
****** that is what I code for step 1 & 2 but I'm not sure ****
[syntax=scilab]
I=imread('1.jpg');
imD=double(Im);
imC = rgb2xyz(imD);
s=size(imC);
imR=reshape(imC,numel(imC)/3,3);
[idx, C] = kmeans(ImR, K,'Display', 'final');
S = zeros( size(ImR) );
for i = 1:K
idg = find((idx == i));
S(idg,:) = repmat(C(i,:),size(idg,1),1);
end
S = reshape(S,N,M,3);
figure(45); imshow((S)); title('Image Clustered')[/syntax]
%%%%%%%%%%%%%%%%%
I wanted to know if reshape does "extract the texture vector for each pixel in the image"
Thanks in adavance