Research Article
A Novel Two-Stage Spectrum-Based Approach for Dimensionality Reduction: A Case Study on the Recognition of Handwritten Numerals
Algorithm 1
The proposed procedure to connect the broken image segments.
while (there is another secondary component in input image) do | { | find outer contour of the main part ; | save the pixels coordinate of in array MAIN; | repeat | { | find outer contour of an image secondary part ; | save the pixels coordinate of in array SEC; | } until (there is not another secondary parts in image); | for (each pixel in array MAIN) | { | for (each pixel in array SEC) | { | compute the distance between pixels and ; | save (, coordinate of pixel , coordinate of pixel ) in array ; | } | } | _ min = smallest value in array ; | _min = coordinate of pixel , corresponding to _min; | _min = coordinate of pixel , corresponding to _min; | draw (a straight line with pen_width thickness from _min to _min); | } |
|