【细胞计数】机器视觉细胞计数【含Matlab源码 5131期】

在这里插入图片描述

⛄一、获取代码方式

获取代码方式1:
完整代码已上传我的资源:【细胞计数】基于matlab机器视觉细胞计数【含Matlab源码 5131期】
点击上面蓝色字体,直接付费下载,即可。

获取代码方式2:
付费专栏Matlab图像处理(初级版)

备注:
点击上面蓝色字体付费专栏Matlab图像处理(初级版),扫描上面二维码,付费29.9元订阅海神之光博客付费专栏Matlab图像处理(初级版),凭支付凭证,私信博主,可免费获得1份本博客上传CSDN资源代码(有效期为订阅日起,三天内有效);
点击CSDN资源下载链接:1份本博客上传CSDN资源代码

⛄二、部分源代码

clc; clear; close all;

I = imread(‘Cells.tif’);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Using the multithresh function, we segment the image %
% and use 3 thresholds for this. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
level = multithresh(I, 3);
seg = imquantize(I, level);
seg(seg > 1) = 3;
seg(seg == 1) = 0;
seg(seg == 3) = 1;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Some cells are very close to each other %
% and are connected to each other after segmentation, %
% %
% In order to calculate the number of cells correctly, %
% we reduce the boundary of objects using the erosion method %
% to separate these cells. %
% %
% As a result, some cells, only a small part of which were %
% in the margin of the image, are removed. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SE1 = strel(‘square’,12);
IM1 = imerode(seg, SE1);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% My blabel function that The bw function has only one input argument, %
% which is an image whose pixel values are zero or one %
% %
% This function returns the output of a number, %
% which is the number of cells, %
% as well as an image in which the cells are labeled %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[count,im] = MY_bwlabel(IM1);

% Show each conected component colorful
coloredLabels = label2rgb(im, ‘hsv’, ‘k’, ‘shuffle’);

imshow(coloredLabels, [])
count

⛄三、运行结果

在这里插入图片描述
在这里插入图片描述

⛄四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 蔡利梅.MATLAB图像处理——理论、算法与实例分析[M].清华大学出版社,2020.
[2]杨丹,赵海滨,龙哲.MATLAB图像处理实例详解[M].清华大学出版社,2013.
[3]周品.MATLAB图像处理与图形用户界面设计[M].清华大学出版社,2013.
[4]刘成龙.精通MATLAB图像处理[M].清华大学出版社,2015.

3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除

  • 24
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Matlab领域

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值