(a apologize in advance for this long post...i will see if i can condense it better and make it read better for the spec when i get around to this... i hope you can understand it.)
Sorry for hi-jacking the object width post.....
I think I will flesh out some of my ideas on this topic here:
for those who missed that (on the end of the other post)...
I was saying that one of my PET ideas (that i would really like to see coded):
Is a new process (that i do manually) or tool set to help aid in the process of manual (semi-auto) vetorizaton of high quality rater images.
This idea specifically refers to paletted (256 colour) images... and works best with high quality images.
This tool manage the palette (256 colours) and allow the user to pick out important colours (to be maintained) and then quickly reduce and consolidate low priority colours (colours with low pixel counts and that are very close to other colours) with a slider....
This way the user could quickly pick out key colours and reduce the image nicely without risking corrupting the desired components.
(sometimes a paint program can do this reduction properly without any need for manual palette consolidation...
But this app/process is more manual in that it allows the user to reduce the palette in a controlled way very quickly
and to produce perfect results every time...)
Also this utility would allow the user to create quick reductions to produce various custom shapes and to produce a variety of different reductions (palettes) to suit different purposes....
With this new a tool you could quickly create awesome vector pieces from high quality raster images.....
This application/tool set would have 2 tiers.
1) The Palette management tools....
These would help produce palette reduced versions of the image...
2) And the Auto vector tools....
These would be applied to the simplified images to create quick vector paths base on the palette reduced images.
Initially i see this process as applying specifically to 256 colour (paletted) images....But if larger paletted images are possible than all the better.
These would be reduced in a very controlled way so the user can manually, with the help of some nifty tools quickly reduce a 256 colour image to (say) 15 or 16 colours and have it RIPE for vectorization.....!
While it is true that most raster paint apps have excellent palette reduction routines...even the best of these does not always keep all the colours you might need when you reduce ..... and how other colours are consolidated can sometimes be done in ways that are not quite right....(for this purpose)
(I.e. with the intention of using this reduced image to manually trace to create a stunning vector piece.
IE this is a process (as i Said) i normally do manually when i am doing a large piece....vector piece...based on a raster image...
IE i will painstakingly consolidate the palette colours...... which normally takes an hour or so.....
So that a 256 colour image becomes a 15-20 colour image with only the colours i have selected and consolidated in a very controlled way.......
I will also create one or more intermediate reductions....
This method could have the potential (with the help of some additonal toolsets) to give the ability (to any inkscape user) the ability to produce very professional looking vector art from any hi-res raster image!!!
IE pictures of their friends ETC.....The potential is awesome...not to mention the designer anyway.....
I have done this process of pallete consolidation dozens of times for many projects i have done (mainly in the embroidery field as i am a digitizer of some 10 years or more)......
But it is a process which can apply to any vector project that has as its basis a high quality rater image......
anyway...
first i reduce the image to a 256 colour paletized image in paint shop pro (primitive i know LOL)
Then i basically find colours which have very low pixel counts and copy colours from neibouring more abundant colours so as to consolidate low pixel colours into more important high pixel count colours....
to do this i see there being a palette on the right hand side of the window that would have 2 main pallete views:
1)Full palette View: to show the 256 colour palete as it is IE all colours....and
2)Reduced palette view: to show only the consolidated number of squares....
so the first palette view would always have 256 squares but could be re-ordered in different ways to help with the reduction process.
IE.. it could be ordered by pixel count so that colours with hardly any pixels would be last....(and the user could select these an consolidate them first.)
Its default order would show all of the consolidated colours together in groups....
This would show all the 256 colours with consolidated colours together in groups....
IE if you reduce the palette to 25 colours then each of these colours in the reduced palette would represent (say on average) 10 colours in the full palette.
The reduced palette view would show each of the groups in the full pallete view as only one square and so thus would be an indicator of how many colours you had reduced to and each palette square here would represent a group on the full palette view.
Passing your mouse over any of these squares on the pallete (in any view) would actually flash this colour/s to a very high contrast colour so as you could fly over the palletes and instantly see which colour/s applied to where on the image......
From the Full palette: by pressing (clicking on any pallete colour positions and pressing it down like a button) you could lock any palette colour so as this would then be tagged as a "seed colour" and would not be consolidated...
but would instead form the seed for a new pallete group "shown in the consolidated palette view.......
Then you could manually from the full pallet view drag other colours on top of this master colour so as to add them to group....or you could drag a slider which would do this for you automatically.....
N.B when you manually added a colour to a group it would stay there perhaps with a little lock or dot in the corner to show this.
But if you used the slider to reduce the pallete then alot colours would be added to groups and you could lock them in or not...
then move the slider back and forward ETC...
Also you could place your mouse on the image and the palette square associated with any colour you were over would highlight and you could select colours this way too!
Also i think it would be useful if the full palette view had 2 different modes so that you could have a show groups option....
this option when on would group all the consolideated colours together in groups perhaps boarderd by boxes...with the main colour (seed colour being depressed like a button) also i think it would be nice of you could lock groups or lock colours into certain groups Im not sure about this yet but anyway).....the other mode would allow this palette to be displayed in a different way so that the colours would not be shown in their groups (but be shown as sepperate) and thus would be able to be ordered in different ways IE order by: pallete position, pixel count , hue ETC) and in this mode grouped colours would have a little individual boarders to show that they were part of a group already but you would not see which one until you put your mouse over it at which point all its "brothers" would flash once (or thier boarders would change colour) as already discussed and colours yet to belong to a group would not have such a boarder in this view....
so from this view mode you could order the pallete say by pixel count (ie having them from highest to lowest pixel counts ETC....) and this would allow the user to quickly identify low pixel count (useless colours) and reduce them quick smart by dragging them on top of an already grouped colour so as to add it to this group.....
To aid in this process , moving the cursor over an un grouped colour would (as well as what has already been discussed) also indicate the 10 closest colour matches with little numbers over these colours..
So that the user could choose the best colour to add this to....
Then back in grouped view you could see each group.....
Also in grouped mode you could change which colour in this group was the display colour for this group....(IE the seed colour..) this would help tweaking the actual colour displayed for this group in the final consolidation
in addition to this... to make it very fast... i think a slider down the bottom could be employed to change the number of displayed colours (ie auto consolidate)......
So what the user could do is click on and select the main colours in the image quickly and then drag the slider up and down and see what happens.... ie and as the user did this low pixel count colours would be consolidated into higher ones in a gradiated way depending on how much you moved the slider.....
bare in mind that this would not alter the image at all but would (internally) just be shuffeling the 256 colour pallete)....
Then the user could just watch and see if anything they liked was consolidated out of existence as they moved the slider....
then if this did happen just move the slider back untill it reappeared and click and lock this colour in...
this way very quickly an image could be reduced to a very useful start for effective vetorization...
So i hope i have not been too complex or vague in my explanation but with such a system you could quickly reduce the colours with the slider and tweak it as you go by picking your own seeds.....
Then you could edit this etc..
- - - - - - - - - -
Basic one click vectorization by assigning z order.....
The other part of the coin here would be the tools for the vector part of it..
The way i see it is this:
The brain of a vector artist when it sees a 256 colour image can visualize it as stacked layers....
But in reality they are just pixels which are in banded rings (generalising)..
I.e the artist may visualize the darkest colour being at the bottom where by the next colour above this covers most of the inside of this shape....
IE stacked layers that are filled inside...
IE the bottom layer of the pyramid is solid (filled) not a hole....So that this bottom layer is not ring with a hole in the middle (ie so the whole design is then flat...no layerers...but more like a wild jigsaw puzzle)this is the wrong perspective...
The right one sees all layers as filled where other layers (colours) are over the top of them....
So that a picture with 20 colours could be vectorized in 20 layers...one for each colour....
With a z order usually from the darkest colour to the lightest.....
The user would simply have to assign the colours a Z order and generate the layers...
based on the z order higher layers (top) would automatically fill holes in the layer below....
Generating a gradated set of layers one for each colour.....
This would only be one tool for vetorizing there would be others to generate outlines from images with allot more colours...
like for example picking a colour and then dragging outwards which would automatically trace around this colour and then as you drag out concentrically increase this trace to the next colour eCT....
Any way ill have to work on the spec...
PALETTE consolidation/semi-auto vectorization
- David Hewitt
- Posts: 142
- Joined: Sun Jan 11, 2009 4:10 pm
PALETTE consolidation/semi-auto vectorization
Last edited by David Hewitt on Mon Feb 16, 2009 4:06 pm, edited 3 times in total.
Re: Vectorising specific shapes in a bitmap
I think you could do what you are wanting already using . The paint bucket tool actually works on the rasterised information on the canvas using the same trace function as Trace Bitmap. So if you have part of a bitmap you would like to vectorise, the paint bucket tool will do exactly that. The paint bucket tool doesn't work the way people think, so read http://tavmjong.free.fr/INKSCAPE/MANUAL ... ucket.html to get a good understanding of it.
- David Hewitt
- Posts: 142
- Joined: Sun Jan 11, 2009 4:10 pm
Re: PALETTE consolidation/semi-auto vectorization
Ok actually ink-scape is allot more developed than i realized...a few weeks ago i had never heard of it...
right off my radar actually...I'm not yet sure if the paint tool works exactly so as to fulful my dreams but then again just from a preliminary browse... it looks pretty damn good anyway...(quite impressive actually)
I'm going to need to do a bit of reading before i continue this discussion...(and ask a few really dumb questions i'm afraid on the other forum...see you there....
right off my radar actually...I'm not yet sure if the paint tool works exactly so as to fulful my dreams but then again just from a preliminary browse... it looks pretty damn good anyway...(quite impressive actually)
I'm going to need to do a bit of reading before i continue this discussion...(and ask a few really dumb questions i'm afraid on the other forum...see you there....