File Exchange

image thumbnail

Image Graphs

version 1.0 (219 KB) by

Functions to create and visualize graphs based on image pixel neighbor relationships



View License

Image Graphs is a collection of several functions to make and visualize graphs based on pixel neighbor relationships in an image. The functions imageGraph and imageGraph3 make graphs containing one node for every pixel in an image. The functions binaryImageGraph and binaryImageGraph3 make graphs containing one node for every foreground pixel in a binary image. The function adjacentRegionGraphs produces a graph from a label matrix. Edges in the graph represent adjacent labeled regions. The function plotImageGraph visualizes graphs produced by imageGraph and binaryImageGraph.
Image Graphs uses the graph functionality introduced in MATLAB R2015b.

Comments and Ratings (14)

Steve Eddins

Steve Eddins (view profile)

Mark -- This doc page might be helpful to you:

Mark Smith

Hi ! Is it possible to display (forward and backward ) connection values next to the edges ?

Philip Wang

could someone help me builing an 8-connected graph from an image as input. I need only some tips.

Steve Eddins

Steve Eddins (view profile)

Ronit - imageGraph and binaryImageGraph are part of this File Exchange submission, not part of MATLAB. You need to make sure you have downloaded this submission and put the submission folder on the MATLAB path.

Ronit Roy

I'm using the Matlab 2016b on a trial version. It works well for graph/digraph function but not with imageGraph or binaryImageGraph functions. when I type 'help imageGraph', it says 'imageGraph not found'. Why so..??


korkam (view profile)

Steve Eddins

Steve Eddins (view profile)

Jeremy, imageGraph and imageGraph3 don't need an image input argument, just the image size. binaryImageGraph and binaryImageGraph3 take binary images as input. adjacentRegionsGraph takes a label matrix as input.

Jeremy Slater

Probably just me being slow, but what kind of images will it accept as input?

Steve Eddins

Steve Eddins (view profile)

Mazharul - Image Graphs requires MATLAB R2015b. It cannot be used with earlier releases.

Dear Sir
Our Institution has the licence of matlab 2014 and Image Graphs functionality is not working on it. Specially, graph.m function is showing undefined
error what I got:
Undefined function or variable 'graph'.

Error in binaryImageGraph3 (line 111)
g = graph(edge_table,node_table);

Error in binaryImageGraph (line 91)
[g,nodenums] = binaryImageGraph3(bw,conn);
is there any other way to use graph.m successfully in the lower version. If a function X.m is not working in any version's alpha release, will it work in same versions's beta release..

sir I want to use ImageGraph and specially graph related functionality successfully. where I will avail the full functionality of graph.m

jiaosong Long


MATLAB Release
MATLAB 8.6 (R2015b)

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

» Watch video