필터 지우기
필터 지우기

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일)
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