javascript - How to determine the drawn graphics under CANVAS
PHP中文网
PHP中文网 2017-05-16 13:27:54
0
2
627

How do I judge what I am drawing on the canvas? For example, I use lines to draw a heart or a V. . How to determine whether it is heart or V? .
And determine the similarity between two people's paintings.
The condition can be one stroke, not multiple strokes

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
刘奇

Save the drawing path into the object, and then write an algorithm to judge the two objects

某草草

Oops, this is complicated, I don’t understand. Let me guess, convert the image into valid data. For example, when you draw, look at the functions you called from the background, determine how the structure of your graphics is structured, and then divide your drawing into areas, such as the center The cross dividing line takes the pixel ratio of four areas to determine the symmetry of the drawn figure. First determine whether the figure you draw is symmetrical, and if so, what kind of symmetry it is. What is the angle of symmetry, etc., to determine the status of your graphics, it is determined by a series of segmentation and comparison calculations like this. (The above are my guesses for reference only)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!