Skip to content

Not cropping skewed image to original image size #241

@NithyaMogane-TomTom

Description

@NithyaMogane-TomTom

Description:
When one uses skew_left_right(), the image is cropped to fit original image size and hence, content is lost.
For example:
Original:
image
After skewing:
image
As you can see the content is clipped at top-right and bottom-right corners.

How can I skew in a fashion that preserves content at the expense of larger (or changed) image sizes ?

Language/Compiler:
Python 3.7

OS:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

Version:
0.2.9

How to recreate:
Sample input image -
image

import Augmentor

p = Augmentor.Pipeline("<image-location>")
p.skew_left_right(probability=1.0, magnitude=0.5)
p.sample(3)

What i have already done to resolve the issue:
peruse documentation - https://augmentor.readthedocs.io/en/master/userguide/mainfeatures.html
and code on github -

def skew_left_right(self, probability, magnitude=1):

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