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

📄 growcut.m

📁 对图形图像进行切割的算法
💻 M
字号:
%  [labels strengths] = growcut(img, labels)%%  GrowCut algorithm%  from "GrowCut" - Interactive Multi-Label N-D Image Segmentation%       By Cellular Autonoma%  by Vladimir Vezhnevets and Vadim Konouchine%%  usage: [labels, strengths] = growcutmex(image, labels)%         image can be RGB or grayscale%         labels has values: -1 (bg), 1 (fg), or 0 (undef.)% %         resulting labels will be either 0 (bg) or 1 (fg)%         resulting strengths will be between 0 and 1%%  coded by: Shawn Lankton (www.shawnlankton.com)function [l s] = growcut(img, labels)    img = double(img);  si = size(img);  sl = size(labels);  assert(numel(unique(labels))==3,...         'labels must be comprised of -1, 0, 1');  assert(all(sl(1:2)==si(1:2)),...         'labels and image must be the same size');    [l s] = growcutmex(img,labels);  

⌨️ 快捷键说明

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