版块导航
正在加载中...
客户端APP下载
登录
注册
帖子
帖子
用户
本版
应《网络安全法》要求,自2017年10月1日起,未进行实名认证将不得使用互联网跟帖服务。为保障您的帐号能够正常使用,请尽快对帐号进行手机号验证,感谢您的理解与支持!
24小时热门版块排行榜
>
论坛更新日志
(4897)
>
导师招生
(552)
>
文献求助
(376)
>
硕博家园
(309)
>
虫友互识
(305)
>
论文投稿
(203)
>
考博
(167)
>
招聘信息布告栏
(162)
>
博后之家
(79)
>
休闲灌水
(68)
>
有机交流
(38)
>
绿色求助(高悬赏)
(34)
>
基金申请
(33)
>
考研
(33)
>
学术会议
(27)
>
公派出国
(27)
小木虫论坛-学术科研互动平台
»
网络生活区
»
有奖问答
»
学术帮助
»
求circle segment可视化代码
2
1/1
返回列表
查看: 781 | 回复: 1
只看楼主
@他人
存档
新回复提醒
(忽略)
收藏
在APP中查看
CSJ815
新虫
(初入文坛)
应助: 0
(幼儿园)
金币: 90
帖子: 13
在线: 5.8小时
虫号: 3768532
注册: 2015-03-27
专业: 机构学与机器人
[
求助
]
求circle segment可视化代码
求circle segment可视化实现代码,最好是matlab写的。
回复此楼
» 收录本帖的淘帖专辑推荐
程序
» 猜你喜欢
各位大神,目前国内有哪些比较好用的逆合成软件?
已经有14人回复
国社科系统bug了,是不是要放榜了?
已经有10人回复
现代”学阀”该如何界定
已经有9人回复
课题组招2027级博士 上海工程技术大学 激光智能制造方向
已经有4人回复
上海工程技术大学 激光智能制造课题组 2027级博士研究生招生
已经有3人回复
上海工程技术大学激光智能制造课题组|2027级博士研究生招生公告
已经有11人回复
申博发邮件
已经有11人回复
我的奶奶
已经有3人回复
高级回复
1楼
2016-10-09 16:01:12
已阅
回复此楼
关注TA
给TA发消息
送TA红花
TA的回帖
FMStation
至尊木虫
(知名作家)
博学EPI: 15
应助: 591
(博士)
贵宾: 0.03
金币: 18767.2
红花: 97
帖子: 8891
在线: 1498.1小时
虫号: 2400059
注册: 2013-04-04
专业: 计算机应用技术
【答案】应助回帖
CODE:
% Demo to write an ellipse into the overlay of an image,
% and then to burn those overlays into the image.
%----- Initializing steps -----
% Clean up
clc;
clear all;
close all;
fontSize = 14;
workspace; % Display the workspace panel.
% Change the current folder to the folder of this m-file.
if(~isdeployed)
cd(fileparts(which(mfilename)));
end
hasIPT = license('test', 'image_toolbox');
if ~hasIPT
% User does not have the toolbox installed.
message = sprintf('Sorry, but you do not seem to have the Image Processing Toolbox.\nDo you want to try to continue anyway?');
reply = questdlg(message, 'Toolbox missing', 'Yes', 'No', 'Yes');
if strcmpi(reply, 'No')
% User said No, so exit.
return;
end
end
% Display images to prepare for the demo.
monochromeImage = imread('pout.tif');
subplot(2, 3, 1);
imshow(monochromeImage);
title('Original Image', 'FontSize', fontSize);
subplot(2, 3, 2);
imshow(monochromeImage);
title('Draw ellipse in overlay here', 'FontSize', fontSize);
set(gcf, 'units','normalized','outerposition',[0 0 1 1]); % Maximize figure.
set(gcf,'name','Image Analysis Demo of imellipse() function','numbertitle','off')
%----- Burn ellipse into image -----
% Create elliptical mask, h, as an ROI object over the second image.
subplot(2, 3, 2);
userPrompt = sprintf(' Click and drag out an ellipse.\nDouble click inside of it to accept it.');
uiwait(msgbox(userPrompt));
hEllipse = imellipse(gca); % Second argument defines ellipse shape and position.
% Wait for user to finalize the size and location.
xyCoordinates = wait(hEllipse)
% Create a binary image ("mask") from the ROI object.
binaryImage = hEllipse.createMask();
% Display the ellipse mask.
subplot(2, 3, 3);
imshow(binaryImage);
title('Binary mask of the ellipse', 'FontSize', fontSize);
% Burn white ellipse into image by setting it to 255 wherever the mask is true.
outputImage = monochromeImage; % Re-initialize it.
outputImage(binaryImage) = 255;
% Display the image with the "burned in" ellipse.
subplot(2, 3, 4);
imshow(outputImage);
title('New image with ellipse burned into image', 'FontSize', fontSize);
% Burn black ellipse into image by setting it to 0 wherever the mask is true.
outputImage = monochromeImage; % Re-initialize it.
outputImage(binaryImage) = 0;
% Display the image with the "burned in" ellipse.
subplot(2, 3, 5);
imshow(outputImage);
title('New image with ellipse burned into image', 'FontSize', fontSize);
% Erase image outside of ellipse into image by setting it to 0 wherever the mask is true.
outputImage = monochromeImage; % Re-initialize it.
outputImage(~binaryImage) = 0;
% Display the image with the "burned in" ellipse.
subplot(2, 3, 6);
imshow(outputImage);
title('Image erased outside of ellipse', 'FontSize', fontSize);
赞
一下
回复此楼
2楼
2016-10-09 23:12:39
已阅
回复此楼
关注TA
给TA发消息
送TA红花
TA的回帖
相关版块跳转
休闲灌水
虫友互识
文学芳草园
育儿交流
竞技体育
有奖起名
有奖问答
健康生活
我要订阅楼主
CSJ815
的主题更新
2
1/1
返回列表
如果回帖内容含有宣传信息,请如实选中。否则帐号将被全论坛禁言
普通表情
龙
兔
虎
猫
百度网盘
|
360云盘
|
千易网盘
|
华为网盘
在新窗口页面中打开自己喜欢的网盘网站,将文件上传后,然后将下载链接复制到帖子内容中就可以了。
信息提示
关闭
请填处理意见
关闭
确定