Skip to content

Commit

Permalink
Fixed little bug in watershed call.
Browse files Browse the repository at this point in the history
  • Loading branch information
clementfarabet committed Oct 27, 2011
1 parent 909e269 commit b0633b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function imgraph.watershed(...)
end

-- compute image
local nelts = gradient.imgraph.watershed(dest, gradient, minHeight, connex)
local nelts = gradient.imgraph.watershed(dest, gradient:clone(), minHeight, connex)

-- return image
return dest, nelts
Expand Down Expand Up @@ -764,7 +764,7 @@ imgraph._example = [[
-- (4) compute the watershed of the graph
local graph = imgraph.graph(inputimgg, 8)
local gradient = imgraph.gradient(graph)
local watershed = imgraph.watershed(gradient, 0.07, 8)
local watershed = imgraph.watershed(gradient, 0.08, 8)
local watershedgraph = imgraph.graph(watershed, 8)
local watershedcc = imgraph.connectcomponents(watershedgraph, 0.5, true)
Expand Down

0 comments on commit b0633b7

Please sign in to comment.