POV-Ray : Newsgroups : povray.advanced-users : Perfect Antialiasing ??? Server Time
29 Jul 2024 06:16:18 EDT (-0400)
  Perfect Antialiasing ??? (Message 11 to 20 of 24)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 4 Messages >>>
From: Dennis Clarke
Subject: Re: Perfect Antialiasing ???
Date: 22 Apr 2003 19:01:19
Message: <Pine.GSO.4.53.0304221845420.6559@blastwave>
On Tue, 22 Apr 2003, Christopher James Huff wrote:
>In article <Pine.GSO.4.53.0304221425230.5704@blastwave>,
> Dennis Clarke <dcl### [at] blastwaveorg> wrote:
>
>>   is that a gaussian function that is applied to calculate the anti-aliased
>> value of the pixel or simply the average of pixels within a 10 pixel radius.
>> Then again, are we talking a square of 10x10 and not a radius of 10 pixels?
>
>This is antialiasing, not blur. We are supersampling a single pixel.

  In what way is antialiasing within a single pixel different from blur of
 a single pixel.  They are essentially the same thing n'est pas?  My thoughts
 on this are that you can have a +r3 antialias approach in which a 3x3 grid
 should be laid down within a single pixel and then the average of the RGB
 values calculated at the center.  The concept of blur would be the same yes?
 Simply with a blur you would increase the resolution of the image by a factor
 of 3 in each dimension and then calculate the average RGB values within a
 central pixel from the surrounding 3x3 pixels.  Is the real difference, if
 any, that this is more like a digital convolution by using a comb filter
 function with a 3x3 identity matrix ( all 1's ) and therefore the central
 pixel value would be including its neighbors while anti-aliasing does not
 include its neighbors at all?  Is the sampling matrix that is used for the
 average actually all 1's or is it 1/sqrt(2) on the corners and sqrt(2/3)
 on the edges?

 antialias matrix for 3x3 within a single pixel

     +--------+--------+--------+
     |        |        |        |
     |   p    |    q   |    p   |   where p = 1/sqrt(2)  and
     |        |        |        |
     +--------+--------+--------+         q = sqrt(2/3)
     |        |        |        |
     |   q    |    1   |    q   |
     |        |        |        |
     +--------+--------+--------+
     |        |        |        |
     |   p    |    q   |    p   |
     |        |        |        |
     +--------+--------+--------+


 I'm just thinking via my keyboard here ..

 Dennis


Post a reply to this message

From: Slime
Subject: Re: Perfect Antialiasing ???
Date: 22 Apr 2003 19:28:49
Message: <3ea5d031$1@news.povray.org>
>   In what way is antialiasing within a single pixel different from blur of
>  a single pixel.  They are essentially the same thing n'est pas?  My
thoughts
>  on this are that you can have a +r3 antialias approach in which a 3x3
grid
>  should be laid down within a single pixel and then the average of the RGB
>  values calculated at the center.  The concept of blur would be the same
yes?


Not really, since with blurring, adjacent pixels would bleed into each
other.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Christopher James Huff
Subject: Re: Perfect Antialiasing ???
Date: 22 Apr 2003 23:04:41
Message: <cjameshuff-C25824.23042922042003@netplex.aussie.org>
In article <3EA### [at] gmxde>,
 Christoph Hormann <chr### [at] gmxde> wrote:

> If you scale down a larger render you can additionally reduce aliasing
> artefacts by applying blurring filters before the scaling.

This can be handled by a good scaling algorithm. There are many 
possibilities...for example, the Mac program GraphicConverter offers 
these scaling algorithms:
QuickDraw/Quartz
Bicubic
Bicubic with dither
Smooth
Box
Triangle
Bell
B-Spline
Sinus
Lanczos 3
Mitchell

Manually blurring won't help much here, if at all. It really only helps 
with the "nearest neighbor" algorithm, which won't be used by any decent 
graphics program and would be useless for removing aliasing. I doubt 
there is any program that has a blur filter and which uses nearest 
neighbor, and blurring the source image will probably just interfere 
with these algorithms.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Perfect Antialiasing ???
Date: 22 Apr 2003 23:11:53
Message: <cjameshuff-13B046.23115122042003@netplex.aussie.org>
In article <Pine.GSO.4.53.0304221845420.6559@blastwave>,
 Dennis Clarke <dcl### [at] blastwaveorg> wrote:

>   In what way is antialiasing within a single pixel different from blur of
>  a single pixel.

You can't blur a pixel, you need a set of pixels. The algorithm used is 
somewhat similar, but the goal and result are different. Blurring 
removes information from an image, spreading colors out across adjacent 
pixels. Antialiasing adds data, coloring each pixel with the overall 
color of the area it covers instead of a single point within that area, 
and is not dependant on the colors of adjacent pixels. You can use an 
antialiasing algorithm with a large image as input, but you will get a 
smaller image as a result.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Dennis Clarke
Subject: Re: Perfect Antialiasing ???
Date: 23 Apr 2003 02:38:06
Message: <Pine.GSO.4.53.0304230228300.7720@blastwave>
On Tue, 22 Apr 2003, Christopher James Huff wrote:
>In article <Pine.GSO.4.53.0304221845420.6559@blastwave>,
> Dennis Clarke <dcl### [at] blastwaveorg> wrote:
>
>>   In what way is antialiasing within a single pixel different from blur of
>>  a single pixel.
>
>You can't blur a pixel, you need a set of pixels. The algorithm used is
>somewhat similar, but the goal and result are different. Blurring
>removes information from an image, spreading colors out across adjacent
>pixels.

  well .. not really.  If by "blur" we mean the optical result of an image
 being out-of-focus then the data is all there, simply not arranged in a
 fashion that people prefer.  A digital blur of a digital image by way of
 a gaussian ( or similar algorithm ) approach merely distributes the data.
 There are algorithms that will un-blur an image.  These are the same tools
 that are used to unblur the linear movement of a projectile or the rotation
 of an engine component within a photograph.

> Antialiasing adds data, coloring each pixel with the overall
>color of the area it covers instead of a single point within that area,
>and is not dependant on the colors of adjacent pixels.

  ok .. I'm with you on that.  We are talking about using multiple sample
  points within a pixel then, probably distributed as a square matrix of
  samples.  This would be the same then as simply having a higher resolution
  image and then doing a blur of the pixels on a block by block basis while
  ignoring neighbors.  At least that is how I perceive the issue.  The
  removal of jagged edges on lines and sharp boundaries can be achieved with
  either a high resolution image blured or a low-resolution image with a
  multi-sample per pixel approach.

> You can use an
>antialiasing algorithm with a large image as input, but you will get a
>smaller image as a result.

  well yes, that is clear.  It makes no difference whether you sample each
  pixel 9 times ( 3x3 ) within a 100x100 data array or simply blur the 3x3
  pixel blocks of a 300x300 data array to produce a 100x100 result set. I
  think, however, that the result from the latter would be smoother than the
  former.

Dennis


Post a reply to this message

From: Peter Popov
Subject: Re: Perfect Antialiasing ???
Date: 23 Apr 2003 03:59:07
Message: <jshcavomts2nvma6edrvim84npc3lrvp3o@4ax.com>
On Tue, 22 Apr 2003 19:21:20 +0100, "Andrew Coppin"
<orp### [at] btinternetcom> wrote:

>(From someone who has now MEMORISED the zillion-digit product key for my
>copy of Windows 2000 Advanced Server... what does that tell you???)

That you had to reinstall it so many times you have the number burned
on your retina?


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Peter Popov
Subject: Re: Perfect Antialiasing ???
Date: 23 Apr 2003 04:04:22
Message: <22icav4v4rfsmsaue3rbijffon1g935u3h@4ax.com>
On Tue, 22 Apr 2003 23:04:29 -0400, Christopher James Huff
<cja### [at] earthlinknet> wrote:

>Manually blurring won't help much here, if at all. It really only helps 
>with the "nearest neighbor" algorithm, which won't be used by any decent 
>graphics program and would be useless for removing aliasing.

Disagreed. Perhaps you're confusing blur with mosaic here? Mosaic does
wonders with nearest neighbor, if you scale down by an integer factor
and use the same number for the mosaic size. Thus you get the exact
same result as +a0.0 +rn, where n is the scale factor.

Gaussian blur helps a lot in most other downsampling algorithms, with
the slight drawback that some careful work with unsharp mask is need
after the resizing to bring out the (now) subpixel details.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Andrew Coppin
Subject: Re: Perfect Antialiasing ???
Date: 23 Apr 2003 13:54:34
Message: <3ea6d35a$1@news.povray.org>
> That you had to reinstall it so many times you have the number burned
> on your retina?

BINGO!

Andrew.


Post a reply to this message

From: Christopher James Huff
Subject: Re: Perfect Antialiasing ???
Date: 23 Apr 2003 19:52:23
Message: <cjameshuff-C0F4A1.19521923042003@netplex.aussie.org>
In article <22icav4v4rfsmsaue3rbijffon1g935u3h@4ax.com>,
 Peter Popov <pet### [at] vipbg> wrote:

> Disagreed. Perhaps you're confusing blur with mosaic here? Mosaic does
> wonders with nearest neighbor, if you scale down by an integer factor
> and use the same number for the mosaic size. Thus you get the exact
> same result as +a0.0 +rn, where n is the scale factor.

No, I am thinking of blur. (How could I confuse it with mosaiac?!?)
And mosaiac will only "do wonders with nearest neighbor" if it does just 
what the resampling algorithm would do anyway. What you suggest here is 
equivalent to downsampling with some good algorithm, upsampling back to 
the original size with nearest neighbor, and then downsampling again 
with nearest neighbor. You also assume mosaiac itself doesn't use 
nearest neighbor.


> Gaussian blur helps a lot in most other downsampling algorithms, with
> the slight drawback that some careful work with unsharp mask is need
> after the resizing to bring out the (now) subpixel details.

And this can all be handled by the downsampling algorithm itself, in 
which case you will just be doing more work than necessary at best, or 
get in its way and get inferior results at the worst. A good algorithm 
will sample the area around the destination pixel, if the source image 
is blurred you will get bleed over in the final image. The resulting 
image will be blurrier than it should be.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Perfect Antialiasing ???
Date: 23 Apr 2003 20:06:31
Message: <cjameshuff-8FCB52.20063123042003@netplex.aussie.org>
In article <Pine.GSO.4.53.0304230228300.7720@blastwave>,
 Dennis Clarke <dcl### [at] blastwaveorg> wrote:

>   well .. not really.  If by "blur" we mean the optical result of an image
>  being out-of-focus then the data is all there, simply not arranged in a
>  fashion that people prefer. 

No, the blurred image contains less information. Small details are gone, 
geometry and spatial information is lost.


> A digital blur of a digital image by way of
>  a gaussian ( or similar algorithm ) approach merely distributes the data.
>  There are algorithms that will un-blur an image. 

No there aren't, not in the way you seem to be thinking anyway. You've 
watched too many Hollywood movies. Information is irretrievably lost in 
the blur process, you can not recover the exact original.


> These are the same tools
>  that are used to unblur the linear movement of a projectile or the rotation
>  of an engine component within a photograph.

This is a bit different...you have information about the motion other 
than what is contained in the photo, and can use that to at least 
partially reconstruct the original. And then you can't completely 
recover the original.


>   ok .. I'm with you on that.  We are talking about using multiple sample
>   points within a pixel then, probably distributed as a square matrix of
>   samples.  This would be the same then as simply having a higher resolution
>   image and then doing a blur of the pixels on a block by block basis while
>   ignoring neighbors.  At least that is how I perceive the issue.  The
>   removal of jagged edges on lines and sharp boundaries can be achieved with
>   either a high resolution image blured or a low-resolution image with a
>   multi-sample per pixel approach.

Go ahead and blur a high-res image...you get a blurry high-res image 
with no edges, not a smooth-edged one. Antialiasing requires inputting 
several samples and outputting one, you have to end up with a smaller 
image.


>   well yes, that is clear.  It makes no difference whether you sample each
>   pixel 9 times ( 3x3 ) within a 100x100 data array or simply blur the 3x3
>   pixel blocks of a 300x300 data array to produce a 100x100 result set. I
>   think, however, that the result from the latter would be smoother than the
>   former.

You don't get a smaller result set with a blur, you get one of the same 
size as the source data. What you are talking about is downsampling.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 4 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.