-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
answered?Please let us know if there are further issues!Please let us know if there are further issues!
Description
If I run the following code,
from PIL import Image
import pyqtgraph as pg
import pyqtgraph.exporters
from PyQt5.QtWidgets import QApplication
import numpy as np
from scipy.ndimage import rotate
app = QApplication.instance()
image = Image.open("cameraman.png")
array = np.asarray(image)
im = pg.ImageView(view=pg.PlotItem())
im.show()
im.setImage(array)
im.getImageItem().rotate(30)
I get this image:
Since I rotated the image by 30 degrees, the corners in the above image were cut off. What I am trying to get is a numpy array of the entire image, with the corners in tact, but still rotated. I essentially want a numpy array of the image that I would get if I pressed the "view all" button. I also only want the image and not the xy axes or histogram, etc. Is there a way to access this?
Metadata
Metadata
Assignees
Labels
answered?Please let us know if there are further issues!Please let us know if there are further issues!