【细胞分割】原子力显微镜图像分析【含GUI Matlab源码 1371期】

news2024/9/25 19:24:41

⛄一、AFM简介

理论知识参考文献:原子力显微镜(AFM)图像的计算机辅助分析

⛄二、部分源代码

function varargout = AFManalysis(varargin)
% AFMANALYSIS M-file for AFManalysis.fig
% AFMANALYSIS, by itself, creates a new AFMANALYSIS or raises the existing
% singleton*.
%
% H = AFMANALYSIS returns the handle to a new AFMANALYSIS or the handle to
% the existing singleton*.
%
% AFMANALYSIS(‘CALLBACK’,hObject,eventData,handles,…) calls the local
% function named CALLBACK in AFMANALYSIS.M with the given input arguments.
%
% AFMANALYSIS(‘Property’,‘Value’,…) creates a new AFMANALYSIS or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before AFManalysis_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to AFManalysis_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE’s Tools menu. Choose “GUI allows only one
% instance to run (singleton)”.
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help AFManalysis

% Last Modified by GUIDE v2.5 07-Dec-2010 22:56:55

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name’, mfilename, …
‘gui_Singleton’, gui_Singleton, …
‘gui_OpeningFcn’, @AFManalysis_OpeningFcn, …
‘gui_OutputFcn’, @AFManalysis_OutputFcn, …
‘gui_LayoutFcn’, [] , …
‘gui_Callback’, []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% — Executes just before AFManalysis is made visible.
function AFManalysis_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to AFManalysis (see VARARGIN)

% Choose default command line output for AFManalysis
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes AFManalysis wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% — Outputs from this function are returned to the command line.
function varargout = AFManalysis_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

% — Executes on button press in pushbuttonBrowse.
function pushbuttonBrowse_Callback(hObject, eventdata, handles)
[FileName,PathName] = uigetfile(‘*.jpg’,‘Select the image file’);

if PathName ~= 0 %if user not select cancel
addpath(PathName); %add path to file search
imagearray = imread(FileName);
handles.imagesize = size(imagearray);
axes(handles.Image);
imshow(imagearray,‘InitialMagnification’,‘fit’);
%handles.imagegray = rgb2gray(imagearray);
handles.imagearray = imagearray;
guidata(hObject, handles);

end
% hObject handle to pushbuttonBrowse (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% — Executes during object creation, after setting all properties.
function Image_CreateFcn(hObject, eventdata, handles)
handles.Image= hObject;
imshow(‘square.png’);
guidata(hObject, handles);
% hObject handle to Image (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: place code in OpeningFcn to populate Image

% — Executes on slider movement.
function sliderimthreshhold_Callback(hObject, eventdata, handles)
s = handles.imagesize;
handles.slidervalth = get(handles.sliderth,‘Value’);
handles.imagebin = im2bw(handles.imagearray, 1-handles.slidervalth);
handles.imagebin = bwareaopen(handles.imagebin, round(s(1,1)*handles.slidervalfilter));

bouparam = str2num(get(handles.boundrypara,‘string’));
h = fspecial(‘gaussian’,bouparam,bouparam);
handles.imagebin = imfilter(handles.imagebin,h);
handles.imageedge = edge(handles.imagebin);

imagewithboundry = handles.imagearray;
for i = 1:1:s(1,1)
for j = 1:1:s(1,2)
if handles.imageedge(i,j) == 1
imagewithboundry(i,j,:)= 0;

    end
end

end
%imagewithboundry = imadd(handles.imagearray(:,:,1), handles.imageedge);
imshow(imagewithboundry,‘InitialMagnification’,‘fit’);

[L, num] = bwlabel(handles.imagebin);
area = bwarea(handles.imagebin)/num;
dia = ((area*6)/pi)^(1/3);

dianm = dia*(str2num(get(handles.imagesizenm,‘string’))/s(1,1));

num = num2str(num);
set(handles.npno,‘string’,num)

areanm = (pi/6)*((dianm)^3);
areanm = num2str(areanm);
set(handles.nparea,‘string’,area)

dianm = num2str(dianm);
set(handles.npdia,‘string’,dianm)

guidata(hObject, handles);

% hObject handle to sliderimthreshhold (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,‘Value’) returns position of slider
% get(hObject,‘Min’) and get(hObject,‘Max’) to determine range of slider

% — Executes during object creation, after setting all properties.
function sliderimthreshhold_CreateFcn(hObject, eventdata, handles)
handles.sliderth = hObject;
%handles.imagebin = im2bw(handles.image,0);
guidata(hObject, handles);
% hObject handle to sliderimthreshhold (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,‘BackgroundColor’), get(0,‘defaultUicontrolBackgroundColor’))
set(hObject,‘BackgroundColor’,[.9 .9 .9]);
end

% — Executes on slider movement.
function sliderremovesmallpatch_Callback(hObject, eventdata, handles)
s = handles.imagesize;
handles.slidervalth = get(handles.sliderth,‘Value’);
handles.slidervalfilter = get(handles.sliderremovesmallpatch,‘Value’);
%handles.imagebin = im2bw(handles.imagearray, 1-handles.slidervalth);
handles.imagebin2 = bwareaopen(handles.imagebin, round(s(1,1)*handles.slidervalfilter));
handles.imageedge = edge(handles.imagebin2);
imagewithboundry = handles.imagearray;
for i = 1:1:s(1,1)
for j = 1:1:s(1,2)
if handles.imageedge(i,j) == 1
imagewithboundry(i,j,:)= 0;

    end
end

end

imshow(imagewithboundry,‘InitialMagnification’,‘fit’);

[L, num] = bwlabel(handles.imagebin2);
area = bwarea(handles.imagebin)/num;
dia = ((area*6)/pi)^(1/3);

dianm = dia*(str2num(get(handles.imagesizenm,‘string’))/s(1,1));

num = num2str(num);
set(handles.npno,‘string’,num)

areanm = (pi/6)*((dianm)^3);
areanm = num2str(areanm);
set(handles.nparea,‘string’,area)

dianm = num2str(dianm);
set(handles.npdia,‘string’,dianm)

guidata(hObject, handles);

% hObject handle to sliderremovesmallpatch (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,‘Value’) returns position of slider
% get(hObject,‘Min’) and get(hObject,‘Max’) to determine range of slider

% — Executes during object creation, after setting all properties.
function sliderremovesmallpatch_CreateFcn(hObject, eventdata, handles)
handles.sliderremovesmallpatch = hObject;
handles.slidervalfilter = 0;
guidata(hObject, handles);
% hObject handle to sliderremovesmallpatch (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,‘BackgroundColor’), get(0,‘defaultUicontrolBackgroundColor’))
set(hObject,‘BackgroundColor’,[.9 .9 .9]);
end

⛄三、运行结果

在这里插入图片描述

⛄四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1]王轶文,谢建明,张惠,孙啸,陆祖宏.原子力显微镜(AFM)图像的计算机辅助分析[J].山东生物医学工程. 2002,(03)

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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/97661.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【图像处理】高效斑点特征提取技术研究(Matlab代码实现)

👨‍🎓个人主页:研学社的博客 💥💥💞💞欢迎来到本博客❤️❤️💥💥 🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜…

10年经验Python老司机分享:转行如何自学Python并且找到工作?

目前信息化产业发展势头很好,互联网就成为了很多普通人想要涉及的行业,因为相比于传统行业,互联网行业涨薪幅度大,机会也多,所以就会大批的人想要转行来学习Python开发。 零基础学习Python必须明确的几点: …

5个千兆网口,将有什么样高速网络传输体验?——米尔MYD-J1028X开发板实测分享

本篇测评由电子工程世界的优秀测评者“HonestQiao ”提供。 此次的板卡测试,是米尔MYD-J1028X开发板的高速网络数据传输测试体验。 01 本次测试的主角 米尔MYD-J1028X开发板提供了5个超级给力的最高支持千兆网络接口,具体如下: 通过查看官…

基于AD936X+Intel FPGA的射频方案

基于ADI AD936X和Intel Cyclone V FPGA的射频方案,适合于无线通信基础设施、防务电子系统、RF测试设备和仪器以及通用软件定义无线电平台等应用。 关于ADI AD936X系列射频收发器 AD936X系列的工作频率范围覆盖从70 MHz到6 GHz。它是一系列完整的无线电设计&#x…

底层网络知识详解:最重要的传输层-第11讲-TCP协议(上):因性恶而复杂,先恶后善反轻松

上一节,我们讲的UDP,基本上包括了传输层所必须的端口字段。它就像我们小时候一样简单,相信“网之初,性本善,不丢包,不乱序”。 后来呢,我们都慢慢长大,了解了社会的残酷,变得复杂而成熟,就像TCP协议一样。它之所以这么复杂,那是因为它秉承的是“性恶论”。它天然认…

Dubbo 4 Dubbo 高级特性 4.2 Dubbo 常用高级配置 4.2.7 集群容错 4.2.8 服务降级

Dubbo 【黑马程序员Dubbo快速入门,Java分布式框架dubbo教程】 4 Dubbo 高级特性 文章目录Dubbo4 Dubbo 高级特性4.2 Dubbo 常用高级配置4.2.7 集群容错4.2.8 服务降级4.2 Dubbo 常用高级配置 4.2.7 集群容错 【一个场景】 现在 服务 提供者 部署成 了一个集群&a…

痞子衡嵌入式:我被邀请做科锐国际旗下数科同道主办的技术沙龙嘉宾

「数科同道」是「科锐国际」旗下的面向技术开发者的专属垂直招聘平台。《数科同道技术沙龙》是由数科同道主办的活动,每期活动邀请行业内及其他知名公司的技术专家分享来自一线的实践经验。自2022年12月起,数科同道将在苏州,聚焦嵌入式行业及…

【Cadence Virtuoso】IC617 入门操作 (MOS特性分析)

Cadence Virtuoso IC617 入门操作篇前言一、软件操作(1)创建自己的Library(2)创建Library下的 Cell二、电路搭建(1)调出器件三、电路仿真(1)打开仿真工具“ADE L”(2) 对参数进行赋值…

【MATLAB教程案例63】学习如何建立自己的深度学习训练样本库,包括分类识别数据库和目标检测数据库

欢迎订阅《FPGA学习入门100例教程》、《MATLAB学习入门100例教程》 目录 1.软件版本 2.建立自己的深度学习训练样本库1——分类识别数据库

纯精华、二十八道BATJ大厂Java岗之“多线程与并发“面试题分享

年底了,又到了跳槽季啦,该刷题走起了。这里总结了一些被问到可能会懵逼的面试真题,有需要的可以看下~ 一、进程与线程 进程是资源分配的最小单位,线程是cpu调度的最小单位。线程也被称为轻量级进程。 所有与进程相关…

内存读写指令 —— LDR / STR

CPU在处理C语言的 a 操作时,变量a因为是放在在内存里的,需要先把a从内存中读取到寄存器中,运算完毕后再保存到内存中。 因此,这个过程中肯定需要用到内存的读写指令。 目录 1、基本内存读写指令(4个字节读写&#xf…

路由声明式传参和编程式传参

声明式传参(使用带href /或本质上是a标签的时候) 直接带路径里带携带参数 下例 在地址栏是可以看到参数的(querys传参) 在vue.tools插件里可以观察到 取出路径参数的方式 params传参 首先需要在路由规则里配置 下图(复制这行路由规则&am…

Day43——Dp专题

文章目录股票问题篇21、买卖股票的最佳时机22、买卖股票的最佳时机II23、买卖股票的最佳时机Ⅲ24、买卖股票的最佳时机Ⅳ25、最佳买卖股票时机含冷冻期26、买卖股票的最佳时机含手续费股票问题总结篇股票问题篇 21、买卖股票的最佳时机 力扣题目链接 动态规划 定义二维数组…

【GRU回归预测】基于matlab粒子群算法优化门控循环单元PSO-GRU神经网络回归预测(多输入单输出)【含Matlab源码 2286期】

⛄一、CNN-GRU数据预测 1 理论基础 1.1 CNN算法 负荷序列数据为一维数据,用一维卷积核对数据进行卷积处理,以获取数据的特征。 现设定卷积核的维度为3,移动步长为1,对输入数据进行卷积,以获得特征图图谱,即…

WordCount 案例实操

文章目录WordCount 案例实操一、案例需求二、案例分析三、代码实现1、Map阶段代码WordCount 案例实操 一、案例需求 1、需求:在给定的文本文件中统计输出每一个单词的总次数 2、期望输出数据 atguigu 2 banzhang 1 cls 2 hadoop 1 jiao 1 ss 2 xue 1 二、案例分…

java和springboot开发祭祀小程序扫墓系统代祭小程序

介绍 绿色祭祀小程序,用户微信授权登录后可以发布纪念馆(祭祀名人,祭祀英烈,祭祀个人,可以设置成公开状态或者隐私状态)购买祭祀礼物和留言,用户还可以发布代祭的信息 演示视频 小程序 https:…

计算机毕业设计ssm+vue基本微信小程序的购物商城小程序

项目介绍 随着互联网的趋势的到来,各行各业都在考虑利用互联网将自己的信息推广出去,最好方式就是建立自己的平台信息,并对其进行管理,随着现在智能手机的普及,人们对于智能手机里面的应用购物平台小程序也在不断的使用,本文首先分析了购物平台小程序应用程序的需求,从系统开发…

Spark SQL执行计划到RDD全流程记录

目录 0、样例说明 1、解析词义,语义,生成语法树 1.1、概念 1.2、根据样例跟踪Spark代码 2、Unresolved Logical Plan 3、Analyzed Logical Plan 源码 SessionCatalog Analyzer Rule Batch 对比 4、Optimized Logical Plan 5、Physical Plan …

vue3组件基础,组件引用与使用、向子组件传递数据与事件prop、emit

vue3组件基础&#xff0c;组件引用与使用、向子组件传递数据与事件prop、emit 一、组件模板 组成&#xff1a;template(必要)&#xff0c;script&#xff0c;style 例子&#xff1a;模板名称 Hello.vue <template><div class"msgStyle">{{ msg }}</di…

Java项目:ssm校园在线点餐系统源码

作者主页&#xff1a;源码空间站2022 简介&#xff1a;Java领域优质创作者、Java项目、学习资料、技术互助 文末获取源码 项目介绍 系统主要分为前台和后台&#xff0c;分为管理员与普通用户两种角色&#xff1b; 前台主要功能有&#xff1a;用户注册、用户登录、我的购物车、…