0. detect is basically ok; 2. rectangle can not show on screen.
fixed, layout defination was wrong.
some kind of ok, but still need to be optimized on the detection algo.