[scikit-image] crop the image with an angle in skimage

wine lover winecoding at gmail.com
Mon Feb 6 14:50:32 EST 2017


Hi John,

Thanks a lot for your suggestions.

There might be a potential issue, for instance, I tried elas_img =
transform.rotate(image=img,angle=45)


The original image and rotated image are shown as follows. It can be seen
that the rotated image gets four corner areas cut. I am not sure whether I
will lose any content from there. For example, I can get a sample patch
from the left bottom corner of the original image; but this left bottom
corner was cut in the rotated image.

[image: Inline image 1]


On Mon, Feb 6, 2017 at 1:07 PM, John Jenkinson <johnjenkinson1 at gmail.com>
wrote:

> rotate the image by 45 degrees then crop the red square and you will have
> the blue square
>
> On Feb 6, 2017 1:02 PM, "wine lover" <winecoding at gmail.com> wrote:
>
> Dear All,
>
> I am trying to leverage the data augmentation techniques for the image
> segmentation task.
>
> In this blog post (http://benanne.github.io/2014/04/05/galaxy-zoo.html
> ), author discusses the following data augmentation procedure.
>
> I am not sure how to perform the crop operation with an angle (the cropped
> one marked with blue) in skimage? In specific, I do not want the cropped
> one go beyond the scope of original image.
>
> Thanks,
>
>
> [image: Inline image 1]
>
> _______________________________________________
> scikit-image mailing list
> scikit-image at python.org
> https://mail.python.org/mailman/listinfo/scikit-image
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20170206/7a893a8d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 235339 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20170206/7a893a8d/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 173911 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20170206/7a893a8d/attachment-0003.png>


More information about the scikit-image mailing list