⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdf2circle.m

📁 实现无边界主动轮廓的的很好的算法
💻 M
字号:
function f = sdf2circle(nrow,ncol, ic,jc,r)
%   sdf2circle(nrow,ncol, ic,jc,r) computes the signed distance to a circle
%   input: 
%       nrow: number of rows
%       ncol: number of columns
%       (ic,jc): center of the circle
%       r: radius of the circle
%   output: 
%       f: signed distance to the circle
%  
%   created on 04/26/2004
%   author: Chunming Li
%   email: li_chunming@hotmail.com
%   Copyright (c) 2004-2006 by Chunming Li


[X,Y] = meshgrid(1:ncol, 1:nrow);

f = sqrt((X-jc).^2+(Y-ic).^2)-r;

%f=sdf2circle(100,50,51,25,10);figure;imagesc(f)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -