Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th August 2006, 05:31   #1  |  Link
Malow
In bytes we trust
 
Malow's Avatar
 
Join Date: Oct 2002
Location: Torres Beach, Brazil
Posts: 279
Is there a chromatic aberration filter?

hi, i will just enter in hdv world, (actualy using pro-dv) with canon XL-H1, but, this camera with "default" lens has serious chromatic aberration problems...

i will convert to cineform intermediate via avisynth, and i was wondering if exist a filter for CA filtering... is there any?

tnks!

Last edited by Malow; 11th August 2006 at 05:33.
Malow is offline   Reply With Quote
Old 11th August 2006, 05:54   #2  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
eeks. that'd be good, but i don't know of one.

it _might_ be possible to use something like mvtools (with a large blocksize) to compensate the red and blue channels onto the green one, then merge back in.

...but i've yet to try this, and most likely there'll still be smears of yellow and purple left behind.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 11th August 2006, 06:05   #3  |  Link
Malow
In bytes we trust
 
Malow's Avatar
 
Join Date: Oct 2002
Location: Torres Beach, Brazil
Posts: 279
mmm i will "try" to test... (i just used mvtools a bit)

there are some good filters for photoshop and paint shop to correct CA, whith very good results, so, i will pray for a holy man to do a "video" version...

what is the "logic" of clean CA? detect a linear color near a bright edge? smooth and shift? aparently CA is a "radial" problem, with more effect on borders of video...
Malow is offline   Reply With Quote
Old 11th August 2006, 08:30   #4  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
Fantastic camera, the XL-H1. A coworker of mine just got his. I would second your opinion that the default lens suffers from chromatic abberation. It is an excellent camera otherwise.

I would also be interested in testing filters on some sample clips I have (nearly 5 GB of gorgeous 1080i HDV).
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 11th August 2006, 20:02   #5  |  Link
Backwoods
ReMember
 
Backwoods's Avatar
 
Join Date: Nov 2003
Posts: 416
ChromaShift might help you.
http://www.geocities.com/siwalters_u...mashift26a.zip

There is a VirtualDub filter just for CA but I haven't tested it yet. I forget the name of that filter.

EDIT: Here you go, http://dsp.ucsd.edu/~wgardner/VirtualDub.htm

Last edited by Backwoods; 11th August 2006 at 20:50.
Backwoods is offline   Reply With Quote
Old 11th August 2006, 22:03   #6  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Usually CA is dependent on zoom factor
Fizick is offline   Reply With Quote
Old 12th August 2006, 07:47   #7  |  Link
Malow
In bytes we trust
 
Malow's Avatar
 
Join Date: Oct 2002
Location: Torres Beach, Brazil
Posts: 279
mmmm i think i found a easy way... as CA for VD says, is just zoom the channel, i do a script like this:

ConvertToRGB24()
MergeRGB(Last, lanczosresize(1442,1082).crop(1,1,-1,-1), Last)

it separate , zoom and crop the channel.

a few tests show a nice result. will try to tweak...


Last edited by Malow; 12th August 2006 at 07:53.
Malow is offline   Reply With Quote
Old 12th August 2006, 08:06   #8  |  Link
Malow
In bytes we trust
 
Malow's Avatar
 
Join Date: Oct 2002
Location: Torres Beach, Brazil
Posts: 279
Quote:
Originally Posted by Fizick
Usually CA is dependent on zoom factor
yeah, u are right.
now "this is a problem"...

i gess i wil make 2 scripts, one for no zoom, and other for medium zoom...

in full zoom it show almost no CA... OMG...
Malow is offline   Reply With Quote
Old 12th August 2006, 08:09   #9  |  Link
JMP
Registered User
 
Join Date: Jul 2006
Posts: 29
Ehm... You surely know that you can do ...lanczosresize(1440,1080,1,1,-1,-1)...
to have it faster? OK, strictly speaking it is different, because it crops before resizing, but I don't think it makes any difference in your case

Last edited by JMP; 12th August 2006 at 08:18.
JMP is offline   Reply With Quote
Old 12th August 2006, 08:20   #10  |  Link
Malow
In bytes we trust
 
Malow's Avatar
 
Join Date: Oct 2002
Location: Torres Beach, Brazil
Posts: 279
Quote:
Originally Posted by JMP
Ehm... You surely know that you can do ...lanczosresize(1440,1080,1,1,-1,-1)...
to have it faster? OK, strictly speaking it is different, because it crops before resizing, but I don't think it makes any difference in your case
mmm... NOW i know... tnks!
Malow is offline   Reply With Quote
Old 12th August 2006, 09:35   #11  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
Note!
...resize(1440,1080,1,1,-1,-1)
versus
...resize(1442,1082).crop(1,1,-1,-1)

Are not exactly the same. The boundary conditions in the resizer are different. In the first case the edge row of pixels are not used in the output image, in the second they are. A very minor point.

Also the cropping factors on the resizers are floating point numbers so you can get subpixel adjustment if required.

And as your resize percentage change is very small you might experiment with the taps=N option of lanczos.
IanB is offline   Reply With Quote
Old 12th August 2006, 10:36   #12  |  Link
JMP
Registered User
 
Join Date: Jul 2006
Posts: 29
Quote:
Originally Posted by IanB
Also the cropping factors on the resizers are floating point numbers so you can get subpixel adjustment if required.
...and that can be very useful in this specific case - as it is rather unlikely, that the aberration is by a whole number of pixels exactly...
JMP is offline   Reply With Quote
Old 13th August 2006, 04:13   #13  |  Link
Malow
In bytes we trust
 
Malow's Avatar
 
Join Date: Oct 2002
Location: Torres Beach, Brazil
Posts: 279
it may be necessary subpixel, because the best settings show as 4 pixel zoom for green (2--2) ans 2 for red (1--1)

if processing interlaced content, i will need 0.5--0.5 for red, or maybe lower (0.25--0.25)

or even maybe the inverse precess (reduce other colors keping green)

wavelengths info show a proportional deviation about 1% for red and 2% for green (as blue for base)

my case looks exactly this.

i will try to do a test to see "witch one of RGB" is better to upzise/undersize"

Last edited by Malow; 13th August 2006 at 04:17.
Malow is offline   Reply With Quote
Old 13th August 2006, 07:28   #14  |  Link
JMP
Registered User
 
Join Date: Jul 2006
Posts: 29
Actually the lens is probably axially symmetrical, thus the aberration should be symmetrical around the center of the frame. Therefore may I suggest ...resize(1440,1080,1,0.75,-1,-0.75)... would possibly be even better.
JMP is offline   Reply With Quote
Old 13th August 2006, 09:07   #15  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
I am not sure, that abberations value is linear along radius.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 13th August 2006, 09:35   #16  |  Link
JMP
Registered User
 
Join Date: Jul 2006
Posts: 29
Quote:
Originally Posted by Fizick
I am not sure, that abberations value is linear along radius.
Actually, recalling my somewhat rusty knowledge of geometrical optics, it should probably be close to linear. Chromatic aberration appears because the focal length of a lens system changes with the light wavelength. And changing the focal length results, at least in the "thin lens" approximation, in simple image rescaling (and slight defocusing).
JMP is offline   Reply With Quote
Old 13th August 2006, 10:20   #17  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
The real lens in not simple 1-glass. It consist of many glasses, and projected to compensate chromatic abbearration for some zones.

Other point. I know about one program which can get per-frame exposition info from DV stream (probably zoom too).
http://forum.doom9.org/showthread.php?t=114669
maybe it is possible get such info from HDV steam too (with other program), write to some file?, and use somehow.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 13th August 2006, 21:31   #18  |  Link
Backwoods
ReMember
 
Backwoods's Avatar
 
Join Date: Nov 2003
Posts: 416
Quote:
Originally Posted by Fizick
maybe it is possible get such info from HDV steam too (with other program), write to some file?, and use somehow.
HDVInfo
http://forum.doom9.org/showthread.php?t=110021
Backwoods is offline   Reply With Quote
Old 14th August 2006, 03:48   #19  |  Link
Malow
In bytes we trust
 
Malow's Avatar
 
Join Date: Oct 2002
Location: Torres Beach, Brazil
Posts: 279
i think zoom info is not included...
Malow is offline   Reply With Quote
Old 8th January 2008, 00:58   #20  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
Hi, Malow

what is your latest script you developed?

I am looking for a way for batch processing of digital camera pictures to remove CA and maybe your script could help...

Thanx
redfordxx is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:11.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.