added structure to interpolate input images