I need to count cell nucleus in these images how can I do that

2 visualizzazioni (ultimi 30 giorni)
Can I get a code in image processing field to count the cells’ nucleus from these photos

Risposte (1)

Vinayak Agrawal
Vinayak Agrawal il 15 Giu 2023
Hi Asia,
Yes, here is an example code in MATLAB for counting the cells' nucleus from a JPEG photo:
% Load the image
img = imread('cells.jpg');
% Convert the image to grayscale
grayimg = rgb2gray(img);
% Apply a median filter to remove noise
medimg = medfilt2(grayimg);
% Enhance contrast using histogram equalization
equalizedimg = histeq(medimg);
% Segment the image using adaptive thresholding
thresimg = adaptthresh(equalizedimg, 0.3);
binaryimg = imbinarize(equalizedimg, thresimg);
% Remove small objects from the binary image
binaryimg = bwareaopen(binaryimg, 10);
% Find the connected components in the binary image
cc = bwconncomp(binaryimg);
% Count the number of cells' nucleus
nucleusCount = cc.NumObjects;
% Display the results
figure;
subplot(2,2,1); imshow(img); title('Original Image');
subplot(2,2,2); imshow(medimg); title('Grayscale Image with Median Filtering');
subplot(2,2,3); imshow(equalizedimg); title('Contrast Enhanced Image');
subplot(2,2,4); imshow(binaryimg); title(['Detected Nuclei: ', num2str(nucleusCount)]);
You may need to adjust the parameters of the image processing functions and methods used in this code to obtain the desired results for your input image. Also, note that this code assumes a certain level of expertise in image processing and MATLAB programming
Hope it helps

Categorie

Scopri di più su Biomedical Imaging in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by