How to get plt.imshow to display negative coordinates

77 Views Asked by At

I have a task of stitching two images into panorama picture using linear algebra. One of the images that gets transformed has most of its contents in coordinates that are equal less than 0, so imshow doesn't show them for me.

Is there any way to either show negative values of image, expanding the plot, or at least to move who image to the right in order to show more of it?

I tried using expand and origin, but just couldn't get it to work properly, as I don't have much knowledge about this subject.

from PIL import Image
import matplotlib.pyplot as plt
import numpy as np
img1 = Image.open("gwint1.png")
coeffs=np.array([0.207879489,0.1122809023,496.629559,-0.341172122,0.908759060,53.1000028&,-0.000964805704,0.000223378490]).reshape(4,2)
plt.imshow(img1.transform((width,height),Image.PERSPECTIVE, coeffs, fill=0, fillcolor='black'),alpha=1);
0

There are 0 best solutions below