Board index » delphi » Oil Painting effect

Oil Painting effect


2005-10-12 09:27:42 AM
delphi73
Hi,
I've been searching this for a long time but in vain. May anyone help?
How to process an Image to an Oil-Painting like one.
EX:
Original
delphi.ktop.com.tw/download/upload/79665_0.bmp
Oil Painting Effect
delphi.ktop.com.tw/download/upload/79667_g.bmp
Thanks,
Daniel
 
 

Re:Oil Painting effect

Daniel,
Daniel writes:
Quote
I've been searching this for a long time but in vain. May anyone
help? How to process an Image to an Oil-Painting like one.

EX:
Original
delphi.ktop.com.tw/download/upload/79665_0.bmp


Oil Painting Effect
delphi.ktop.com.tw/download/upload/79667_g.bmp
The basis of this effect is called posterization.
The trick is to convert all colors to the nearest color in a limited
palette.
Usually, in other applications, this is done with dithering, which mean you
bring the error in one pixel to the neighbouring pixels before rounding
those neighbouring pixels, so as to try and compensate an error in one pixel
with opposite errors in neighbour pixels, so as to minimize overall image
error.
In this posterization, however, you don't dither. This means that a complete
shape with all sorts of close tints of some brown, all get converted to the
same brown. Hence the posterization effect.
Posterization works best if the actual palette is good. Various tricks to
come up with a pleasing palette, is quantization to a very limited palette,
or simply using a palette that is equally spaced in some color space.
Often times, the effect can also made more pleasing by applying a gaussian
blur before the posterization algorithm.
So, depending on what this is worth for you, you could spend a day or a week
on this... Start with googling on 'posterize', 'quantize', and 'guassian
blur'.
--
Joris Van Damme
XXXX@XXXXX.COM
www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
www.awaresystems.be/imaging/tiff/astifftagviewer.html
 

Re:Oil Painting effect

Quote
The trick is to convert all colors to the nearest color in a limited
palette.
Posterization works best if the actual palette is good.
I can convert image in less colors, but not in few colors (less than 256),
means I didn't get a good pallette. Any source code available?
I tried to resample each pixel color by reference its neighbors pixels ( n*n
array). But the bigger the n is, the longer the time will takes. The result
is good, but the time is too long.
Is there any source available of Posterization?
thanks.
Daniel
"Joris Van Damme" <XXXX@XXXXX.COM>glsD:434ce01e$XXXX@XXXXX.COM...
Quote
Daniel,

Daniel writes:
>I've been searching this for a long time but in vain. May anyone
>help? How to process an Image to an Oil-Painting like one.
>
>EX:
>Original
>delphi.ktop.com.tw/download/upload/79665_0.bmp
>
>
>Oil Painting Effect
>delphi.ktop.com.tw/download/upload/79667_g.bmp

The basis of this effect is called posterization.

The trick is to convert all colors to the nearest color in a limited
palette.

Usually, in other applications, this is done with dithering, which mean
you
bring the error in one pixel to the neighbouring pixels before rounding
those neighbouring pixels, so as to try and compensate an error in one
pixel
with opposite errors in neighbour pixels, so as to minimize overall image
error.

In this posterization, however, you don't dither. This means that a
complete
shape with all sorts of close tints of some brown, all get converted to
the
same brown. Hence the posterization effect.

Posterization works best if the actual palette is good. Various tricks to
come up with a pleasing palette, is quantization to a very limited
palette,
or simply using a palette that is equally spaced in some color space.

Often times, the effect can also made more pleasing by applying a gaussian
blur before the posterization algorithm.

So, depending on what this is worth for you, you could spend a day or a
week
on this... Start with googling on 'posterize', 'quantize', and 'guassian
blur'.

--
Joris Van Damme
XXXX@XXXXX.COM
www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
www.awaresystems.be/imaging/tiff/astifftagviewer.html