Abstract

Purpose of research. The recursive algorithm for painting recognized areas on a binarized image and extracting the contours of a color mark, in order to find the minimum time for counting the number of filled pixels in a recognized mark, was developed in the article.Methods. The region filling algorithm in the image is based on the recursive method. The algorithm begins the work from the central point of the image and analyzes the presence of unshaded pixels in adjacent cells. In the article is considered the definition of the shortest time for filling the recognized area in eight directions: east-south-west-north, east-north-west-south, southeast-northwest, southwest-northeast, west-south-east-north, west-north-east-south, north-east-south-west, north west south east. The algorithm contains several stages: checking the exit from the recursion provided that all areas are filled, filling the initial cell, filling the elements in four directions from the starting point, counting the number of filled elements.Results. A recursive algorithm for filling recognized areas on a binarized image with the possibility of highlighting the contours of a recognized mark has been developed. The direction of the optimal bypass, which has the shortest time in relation to other considered directions, is determined. The testing was carried out for cycles with 10, 50 and 100 iterations. According to the presented algorithm, a specialized software model was created. The number of the certificate of state registration of the computer program "Program for filling a recognized mark" is 2023612631.Conclusion. The results of experimental studies showed that for a cycle value of 10 iterations, the best time to fill the area is 12762 msec, for a cycle value of 50 iterations, the best time is 76008 msec, for a cycle value of 100 iterations, the best time is 160568 msec. The minimum average time to complete the filling operation was 84357 msec, therefore, the best of the eight pass combinations turned out to be the direction - north-east-south-west.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.