Skip to content

inpaint.cpp: incorrect positions of mat element in icvNSInpaintFMM #16852

@nicheng0019

Description

@nicheng0019

Detailed description

In inpaint.cpp, from line 649 to line 656 in icvNSInpaintFMM, I think all of the "lm"s may be "l - 1", because when calculating gradient in vertical direction, it doesn't matter whether it is the first column in the source image. When l = 1, lm = 1, the positions of mask CV_MAT_ELEM(*f,uchar,k+1,l) (line 647) and CV_MAT_ELEM(*f,uchar,k-1,l) (line 648) are not correspond to CV_MAT_ELEM(*out,data_type,kp+1,lm) (line 649) and
CV_MAT_ELEM(*out,data_type,km-1,lm) (line 650).

From line 663 to line 670, all of the "km"s may be "k - 1" and so on.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions