"Python" skimage image processing _ Rotate Image

Source: Internet
Author: User
Tags image processing library rotate image

A short implementation of the image rotation code, using the Skimage library, is said to be compared with PIL, skimage to numpy and other scientific computing library support better, here is to complete the brother to help him modify the program's task, If there is a need in the future, you may be able to comb the Python image processing library or make a filter based on your own needs to get a deeper look.

1  fromSkimageImportIo,transform2 ImportMatplotlib.pyplot as Plt3 4 5 " "Picture Rotation" "6 7Img2 = Io.imread ('./bg-body-3.jpg')8Img2 =transform.rotate (IMG2, 180)#rotates 90 degrees without changing the size9Plt.figure ('Skimage')Ten plt.imshow (IMG2) One plt.show () A Print(Img2.shape) - Print(Img2.dtype)

This library translates the read-in image data directly into Numpy.ndarray and converts the data type from uint8 to float64:

Output

(983, 1920x1080, 3) float64

"Python" skimage image processing _ Rotate Image

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.