File Exchange

image thumbnail

Pairwise term for Graphcut

version 1.0 (1.66 KB) by

Very fast, vectorized code for calculating the pairwise term for algorithms like Graph cuts.



View License

This code is inspired by Steve's post on Neighborhood indexing:

Four-connected neighborhood implementing the color difference between adjacent pixels in RGB space as a way to encode to similarity.

1/(norm(I1(:)- I2(:))+1)


timeit(@() pairwise_term(imread('peppers.png')))

ans =


Please obtain the timeit function from here:

Comments and Ratings (0)

MATLAB Release
MATLAB 7.14 (R2012a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video