Skip to content

Commit 8bb9946

Browse files
committed
Starting H in alignICP_Simple as kwarg
1 parent 3630d5f commit 8bb9946

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/3rdParty/_PCL/services/ICP_Simple.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ function alignICP_Simple(
244244
max_overlap_distance::Number=Inf,
245245
min_change::Number=3,
246246
max_iterations::Integer=100,
247-
verbose::Bool=false
247+
verbose::Bool=false,
248+
H = Matrix{Float64}(I,4,4),
248249
)
249250
#
250251
size(X_fix)[2] == 3 || error(""""X_fix" must have 3 columns""")
@@ -276,7 +277,6 @@ function alignICP_Simple(
276277
verbose && @info "Estimate normals of selected points ..."
277278
estimate_normals!(pcfix, neighbors)
278279

279-
H = Matrix{Float64}(I,4,4)
280280
residual_distances = Any[]
281281

282282
verbose && @info "Start iterations ..."
@@ -292,7 +292,7 @@ function alignICP_Simple(
292292

293293
push!(residual_distances, residuals)
294294
transform!(pcmov, dH)
295-
H = dH*H
295+
H .= dH*H
296296
pcfix.sel = sel_orig
297297
if i > 1
298298
if check_convergence_criteria(residual_distances[i], residual_distances[i-1],

0 commit comments

Comments
 (0)