If you’re familiar with Scan2CAD, you’ll know that its key function is transforming raster and vector designs into CAD/CAM or CNC files. There are many parts of the conversion process to achieve this. One of the most complex and interesting is object recognition.
Though ‘object recognition’ can have multiple meanings, within the context of Scan2CAD it refers to the process of recognising and transforming elements within a raster or vector image to their appropriate elements. This includes distinguishing circles from arcs, text from lines, and so on. As you may be able to guess, this is one of the trickiest tasks for Scan2CAD to accomplish—and it’s also what sets us apart from other vectorization software.
In this post, we’ll run through what object recognition means in practical terms. We’ll also show you how it helps to improve your vectorization results—and what your files would look like without it.
Detection vs recognition
Before we start exploring object recognition in earnest, we need to explore the differences between detection and recognition.
Writing on the subject, Intel suggests that the best way to think about these is as ‘discovery’ and ‘comprehension’. Detection, therefore is about discovering whether there are objects found within an image. Meanwhile, recognition aims to understand what the image represents.
In certain contexts, detection is sufficient. It is not, however, conducive to good results when vectorizing for CAD. Vectorization, after all, is about transforming a raster image into a usable vector file—and it’s the word usable which is key here.
It would be possible, for example, to simply convert a raster image into a series of vector polygons and lines. This may be fine if, for example, you simply wished to vectorize a logo for printing.
However, this would not satisfy the requirements of someone who wished to edit their design in CAD software. Take, for instance, the example of exploded vector text. Though this may initially seem to be a vector representation of raster text, it is not editable and not useful.
Reasons such as this are why object recognition is crucial. Any vectorization software worth its salt must aim not merely to detect what is present within a raster image, but to categorize its features with the aim of tracing appropriate vector elements over them. This is where object recognition techniques come into play—and where Scan2CAD excels.
The basics of object recognition
You may not be completely new to the concept of object recognition, you may have come across it before. In late 2016, Google released its Quick, Draw! game, which challenged users to draw six objects. The aim was to get its neural network to understand what each object looked like. You can see a screenshot of the game’s end screen below.
Though a rather simplistic example, it gives you the gist of what object recognition is about. The aim is to pick up on an object’s defining characteristics in a visual sense. In the example above, this may include the camel’s hump or elephant’s trunk.
Types of object recognition
Quick, Draw! represents just one form of object recognition: one which relies on the field of machine learning. Many other forms of object recognition exist, and they control everything from the face recognition software at passport gates through to automatic number plate recognition.
Machine learning sits alongside deep learning as one of the two key object recognition techniques. The latter of these involves training a neural network to learn individual features of a given object using huge amounts of data.
Machine learning, meanwhile, involves selecting the relevant features in a given image, then feeding this information into a model. The model then uses this information to classify new objects. What both of these forms of learning have in common is the use of feature detection to classify objects.
Object recognition and vectorization
The principles governing the process of object recognition described above also apply to software such as Scan2CAD. Of course, Scan2CAD concerns itself not with distinguishing an elephant from a camel, but with correctly classifying different parts of a raster image with the aim of discerning which type of vector element is the best fit.
This is a trickier process than it may initially seem. For example, dash lines are a common vector element in CAD software. Telling apart a single dash line from a sequence of smaller lines, however, isn’t always easy. Arrow lines may pose similar problems, whilst other vectorization software may be unable to tell the difference between an arc and a Bezier curve (with many unable to process circles).
How object recognition works in Scan2CAD
Scan2CAD isn’t like other vectorization software—it’s a step ahead. That’s because our object recognition engine is adept at assigning the right vector entities to a 2D raster image. To do so, it uses preset vectorization settings as a starting point. This includes those for converting architectural drawings, mechanical and electrical drawings, CNC profiles, and more.
Where these settings come into play is in deciding how to categorize a specific object. Take the earlier example of a dash line, for example: one particular preset may decide that the spaces between each individual dash may be no more than 45px wide, while the dashes themselves must be no more than 50px long. The exact cut off points specified will vary by the preset you choose, and users also have the option to change these settings manually. This gives you the ability to control the object recognition process, ensuring you get the best results for your work.
Scan2CAD: object recognition in action
Need further proof of the effectiveness of Scan2CAD’s object recognition engine? Check out our video below. In this video, you’ll find information on Scan2CAD’s vectorization presets and how to edit individual settings manually. You’ll also see first-hand how Scan2CAD converts each part of a raster image into an appropriate vector element—and you’ll see what vectorization would look like if you don’t make use of proper object recognition techniques.
This video is taken from our series of Scan2CAD tutorials.
Why object recognition matters in CAD
Object recognition is clearly one of Scan2CAD’s strong points. But why does this matter for you as a CAD user? Well, without proper object recognition, you quite simply can’t create a usable vector file from a starting raster image.
Using Scan2CAD’s object recognition engine to accurately convert each element ensures you’ll end up with a finished vector image that you can export as a DXF or DWG, and then edit in your CAD software of choice. Without the techniques employed by Scan2CAD, you might be able to get a vector file—but it would be practically impossible to use.
Take the example of the floorplan we saw in the video above, which displayed doorways using arcs. If this were incorrectly converted into a Bezier curve, it may quickly become deformed, losing the meaning of the original image. Another program may even convert this into a series of small lines, which would be a nightmare to edit.
With Scan2CAD on your side, though, you needn’t worry about such issues. Thanks to our object recognition engine (and smart OCR techniques), you can be sure of professional results every time. It’s not for nothing that we call it the ultimate vectorization software!