Running the Code:
% Maximum Image size 128 by 128
I=imread('Lenna.jpg');
pad=3;
MAXVAL=255;
[Ncut] = graphcuts(I,pad,MAXVAL)
% function [Ncut] = graphcuts(I)
% Input: I image
% pad: spatial connectivity; eg. 3
% MAXVAL: maximum image value
% Output: Ncut: Binary map 0 or 1 corresponding to image segmentation
引用格式
Amarjot (2024). Graph Cut for image Segmentation (https://www.mathworks.com/matlabcentral/fileexchange/40669-graph-cut-for-image-segmentation), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
创建方式
R2008a
兼容任何版本
平台兼容性
Windows macOS Linux类别
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Image Segmentation >
在 Help Center 和 MATLAB Answers 中查找有关 Image Segmentation 的更多信息
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!