changed median function so that it also takes original input image as input so that we don't need to pass h,w parameters seperately.
add paddedImg attribute accessors