Skip to content

Does interpolation work when using resize()? #683

@aaronlsilber

Description

@aaronlsilber

I'm trying to upscale an image using the INTER_NEAREST interpolation and it doesn't seem to be working when compared to the results of an identical python script.

image.resize(4, 4, cv.Constants.INTER_NEAREST);

produces

test-large

whereas in python, this

cv2.resize(image, (4, 4), interpolation=cv2.INTER_NEAREST)

produces

Screen Shot 2021-11-05 at 8 18 26 AM

Am I using this api incorrectly, or does this not work as intended? Thanks!

Also, my package-lock.json reports using;
"opencv": { "version": "github:peterbraden/node-opencv#f0a03a4be7064ca4d75ff2f16f8cf206fe982456", "from": "github:peterbraden/node-opencv", "requires": { "buffers": "^0.1.1", "nan": "^2.14.0" } },

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions