08.08.2012 Views

Graph Cuts with CUDA

Graph Cuts with CUDA

Graph Cuts with CUDA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Relabel Pseudocode<br />

void relabel(x, height, const excess_flow, const capacity)<br />

if active(x) do<br />

done<br />

my_height = HEIGHT_MAX; // init to max height<br />

foreach y=neighbor(x)<br />

end<br />

if capacity(x,y) > 0 do<br />

my_height = min(my_height, height(y)+1); // minimum height + 1<br />

done<br />

height(x) = my_height; // update height

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!