Skip to content

bound check of image.warp #223

@vinthony

Description

@vinthony

hi,

recently, I want to use image.warp to do some transform.

my code like this:

image.warp(img,flow, 'bicubic', false,'pad',0);

when I use the same flow in the Matlab to handle the same image. Most of the value of this warper is correct. except the bound when I move to the area outside the image.

here is the Matlab code:

interp2(X, Y,img, flowX, flowY, 'cubic', 0);

the output of image.warp like this:
image
the output of interp2 like this:
image

in the bound of warper, the value is not same as Matlab.

is there something wrong with my code? or it is only the different implement in this two language.

How to avoid this kind of 'bound' ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions