当前位置: 首页 > news >正文

北京软件开发外包百度刷排名seo软件

北京软件开发外包,百度刷排名seo软件,网站建设添加视频教程,怎么注册网络平台做材料与生物相关方向的同学应该对image-j并不陌生#xff0c;前几天有个师兄拜托我用image-j分析一些图片#xff0c;但使用过后发现我由于不了解image-j的工作流程而对结果并不确信#xff0c;而且image-j的功能无法拓展#xff0c;对有些图片的处理效果并不好#xff0…做材料与生物相关方向的同学应该对image-j并不陌生前几天有个师兄拜托我用image-j分析一些图片但使用过后发现我由于不了解image-j的工作流程而对结果并不确信而且image-j的功能无法拓展对有些图片的处理效果并不好因此我想到自己用matlab实现类似的功能虽然没有友好的互动界面但好在大家可以以此为基础自己设计功能更好得适配自己的研究方向。 测试文件与源程序下载地址提取码: tcxa 视频教程B站 ⏰V1.0目前支持的功能 图像的开闭运算分别对应分离细小连接与填充细小空洞 二值化支持单个自动阈值、单个手动阈值、手动区间阈值 筛选颗粒支持基于圆度筛选、基于面积大小筛选 图像统计支持颗粒占全图比例、图像真实面积、颗粒真实面积、颗粒数量统计 下载后设置好matlab的工作目录 打开main.m文件开始使用我把所有需要修改的地方都放在最前面 建议一开始使用测试图片的时候对这两项做如下设置 auto_segmentation true; %是否使用自动阈值分割 Interval_segmentation false; %是否使用区间阈值分割完整代码 clear clc close all;%关闭图片 %% 这里是需要修改的 image_dir test.png; %读取文件修改为你图片的名字 fill_image false; %是否要填充图像true会开启膨胀加腐蚀 separate_image false; %是否要分离图像true会开启腐蚀加膨胀 SE1 strel(square,8); %得到边长为13的方形结构元腐蚀和膨胀的结构元大小,可以调整的大小看看效果点密集时候需要调整,dense_image为false时无效 colors [0,255,0]; %调颜色默认红色auto_segmentation false; %是否使用自动阈值分割 level 200; %二值化阈值auto_segmentation为true时该值无效Interval_segmentation false; %是否使用区间阈值分割 lowerThreshold 25; %区间阈值分割下限Interval_segmentation为false时该值无效 upperThreshold 61; %区间阈值分割上限Interval_segmentation为false时该值无效desiredCircularity_bottom 0.0; %设置所需的圆度阈值下限,越大越圆范围0-1 modify_threshold_top false; %是否需要修改圆度阈值上限 desiredCircularity_top 0.6; %圆度阈值上限值threshold_top_modify为false时该值无效ruler_val 50; %比例尺标量值 unit um^2; %比例尺单位 ruler_l 557; %比例尺左端像素位置x ruler_r 744; %比例尺右端像素位置xparticle_area_thres 0; %颗粒大小阈值下限单位为unit %% 预处理 imagetest1 imread(image_dir); imagetest_copy imagetest1; mysizesize(imagetest1);if numel(mysize) 2imagetest1 cat(3,imagetest1,imagetest1,imagetest1); %将灰度图像转换为彩色图像imagetest_copy cat(3,imagetest_copy,imagetest_copy,imagetest_copy); end imagetest1 rgb2gray(imagetest1); imagetest1_copy imagetest1;imshow(imagetest_copy) impixelinfo%通过左下角的提示看比例尺坐标%Filter fspecial(average,[3,3]);% gausFilter1 fspecial(gaussian,[7,7],0.6); % imagetest1 imfilter(imagetest1,gausFilter1); % imagetest_copy_Gau imagetest1;%imagetest_copy rgb2gray(imagetest_copy); %I2 im2bw(imagetest1, 0.25);if auto_segmentationfprintf(2,注意你使用了自动阈值\n);level graythresh(imagetest1); imagetest1 imbinarize(imagetest1, level); elseif (~auto_segmentation~Interval_segmentation)fprintf(2,注意你使用了手动阈值\n);imagetest1 imbinarize(imagetest1, level/255); endif Interval_segmentationfprintf(2,注意你使用了区间阈值\n);imagetest1 (imagetest1_copy lowerThreshold) (imagetest1_copy upperThreshold);%区间二值化 end %% 腐蚀加膨胀 if fill_imagefprintf(2,注意你开启了填充\n)imagetest1 imdilate(imagetest1,SE1);imagetest1 imerode(imagetest1,SE1); end if separate_imagefprintf(2,注意你开启了分离\n)imagetest1 imerode(imagetest1,SE1); imagetest1 imdilate(imagetest1,SE1); end %% 圆度筛选封闭区域 labeledImage bwlabel(imagetest1);%封闭空间标签 props regionprops(labeledImage, Area, Perimeter);%实例化 circularity (4 * pi * [props.Area]) ./ ([props.Perimeter].^20.0001);%求圆度if ~modify_threshold_topdesiredCircularity_top max(circularity);% 设置所需的圆度阈值上限一般不用动 end selectedLabels find((desiredCircularity_top circularity) (circularity desiredCircularity_bottom)); selectedImage ismember(labeledImage, selectedLabels);%根据圆度值做筛选 fprintf(2,[圆度阈值设置为:,num2str(desiredCircularity_bottom),-,num2str(desiredCircularity_top),\n]); fprintf(2,[面积阈值设置为:,num2str(particle_area_thres),unit,\n]) %% 展示结果 figure subplot(2,2,1); %imshow(imagetest1); imshow(imagetest_copy);%原图 subplot(2,2,2); imhist(imagetest_copy)subplot(2,2,3); %imshow(imagetest_copy_Gau); imshow(selectedImage);%展示筛选圆度之后的图像 %% 求解与图像结果美化 sum1 sum(selectedImage(:));%求像素总数 m size(imagetest_copy,1); n size(imagetest_copy,2); sum2 m * n;%原图总像素数 Proportion sum1/sum2;%求比例 disp([所选区域占全图的比例:,num2str(Proportion*100),%]) real_area m * n * (ruler_val / (ruler_r - ruler_l))^2; disp([全图真实面积:,num2str(real_area),unit]) disp([选区真实面积:,num2str(real_area*Proportion),unit])R imagetest_copy(:,:,1); G imagetest_copy(:,:,2); B imagetest_copy(:,:,3);%默认红色 R(selectedImage)colors(1); G(selectedImage)colors(2); B(selectedImage)colors(3); image_outputcat(3,R,G,B); % I double(selectedImage).*double(I) % image_output imfuse(imagetest_copy,I)subplot(2,2,4); imshow(image_output)%原图与红色mask的叠加image_output uint8(image_output); imwrite(image_output,result.png)%保存selectedImage_copy selectedImage;%二值化图像 particle_area regionprops(selectedImage_copy, Area);%实例化 disp([颗粒总数根据圆度筛选后:,num2str(size(particle_area,1)),个]) particle_area_val [particle_area.Area]*(ruler_val / (ruler_r - ruler_l))^2;%真实世界的面积vector_particle []; for i 1:size(particle_area_val,2)if particle_area_val(i) particle_area_thresvector_particle [vector_particle, particle_area_val(i)];end end labeledImage_2 bwlabel(selectedImage_copy);%封闭空间标签 selectedLabels_2 find(particle_area_val particle_area_thres); selectedImage_copy ismember(labeledImage_2, selectedLabels_2);%根据面积做筛选figure imshow(selectedImage_copy)mean_particle_real mean(vector_particle); disp([根据面积筛选后颗粒个数:,num2str(size(selectedLabels_2,2))]) disp([根据面积筛选后平均颗粒真实面积:,num2str(mean_particle_real),unit])
http://www.yutouwan.com/news/88352/

相关文章:

  • 莱州网站建设263企业邮箱入口登录找回密码
  • 石岩网站设计哪里有网站建设加工
  • 小昆山网站建设鲜花网站建设的主要工作流程
  • 自己怎么做网站免费的wordpress播放百度云
  • 万维网域名注册网站优化推广网站排名
  • 网站建设提高信息wordpress电子邮件注册
  • 如何建立一个学校网站制作京东一样的网站
  • 分销系统商城定制开发西安seo培训学校
  • 成都网站排名优化开发网站设计公司建设
  • wordpress 图片显示插件下载seo外链网
  • 网站怎么做子页网站建设与管理是干什么的
  • 浦江网站建设微信开发开发公司资质查询
  • ppt网站超链接怎么做wordpress去顶部文字
  • 做网站最快多久网站系统安全性
  • 网站开发合同知识产权国外网站流量查询
  • 揭阳做网站建设公司贵阳论坛网站建设
  • 开封网站seo广东网站建设联系电话
  • 网站建设的七大优缺点公司网页设计图
  • 购买网站空间后怎么做设计制作实践活动感悟
  • 手机网站电话漂浮代码东莞人才市场招聘会时间
  • 网站应该设计成什么样h5打开小程序
  • 如何给自己网站做反链wordpress导入主题慢
  • 网站开发与设计入门门户网站seo
  • 网站的二级页面怎么做代码软件项目管理工作内容
  • 需要服务器的网站如何做一个单页的网站
  • 黑龙江省建设银行官网站首页自贡住房和城乡建设厅网站
  • 如何用凡科做自己的网站怎么样推广网站
  • 建好网站后最怎么维护网站注册怎么做屏蔽过滤
  • 辽阳网站建设学校百度公司做网站服务
  • 什么类型客户做网站互联网医疗