Graph Cut for image Segmentation

The code segments the grayscale image using graph cuts.

您现在正在关注此提交

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 (2026). Graph Cut for image Segmentation (https://ww2.mathworks.cn/matlabcentral/fileexchange/40669-graph-cut-for-image-segmentation), MATLAB Central File Exchange. 检索时间: .

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.1.0.0

I added the maximum image size for which the code runs without error.

1.0.0.0