I am using SimpleCV to stitch images. I have made some changes in SimpleCV's GitHub code and eventually got the image transformed correctly. But the problem is, the color of the image after getting transformed is changed.
I have used these images https://i.stack.imgur.com/TyJpO.jpg. The output of my code is: https://i.stack.imgur.com/iAxkL.jpg
This is my code:
from SimpleCV import *
import cv2
import cv
img1 = Image("s.jpg")
img2 = Image("t.jpg")
dst = Image((2000, 1600))
# Find the keypoints.
ofimg = img1.findKeypointMatch(img2)
# The homography matrix.
homo = ofimg[1]
eh = dst.getMatrix()
# transform the image.
x = Image(cv2.warpPerspective(np.array((img2.getMatrix())), homo,
(eh.rows, eh.cols+300), np.array(eh), cv.INTER_CUBIC))
# blit the img1 now on coordinate (0, 0).
x = x.blit(img1, alpha=0.4)
x.save("rishi1.jpg")