Skip to content

Error in cvtColor #14

@beeing

Description

@beeing

Hi, just wondering is this is a bug or something on my code.

Running the below code will throw exception below:

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received null
    let jimpSrc = await Jimp.read(__dirname + '/image.jpg');
    let src = cv.matFromImageData(jimpSrc.bitmap);
    let dst = new cv.Mat()
    cv.cvtColor(src, dst, cv.COLOR_BGR2GRAY)

However, calling dilate as per your example works fine. Perhaps something that I missed?

Thanks in advance.

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