How to write a function to identify between 6 different images?

I'm assigned to write a function which should be able to identify between image types (CT of Abdomen, Breast MRI, Chest CT and X ray, Hand X ray and Heat CT) by only using techniques like Image Segmentation, Texture Analysis and Shape Signature methods. NO ML/DL methods are allowed
The following Images are provided
a=imread('Head CT.jpeg'); %(All Images are 64x64px)
b=imread('Breast MRI.jpeg');
c=imread('Chest MRI.jpeg');
d=imread('Chest X Ray.jpeg');
e=imread('Hand X Ray.jpeg');
f=imread('Abdomen CT.jpeg');
imshow(a); title('Original Image')
imshow(b)
imshow(c)
imshow(d)
imshow(e)
imshow(f)
I have tried to Segment the image and followed it up with finding the boundaries and the centroid of the image
%Operation is shown for just one Image
level = graythresh(a);
BW = imbinarize(a,level);
imshow(BW,[]); title('Segmented Image')
GRAY1 = im2gray(a);
threshold1 = graythresh(GRAY1);
BW1 = im2bw(GRAY1, threshold1);
stats = regionprops(BW1, 'Centroid');
c = stats.Centroid;
boundary = bwboundaries(BW1)
boundary = 26×1 cell array
{ 3×2 double} { 25×2 double} { 2×2 double} {196×2 double} { 5×2 double} { 2×2 double} { 7×2 double} { 9×2 double} { 29×2 double} { 9×2 double} { 9×2 double} { 9×2 double} { 2×2 double} { 2×2 double} { 2×2 double} { 3×2 double}
thisBoundary = boundary{1};
x = thisBoundary(:,1);
y = thisBoundary(:,2);
distances = sqrt((x - c(1)).^2 + (y - c(2)).^2)
distances = 3×1
58.3374 59.0445 58.3374
I'm not sure how to proceed furthur to classify between the images. I initally thought after segmenting the image I would find the distance between the centroid of the image and the boundary and based on that I'll set up a threshold which will identify if the given image is of one particular type.
But after applying segmentation and finding the centroid and boundaries, I'm unable to proceed because some Images have no boundaries and some have mutiple centroid points.
Can someone help me with the algorithm and help to refine my thoughout process on how to proceed?
Thank you for your help!

Respuestas (1)

yanqi liu
yanqi liu el 16 de Nov. de 2021
sir, if not use ML or DeepLearning method,may be use the image segment and feature stat to classify
such as use texture、hist and so on

Productos

Versión

R2021a

Preguntada:

el 15 de Nov. de 2021

Respondida:

el 16 de Nov. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by