BVLC/caffe — pull request #1460 by cvondrick (2014-11-20 19:19:58+00:00)
Title: fix matcaffe prepare_batch indexing

The data_transformer.cpp code crops centers according to the formula
floor((image_dim - cropped_dim) / 2)
However, the matlab code crops centers according to the formula:
floor((image_dim - cropped_dim + 1) / 2) + 1
where the additional +1's are for matlab's indexing at 1. However, you only need one +1. Right now, this causes matcaffe to crop centers one pixel off from the data_transformer.cpp, which makes the extracted features different. I think you should remove one of the +1s so that matcaffe matches data_transformer.cpp exactly.