Skip to content

Unexpected warping results #3

@ghost

Description

I've just created a module that allows me to generate a mapping function for ndarray-warp, to distort an image like imagemagick's shepard's distortion: https://github.com/ismay/generate-map

It allows you to specify a set of coordinates and their intended displacement, which results in images like these:

image

(warped with these parameters: [[210, 296, 100, 0], [101, 97, -30, -10], [77, 473, 50, -100]], see test here: https://github.com/ismay/generate-map/blob/master/lib/index.test.js)

Everything works as expected, but I encountered two things that I wasn't able to solve:

  1. Output is rotated 90 degrees counterclockwise (also when just passing an image through ndarray-warp without doing anything). Seems like a bug? Or am I doing something wrong here?

  2. Another thing that I noticed and could not figure out from this project's documentation is that the output is grayscale, even though the original image is in color. Is there anything I could do to output color images?

Thanks!

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