Skip to content

Commit 3336d13

Browse files
authored
correct bug in convexHull if returnPoints is false
retval is in case of returnPoints false a torch.LongTensor. Therefore we can get the size only with the size method.
1 parent b4e516a commit 3336d13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cv/imgproc/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -2068,7 +2068,7 @@ function cv.convexHull(t)
20682068
clockwise, returnPoints))
20692069
if not returnPoints then
20702070
-- correct the 0-based indexing
2071-
for i = 1,#retval do
2071+
for i = 1, retval:size(1) do
20722072
retval[i] = retval[i] + 1
20732073
end
20742074
end

0 commit comments

Comments
 (0)