3. The method of claim 2 , further comprising, before step (a), calculating the first down-sampling ratio, which comprises: (h1) detecting connected regions in the input image; (h2) calculating a horizontal distance between each pair of horizontally adjacent connected regions detected in step (h1); (h3) calculating a first average horizontal distance which is an average of all horizontal distances calculated in step (h2); and (h4) setting the first down-sampling ratio based on the first average horizontal distance calculated in step (h3).
4. The method of claim 3 , wherein in step (h4), the first down-sampling ratio is equal to three times the first average horizontal distance.