Skip to content

Unable to resize image #9

@viktorstaikov

Description

@viktorstaikov

Hi,

We are trying to resize two images in ten resolutions with NodeJS and OpenCV. For the purpose we are trying to use your OpenCV wrapper: cv. After some digging in the code and lots of tries we have succeeded in finding the resize method and the correct signature for it. It accepts three parameters: buffer (input), buffer (output), integer (indicates the interpolation method, 1 is for linear interpolation). Figuring out this was not enough since the method started to throw the following exception:

OpenCV Error: Bad argument (Unknown array type in cvarrToMat, file ~/Desktop/Opencv/opencv-2.4.8/modules/core/src/matrix.cpp, line 698
Terminate called after throwing an instance of ‘cv:Exception’
What(): ~/Desktop/Opencv/opencv-2.4.8/modules/core/src/matrix.cpp:698: error; (-5) Unknown array type in function cvarrToMat

Aborted (core dumped)

Here https://github.com/viktorstaikov/imageresizing-sample you can find a sample that reproduce this behavior. It requires OpenCV library to be installed following this http://namhuy.net/1205/how-to-install-opencv-on-ubuntu.html guide and the standard npm install for the additional packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions