I am using the following code to try to differentiate two types of cells. One is circular, and the other is oval to oblong. I have about 100 images of each cell type, and have attached one each .jpg image to this question.
When I run the following code for Ck1.jpg, the rgb2gray image shows that my cell no longer has a continuous boundary. As a result, the code cannot tell what shape this cell has. Unfortunately, all the images I have are not high enough resolution. I was wondering if there was someway to interpolate the cell boundary based on however much is preserved after converting rgb image to gray.
I would greatly appreciate any help or feedback. Thank you!
ipath = 'D:\3) Candida yeast measurement\4) Multi Frequency Measurement - 100 Data Points\5) Ca versus Ck\';
image_read = imread(strcat(ipath,fid));
image_RGB = imshow(image_read);
image_gray = rgb2gray(image_read);
B_W = imbinarize(image_gray);
[B,L] = bwboundaries(BW,'holes');
imshow(label2rgb(L,@jet,[.5 0 .5]))
stats = regionprops(L,'Area','Centroid');
delta_sq = diff(boundary).^2;
perimeter = sum(sqrt(sum(delta_sq,2)));
metric = 4*pi*area/perimeter^2;
metric_string = sprintf('%2.2f',metric);