add to detect rectangle without the length detection and the detection method is not very correct

need to improve the performance like calculating the sum of a certain
local area. Besides, need to perform the edge detection before rectangle
detection