{"id":15895,"date":"2018-09-18T07:59:55","date_gmt":"2018-09-18T07:59:55","guid":{"rendered":"https:\/\/www.revoscience.com\/en\/?p=15895"},"modified":"2020-06-09T12:51:21","modified_gmt":"2020-06-09T12:51:21","slug":"smoothing-out-sketches-rough-edges","status":"publish","type":"post","link":"https:\/\/www.revoscience.com\/en\/smoothing-out-sketches-rough-edges\/","title":{"rendered":"Smoothing out sketches\u2019 rough edges"},"content":{"rendered":"<p style=\"text-align: justify\"><span style=\"color: #000000\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15896\" src=\"https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg\" alt=\"\" width=\"639\" height=\"426\" title=\"\" srcset=\"https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg 639w, https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0-300x200.jpg 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/>CAMBRIDGE, Mass. &#8212;\u00a0Artists may soon have at their disposal a new MIT-developed tool that could help them create digital characters, logos, and other graphics more quickly and easily.\u00a0<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">Many digital artists rely on image vectorization, a technique that converts a pixel-based image into an image comprising groupings of clearly defined shapes. In this technique, points in the image are connected by lines or curves to construct the shapes. Among other perks, vectorized images maintain the same resolution when either enlarged or shrunk down.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">To vectorize an image, artists often have to hand-trace each stroke using specialized software, such as Adobe Illustrator, which is laborious. Another option is using automated vectorization tools in those software packages. Often, however, these tools lead to numerous tracing errors that take more time to rectify by hand. The main culprit: mismatches at intersections where curves and lines meet.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">In a\u00a0<a style=\"color: #000000\" href=\"http:\/\/mit.pr-optout.com\/Tracking.aspx?Data=HHL%3d82%3b%2fA5-%3eLCE9%3b4%3b8%3f%26SDG%3c90%3a.&amp;RE=MC&amp;RI=4334046&amp;Preview=False&amp;DistributionActionID=55971&amp;Action=Follow+Link\" target=\"_blank\" rel=\"noopener noreferrer\" data-saferedirecturl=\"https:\/\/www.google.com\/url?hl=en&amp;q=http:\/\/mit.pr-optout.com\/Tracking.aspx?Data%3DHHL%253d82%253b%252fA5-%253eLCE9%253b4%253b8%253f%2526SDG%253c90%253a.%26RE%3DMC%26RI%3D4334046%26Preview%3DFalse%26DistributionActionID%3D55971%26Action%3DFollow%2BLink&amp;source=gmail&amp;ust=1537343795639000&amp;usg=AFQjCNHAW8ymuP08fN3ODzBW4kvj1CpJYg\">paper<\/a>\u00a0being published in the journal\u00a0<em>ACM Transactions on Graphics<\/em>, MIT researchers detail a new automated vectorization algorithm that traces intersections without error, greatly reducing the need for manual revision. Powering the tool is a modified version of a new mathematical technique in the computer-graphics community, called \u201cframe fields,\u201d used to guide tracing of paths around curves, sharp corners, and messy parts of drawings where many lines intersect.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">The tool could save digital artists significant time and frustration. \u201cA rough estimate is that it could save 20 to 30 minutes from automated tools, which is substantial when you think about animators who work with multiple sketches,\u201d says first author Mikhail Bessmeltsev, a former Computer Science and Artificial Intelligence Laboratory (CSAIL) postdoc associate who is now an assistant professor at the University of Montreal. \u201cThe hope is to make automated vectorization tools more practical for artists who care about the quality of their work.\u201d<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">Co-author on the paper is Justin Solomon, an assistant professor in CSAIL and in the Department of Electrical Engineering and Computer Science, and a principal investigator in the Geometric Data Processing Group.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\"><strong>Guiding the lines<\/strong><\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">Many modern tools used to model 3-D shapes directly from artist sketches, including Bessmeltsev\u2019s previous research projects, require vectorizing the drawings first. Automated vectorization \u201cnever worked for me, so I got frustrated,\u201d he says. Those tools, he says, are fine for rough alignments but aren\u2019t designed for precision: \u201cImagine you\u2019re an animator and you drew a couple frames of animation. They\u2019re pretty clean sketches, and you want to edit or color them on a computer. For that, you really care how well your vectorization aligns with your pencil drawing.\u201d<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">Many errors, he noted, come from misalignment between the original and vectorized image at junctions where two curves meet \u2014 in a type of \u201cX\u201d junction \u2014 and where one line ends at another \u2014 in a \u201cT\u201d junction. Previous research and software used models incapable of aligning the curves at those junctions, so Bessmeltsev and Solomon took on the task.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">The key innovation came from using frame fields to guide tracing. Frame fields assign two directions to each point of a 2-D or 3-D shape. These directions overlay a basic structure, or topology, that can guide geometric tasks in computer graphics. Frame fields have been used, for instance, to restore destroyed historical documents and to convert triangle meshes \u2014 networks of triangles covering a 3-D shape \u2014 into quadrangle meshes \u2014 grids of four-sided shapes. Quad meshes are commonly used to create computer-generated characters in movies and video games, and for computer-aided design (CAD) for better real-world design and simulation.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">Bessmeltsev, for the first time, applied frame fields to image vectorization. His frame fields assign two directions to every dark pixel on an image. This keeps track of the tangent directions \u2014 where a curve meets a line \u2014 of nearby drawn curves. That means, at every intersection of a drawing, the two directions of the frame field align with the directions of the intersecting curves. This drastically reduces the roughness, or noise, surrounding intersections, which usually makes them difficult to trace.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">\u201cAt a junction, all you have to do is follow one direction of the frame field and you get a smooth curve. You do that for every junction, and all junctions will then be aligned properly,\u201d Bessmeltsev says.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\"><strong>Cleaner vectorization<\/strong><\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">When given an input of a pixeled raster 2-D drawing with one color per pixel, the tool assigns each dark pixel a cross that indicates two directions. Starting at some pixel, it first chooses a direction to trace. Then, it traces the vector path along the pixels, following the directions. After tracing, the tool creates a graph capturing connections between the solid strokes in the drawn image. Using this graph, the tool matches the necessary lines and curves to those strokes and automatically vectorizes the image.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">In their paper, the researchers demonstrated their tool on various sketches, such as cartoon animals, people, and plants. The tool cleanly vectorized all intersections that were traced incorrectly using traditional tools. With traditional tools, for instance, lines around facial features, such as eyes and teeth, didn\u2019t stop where the original lines did or ran through other lines.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">One example in the paper shows pixels making up two slightly curved lines leading to the tip of a hat worn by a cartoon elephant. There\u2019s a sharp corner where the two lines meet. Each dark pixel contains a cross that\u2019s straight or slightly slanted, depending on the curvature of the line. Using those cross directions, the traced line could easily follow as it swooped around the sharp turn.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"color: #000000\">Next, the researchers plan to augment the tool with a temporal-coherence technique, which extracts key information from adjacent animation frames. The idea would be to vectorize the frames simultaneously, using information from one to adjust the line tracing on the next, and vice versa. \u201cKnowing the sketches don\u2019t change much between the frames, the tool could improve the vectorization by looking at both at the same time,\u201d Bessmeltsev says.<\/span><\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MIT-developed tool improves automated image vectorization, saving digital artists time and effort.<\/p>\n","protected":false},"author":2,"featured_media":15896,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-15895","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-research"],"featured_image_urls":{"full":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",639,426,false],"thumbnail":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0-200x200.jpg",200,200,true],"medium":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0-300x200.jpg",300,200,true],"medium_large":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",639,426,false],"large":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",639,426,false],"1536x1536":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",639,426,false],"2048x2048":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",639,426,false],"ultp_layout_landscape_large":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",639,426,false],"ultp_layout_landscape":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",639,426,false],"ultp_layout_portrait":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",600,400,false],"ultp_layout_square":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",600,400,false],"newspaper-x-single-post":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",639,426,false],"newspaper-x-recent-post-big":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",540,360,false],"newspaper-x-recent-post-list-image":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",95,63,false],"web-stories-poster-portrait":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",639,426,false],"web-stories-publisher-logo":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",96,64,false],"web-stories-thumbnail":["https:\/\/www.revoscience.com\/en\/wp-content\/uploads\/2018\/09\/MIT-Image-Vectorization_0.jpg",150,100,false]},"author_info":{"info":["RevoScience"]},"category_info":"<a href=\"https:\/\/www.revoscience.com\/en\/category\/news\/research\/\" rel=\"category tag\">Research<\/a>","tag_info":"Research","comment_count":"0","_links":{"self":[{"href":"https:\/\/www.revoscience.com\/en\/wp-json\/wp\/v2\/posts\/15895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.revoscience.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.revoscience.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.revoscience.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.revoscience.com\/en\/wp-json\/wp\/v2\/comments?post=15895"}],"version-history":[{"count":0,"href":"https:\/\/www.revoscience.com\/en\/wp-json\/wp\/v2\/posts\/15895\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.revoscience.com\/en\/wp-json\/wp\/v2\/media\/15896"}],"wp:attachment":[{"href":"https:\/\/www.revoscience.com\/en\/wp-json\/wp\/v2\/media?parent=15895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.revoscience.com\/en\/wp-json\/wp\/v2\/categories?post=15895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.revoscience.com\/en\/wp-json\/wp\/v2\/tags?post=15895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}