correct formula of aligned spatial pyramid matching