PL's Convert Layer Type does a very good job of converting a bitmap image to a vector image, maintaining a nice "photorealistic" look. However, most of the time I want just the opposite effect -- a simplified outline drawing:
(The original image is, I think, one of the sample images included in Windows.)
Both Adobe Illustrator and CorelDraw use a "Trace Options" dialog which allows specifying the level of details, the fidelity of the trace and the corner smoothness. These options give a wide range of results, from "photorealistic" to very simplified.
Req: More options for converting bitmap to vector
-
photoken
- Mitglied
- Beiträge: 2162
- Registriert: Sa 28 Sep 2013 01:25
Req: More options for converting bitmap to vector
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
-
Herbert123
- Mitglied
- Beiträge: 2452
- Registriert: Sa 12 Mai 2012 21:38
Re: Req: More options for converting bitmap to vector
I agree that more control over the vector conversion would be extremely useful.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
-
Torsten
- Mitglied
- Beiträge: 551
- Registriert: Mo 28 Nov 2011 09:27
Re: Req: More options for converting bitmap to vector
+1
Cheers Torsten
Cheers Torsten
-
ellhel
- Mitglied
- Beiträge: 1355
- Registriert: Mi 04 Jan 2012 03:03
- Wohnort: Reiffelbach
Re: Req: More options for converting bitmap to vector
...........bring it on
Regards
Helmut
Regards
Helmut
PhotoLine 21 & Betas, Win-10 Pro 64-bit, ACDSee Photo Studio Ultimate 2018, Dxo Optics Pro 9, Panasonic DMC-G6
"Der Nachteil der Intelligenz besteht darin, dass man ununterbrochen gezwungen ist, dazuzulernen."
George Bernard Shaw
"Der Nachteil der Intelligenz besteht darin, dass man ununterbrochen gezwungen ist, dazuzulernen."
George Bernard Shaw
-
bkh
- Beta Tester
- Beiträge: 3687
- Registriert: Do 26 Nov 2009 22:59
Re: Req: More options for converting bitmap to vector
Yes, a more elaborate vector conversion panel would be really useful, and especially a preview of the results. (Maybe it makes sense to change this into a separate command, especially since the result isn't a vector layer but a group …)
Especially when dealing with drawings, the results are often too complex, and it's hard to understand what the different conversion options mean. It's fairly obvious that "Quality" refers to the number of colours used in the conversion, but I haven't figured out how "Photo" and "Drawing" differ.
Imo, the ingredients are already there in PL:
1) simplification of the raster image: Adaptive Soften, Despeckle, Median give useful results.
2) colour reduction – here, it would be nice to have the various reduction methods available.
3) maybe another Median step to get rid of colour reduction artefacts
4) conversion of the individual colours to vector shapes.
5) curve and line optimisation
6) optionally add outlines (as in photoken's example)
Currently, PL only does 2) and 4), as far as I can see. Of course, one can perform steps 1), 2), and 3) manually, before converting to vector layers, and 5) and 6) afterwards, leaving only 4) to PL's vector conversion.
There is one problem, though: after Step 5), different vector layers often don't fit together any more because of different optimisations. This is most visible when manually adding outlines as per 6).
I've just had a look how Inkscape handles this: it traces the top colour layer just like PL, but when tracing subsequent layers, it includes all the area (colours) of the layers above, and the final layer is basically just a solid rectangle. Maybe PL's vector conversion could be changed in a similar way? This would also make sure that there aren't two outlines next to each other when step 6) is added.
Maybe there's also some room for improvement in step 5), as PL often seems to have problems recognising straight lines at an angle.
Cheers
Burkhard.
Especially when dealing with drawings, the results are often too complex, and it's hard to understand what the different conversion options mean. It's fairly obvious that "Quality" refers to the number of colours used in the conversion, but I haven't figured out how "Photo" and "Drawing" differ.
Imo, the ingredients are already there in PL:
1) simplification of the raster image: Adaptive Soften, Despeckle, Median give useful results.
2) colour reduction – here, it would be nice to have the various reduction methods available.
3) maybe another Median step to get rid of colour reduction artefacts
4) conversion of the individual colours to vector shapes.
5) curve and line optimisation
6) optionally add outlines (as in photoken's example)
Currently, PL only does 2) and 4), as far as I can see. Of course, one can perform steps 1), 2), and 3) manually, before converting to vector layers, and 5) and 6) afterwards, leaving only 4) to PL's vector conversion.
There is one problem, though: after Step 5), different vector layers often don't fit together any more because of different optimisations. This is most visible when manually adding outlines as per 6).
I've just had a look how Inkscape handles this: it traces the top colour layer just like PL, but when tracing subsequent layers, it includes all the area (colours) of the layers above, and the final layer is basically just a solid rectangle. Maybe PL's vector conversion could be changed in a similar way? This would also make sure that there aren't two outlines next to each other when step 6) is added.
Maybe there's also some room for improvement in step 5), as PL often seems to have problems recognising straight lines at an angle.
Cheers
Burkhard.
-
photoken
- Mitglied
- Beiträge: 2162
- Registriert: Sa 28 Sep 2013 01:25
Re: Req: More options for converting bitmap to vector
In general, I agree with Burkhard's analysis.
There seem to be three main areas that need to have user input for the conversion:
I would not include Burkhard's option #6 in the Conversion dialog because that is better accomplished by the existing line styles and line colours functions provided by PL. (Now that we can change the line colour for multiple vector layers without affecting the vector fills.
)
("Photo" and "Drawing" seem, to me, to differ in that using the "Drawing" option on a photograph leads to countless little white areas. I admit that this is probably the wrong use of the "Drawing" option.
)
There seem to be three main areas that need to have user input for the conversion:
- Simplification of the original image prior to the conversion. This is done to reduce the amount of tiny image areas that result in tiny vector curves in the final result. As has been mentioned, this simplification is usually accomplished by applying a blur to the image. Adobe Illustrator includes a "Blur" setting in its conversion panel, CorelDraw does not.
- Colour reduction prior to the conversion. Illustrator provides a rudimentary colour reduction capability in its conversion panel, CorelDraw uses a separate tab which has methods similar to PL's Color Reduction dialog.
- Vector simplification and optimization. The most important part of this is simplification -- the "Level of Details" setting which specifies the size below which an area is not considered as a distinct area to be converted to a vector shape. Optimization consists of the usual line tracing fidelity and curve smoothness.
I would not include Burkhard's option #6 in the Conversion dialog because that is better accomplished by the existing line styles and line colours functions provided by PL. (Now that we can change the line colour for multiple vector layers without affecting the vector fills.
("Photo" and "Drawing" seem, to me, to differ in that using the "Drawing" option on a photograph leads to countless little white areas. I admit that this is probably the wrong use of the "Drawing" option.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
-
bkh
- Beta Tester
- Beiträge: 3687
- Registriert: Do 26 Nov 2009 22:59
Re: Req: More options for converting bitmap to vector
Looks like PL already works that way if you select one of the "Photo" settings. Vector optimisation doesn't work as well as I hope, though – mainly because the layers (colours) are chosen in a "random" order.bkh hat geschrieben:YI've just had a look how Inkscape handles this: it traces the top colour layer just like PL, but when tracing subsequent layers, it includes all the area (colours) of the layers above, and the final layer is basically just a solid rectangle. Maybe PL's vector conversion could be changed in a similar way?
Seems that the main problem is caused by antialiasing – when reducing colours, these mixed pixels appear as separate colour layers. "Photo quick" seems to do quite a reasonable job removing that kind of antialiasing.
Cheers
Burkhard.
-
Martin Huber
- Entwickler

- Beiträge: 4298
- Registriert: Di 19 Nov 2002 15:49
Re: Req: More options for converting bitmap to vector
The layers are sorted by the number of pixels having the same color.bkh hat geschrieben:Looks like PL already works that way if you select one of the "Photo" settings. Vector optimisation doesn't work as well as I hope, though – mainly because the layers (colours) are chosen in a "random" order.bkh hat geschrieben:YI've just had a look how Inkscape handles this: it traces the top colour layer just like PL, but when tracing subsequent layers, it includes all the area (colours) of the layers above, and the final layer is basically just a solid rectangle. Maybe PL's vector conversion could be changed in a similar way?
I don't really know how to enhance vector conversion. IMO the technique given above (starting with a rectangle and placing overlapping layer above each other) is flawed by design, because:
- the created vector graphics is very complex (and thus slow)
- the overlapping vector layers share common edges and with antialiasing the edges will be a mixture of all the colors sharing the same edge.
Martin
-
Herbert123
- Mitglied
- Beiträge: 2452
- Registriert: Sa 12 Mai 2012 21:38
Re: Req: More options for converting bitmap to vector
Here are some suggestions:Martin Huber hat geschrieben: The layers are sorted by the number of pixels having the same color.
I don't really know how to enhance vector conversion. IMO the technique given above (starting with a rectangle and placing overlapping layer above each other) is flawed by design, because:
- the created vector graphics is very complex (and thus slow)
- the overlapping vector layers share common edges and with antialiasing the edges will be a mixture of all the colors sharing the same edge.
Martin
- mode: colour, grayscale, B&w
- slider for less or more colours/greyscale values
- slider for paths: low to high (number of paths generated)
- slider for noise: low to high (currently PL introduces a lot of noise in the converted vector)
- slider for corners: from less to more (less corners, more smooth result)
- preview the result while working with the settings. No more need to undo all the time, and (sort-of) instant feedback.
- solution for anti-aliasing: conversions show artifacts because of anti-aliasing.
For algorithm inspiration, check out:
http://arxiv.org/pdf/1403.0728.pdf
http://potrace.sourceforge.net/potrace.pdf
The first article includes references to other methods.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait