Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have found the reason. It comes from the reference Matlab implementation, the comments explain it:

% compute shape contexts for (transformed) model [BH1,mean_dist_1]=sc_compute(Xk',zeros(1,nsamp1),mean_dist_global,nbins_theta,nbins_r,r_inner,r_outer,out_vec_1);

% compute shape contexts for target, using the scale estimate from % the warped model % Note: this is necessary only because out_vec_2 can change on each % iteration, which affects the shape contexts. Otherwise, Y does % not change. [BH2,mean_dist_2]=sc_compute(Y',zeros(1,nsamp2),mean_dist_1,nbins_theta,nbins_r,r_inner,r_outer,out_vec_2);

I have found the reason. It comes from the reference Matlab implementation, the comments explain it:

 % compute shape contexts for (transformed) model
   [BH1,mean_dist_1]=sc_compute(Xk',zeros(1,nsamp1),mean_dist_global,nbins_theta,nbins_r,r_inner,r_outer,out_vec_1);

[BH1,mean_dist_1]=sc_compute(Xk',zeros(1,nsamp1),mean_dist_global,nbins_theta,nbins_r,r_inner,r_outer,out_vec_1);

% compute shape contexts for target, using the scale estimate from % the warped model % Note: this is necessary only because out_vec_2 can change on each % iteration, which affects the shape contexts. Otherwise, Y does % not change. [BH2,mean_dist_2]=sc_compute(Y',zeros(1,nsamp2),mean_dist_1,nbins_theta,nbins_r,r_inner,r_outer,out_vec_2);

[BH2,mean_dist_2]=sc_compute(Y',zeros(1,nsamp2),mean_dist_1,nbins_theta,nbins_r,r_inner,r_outer,out_vec_2);