Implemented integral images