Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #44453
| From | Robert Kern <robert.kern@gmail.com> |
|---|---|
| Subject | Re: Shear image (numpy.ndarray) |
| Date | 2013-04-27 16:40 +0100 |
| References | <CAGvr90C9RnE0Qskfb8HbCKMmkAj5MFvpV0YyyE9rHPNwdnL4iQ@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1129.1367077226.3114.python-list@python.org> (permalink) |
On 2013-04-27 12:46, Radek Machulka wrote: > Hi, > > I am looking for some function that would shear my 2D numpy.ndarray array. Since > the numpy (probably) does not provide such a functionality (numpy.roll does not > do what I need), I hope the PIL might do the trick. > > Google give me page that says: 'This function (im.transform) can be used to > scale, translate, rotate, and shear the original image.', however I was not able > to get it work. > > So could anybody give me a hand how to use it (or how to shear the image in > different way)? You should be able to use scipy.ndimage.affine_transform() to do the job: http://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.interpolation.affine_transform.html#scipy.ndimage.interpolation.affine_transform If you cannot get it to work, please show us what you tried, the results you got, and what you expected to get. You can find the scipy mailing lists here: http://www.scipy.org/Mailing_Lists -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Shear image (numpy.ndarray) Robert Kern <robert.kern@gmail.com> - 2013-04-27 16:40 +0100
csiph-web