vlfeat/vlfeat — pull request #48 by NanYoMy (2014-03-15 08:42:07+00:00)
Title: update mser.c  fix the height of a tree

hi sir:
when i debug the mser.c. i found the value of "n_hgt" and "hgt" is not always correct. then i found the code below in "mser.c":
vl_mser_pix nr_val = 0 ;
vl_uint nr_idx = 0 ;
int hgt = r [ r_idx] .height ;
int n_hgt = r [nr_idx] .height ;
r_idx = climb(r, idx) ;
nr_idx = climb(r, n_idx) ;

it means that the "n_hgt" is always the height of r[0]. because the "nr_idx" is "0" when the computer runs the code "int n_hgt = r [nr_idx] .height ;".!!.
so i modify it like this:
vl_mser_pix nr_val = 0 ;
vl_uint nr_idx = 0 ;
r_idx = climb(r, idx) ;
nr_idx = climb(r, n_idx) ;
int hgt = r [ r_idx] .height ;
int n_hgt = r [nr_idx] .height ;

it works correctly in my project. and thanks to the vl_feat, my project is success now!!!!