I ran a simple script to register the landmarks (via translation, rotation and scaling) of the Helen data set. I have decided to center all face based on the point between the two eyes, and define that as the center of my system (position 0,0). I have successfully managed to create a data based on registered landmarks. Great, that was the first step.
Second step is to registered the actual images; what's in between the landmarks. I'm using skimage and things are technically working:
dst = np.array(Data[1])
dst[:,1] = -dst[:,1]
fig, ax = plt.subplots()
ax.imshow(Helen1)
plt.scatter(dst[:,0], dst[:,1], color="red", s=1)
plt.show()
Image With Landmarks:
src = np.array(Data_Aligned[1])
src[:,1] = src[:,1]
tform3 = PiecewiseAffineTransform()
tform3.estimate(src,dst)
warped = warp(Helen1, tform3,clip=False)
The problem seems to be in the display function, it seems like the original image is in (0,\infty)^2 and plotting anything outside of this domain returns something blank.
fig, ax = plt.subplots()
plt.xlim([700, 1500])
plt.ylim([700, 1500])
plt.imshow(warped)
plt.scatter(src[:,0], src[:,1], color="red", s=1)
plt.show()
Registered:
Anyone knows the solution to this problem ? I want the middle of the eyes to be the origin (0,0). Obviously I can move the center around to be within the domain of the original image and it works, here (1000,1000):
Centered at 1000,1000:
Anyone knows a way to allow imshow to display outside the original domain of the image ?


