4 ms·
From past experience, this is the hard part. The quality has gotten better in the last 5-10 years… but until very recently, you could easily get complete garbag
by techdragon 3y ago
From past experience, this is the hard part. The quality has gotten better in the last 5-10 years… but until very recently, you could easily get complete garbage trying to do basic two image to vector conversion with open source tools.
I’ve been on the SVG using train for what feels like forever now, so long that I’ve tried to do the raster to vector conversion dance countless times and watched the recent progress with much satisfaction, but it’s still not perfect, two colour gradients (a common enough logo element) are frequently a problem last time I checked, which admittedly could also just be really troublesome set of examples since it’s not like I’ve got a library of images I use to regression test this stuff, I just use it.
- bozhark 3y agoGreyscale the image if colored
- techdragon 3y agoYes that’s the recommendation, and I’ve done it myself too… but I mentioned it as an example of what the currently available raster to vector conversion tools can’t handle. Of particular note is when these kinds of issues crop up with overlapping elements, like having flowing ribbons or abstract line work, or other art with a colour gradient on it, which when converted to grayscale, produces the same tone or similar enough tone that the de-noising of the vectorisation decides to merge the regions as a single object. There are ways around it… but doing multiple conversions to vectorised images after performing colour space rotations, desaturations, grayscalings, and then having to stitch together a final vector in out of the correctly vectorised portions of multiple conversions… is not fun… and makes me deeply frustrated at the lack of available vectorisation software that makes full use of the colour information available. It’s been a while since I dug down into the academic papers on the topic but when I last looked years ago, I didn’t find anything about vectorisation algorithms that didn’t basically rely on the same techniques as OCR algorithms, greyscale and contrast enhancements, before moving onto the parts of the algorithms where they began to make vectors from the raster data matrixes they had extracted. Compared to the current state of the art in object detection in computer vision, which is admittedly something I have much more recently dug into the algorithms behind, it feels like a lot of vectorisation software is practically in the Stone Age.