フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

hi...I have done here local binary pattern on thresholded output that is after segmentation.now to carry on i am supposed to do classification on this output using Bayes classifier .I have understood the concept but finding it difficult to code .

1 回表示 (過去 30 日間)
priyanka jann
priyanka jann 2015 年 5 月 6 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
workspace;
fontSize = 20;
GRAYImage = double(binaryImage);
% Get the dimensions of the image. numberOfColorBands should be = 1.
[rows, columns ] = size(GRAYImage);
% Display the original gray scale image.
figure;
subplot(2, 2, 1);
imshow(GRAYImage, []);
title('Original Grayscale Image', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'Position', get(0,'Screensize'));
set(gcf,'name','Image Analysis Demo','numbertitle','off')
% Let's compute and display the histogram.
[pixelCount, grayLevels] = imhist(GRAYImage);
subplot(2, 2, 2);
bar(pixelCount);
title('Histogram of original image', 'FontSize', fontSize);
xlim([0 grayLevels(end)]); % Scale x axis manually.
% Preallocate/instantiate array for the local binary pattern.
localBinaryPatternImage = zeros(size(GRAYImage));
for row = 2 : rows - 1
for col = 2 : columns - 1
centerPixel = GRAYImage(row, col);
pixel7=GRAYImage(row-1, col-1) > centerPixel;
pixel6=GRAYImage(row-1, col) > centerPixel;
pixel5=GRAYImage(row-1, col+1) > centerPixel;
pixel4=GRAYImage(row, col+1) > centerPixel;
pixel3=GRAYImage(row+1, col+1) > centerPixel;
pixel2=GRAYImage(row+1, col) > centerPixel;
pixel1=GRAYImage(row+1, col-1) > centerPixel;
pixel0=GRAYImage(row, col-1) > centerPixel;
localBinaryPatternImage(row, col) = uint8(pixel7 * 2^7 + pixel6 * 2^6 +pixel5 * 2^5 + pixel4 * 2^4 +pixel3 * 2^3 + pixel2 * 2^2 + pixel1 * 2 + pixel0);
end
end
subplot(2,2,3);
imshow(localBinaryPatternImage, []);
title('Local Binary Pattern', 'FontSize', fontSize);
subplot(2,2,4);
[pixelCounts, GLs] = imhist(uint8(localBinaryPatternImage));
bar(GLs, pixelCounts);
title('Histogram of Local Binary Pattern', 'FontSize', fontSize);
This is my code after segmentation. I have attached the output. i need to now use bayes classification on the output to classify the wound into granulation , sloigh and necrotic tissue. some one please help me to code in matlab.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by