You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to extract a rectangular tile from a source image via a projective transformation based on mapping the corners of the tile to points in the source image, i.e., destiny points [[0, 0], [0, h], [w, 0], [w, h]].
The current implementation will return an output image that contains the entire input image with dimensions based on the input image dimensions. What I want is a output image of h rows by w pixels that matches the bounding box of the destiny points.
I made a fork and copied some lines to the behavior for projective and affine transformations. There is some repeated code, but this should make it so that the output is properly cropped. This doesn't affect the behavior of transformHTMLElement, though. https://github.com/Xiione/Homography.js
I would like to extract a rectangular tile from a source image via a projective transformation based on mapping the corners of the tile to points in the source image, i.e., destiny points [[0, 0], [0, h], [w, 0], [w, h]].
The current implementation will return an output image that contains the entire input image with dimensions based on the input image dimensions. What I want is a output image of h rows by w pixels that matches the bounding box of the destiny points.
This behavior is already provided for piecewise affine transformations by the second case of _induceBestObjectiveWidthAndHeight() at https://github.com/Eric-Canas/Homography.js/blob/1200c41d713cc40007b3b71c8ab9b4214d837e84/Homography.js#L706C1-L710
The text was updated successfully, but these errors were encountered: