Added perspective transformation