Table 4: Recognition algorithm (leeImage function).

function [identificador] = leeImagen(file)
pkg image load;
% This part reads the file of the image that will be classified by the% recognition program.
RGB = imread (file);
% The RGB image is passed in grayscale, that is, the original image with its component% Red, Green, and Blue
I = rgb2gray (RGB);
% In this stage, the image that is in ray scale is binarized. This operation passes% first from the format uint8 to double. Having this format, the scale of gray% is compared with the threshold 0.2. Values above 0.2 become! (white) and below% 0 (black).
BW = im2bw(I,0.2);
% The image is displayed
% imshow (BW)
% The bwlabel command labels the binary image, such that it establishes contiguous (neighboring) zones to determine the regions.
abeledImage = bwlabel (BW);
% The regionprops function allows for the determination of the geometric descriptors of the figures obtained, after binarizing the images. The areas are found, as well as the perimeters that are essential% to initially identify the circular regions. This descriptor
allows the% fungi types to be differentiated. Thus, for example, the circular area of a Candida% albicans fungus differentiates it from a parapsilosis fungus%.
measurements = regionprops (labeledImage, 'Area', 'Perimeter');
allAreas = [measurements.Area];
allPerims = [measurements.Perimeter];
circularities = allPerims. ^ 2./ (4 * pi * allAreas);
blobMeasurements = regionprops (labeledImage, 'BoundingBox', 'Area');
allBlobAreas = [blobMeasurements.Area];
% Find objects that have “round” values of circularities.
roundObjects = find (circularities <4); % Whatever value you want.
% Compute new binary image with only the round objects in it.
binaryImage = ismember (labeledImage, roundObjects)> 0;
identificador = find(circularities < 4 & allBlobAreas > 10000);
%figure(2)
%imshow(binaryImage);
Endfunction
% In this stage, the images that are being loaded to the application% are simply classified according to the identifier that has been defined for the fungi in the function.
% clear all; clc;
# not a function file:
pkg image load;
file = 'ima.jpg';
[identifier] = readImage (file);
if length (identifier) == 1 && (identifier <10)
disp (“The fungus is Candida parapsilosis”)
elseif length (identifier) == 1 && (identifier> 20) && (identifier <30)
disp (“The fungus is Candida albicans”)
elseif length (identifier> 100)
disp (“The fungus is Candida kefyR”)
else
disp (“The fungus is Candida krusei”)
endif
fflush.stdout ()