View Full Version : Is there a chromatic aberration filter?
Malow
11th August 2006, 06:31
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!
Mug Funky
11th August 2006, 06:54
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.
Malow
11th August 2006, 07:05
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...
Blue_MiSfit
11th August 2006, 09:30
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).
Backwoods
11th August 2006, 21:02
ChromaShift might help you.
http://www.geocities.com/siwalters_uk/chromashift26a.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
Fizick
11th August 2006, 23:03
Usually CA is dependent on zoom factor
Malow
12th August 2006, 08:47
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...
http://images6.theimagehosting.com/ca.077.th.JPG (http://server6.theimagehosting.com/image.php?img=ca.077.JPG)
http://images6.theimagehosting.com/noca.th.JPG (http://server6.theimagehosting.com/image.php?img=noca.JPG)
Malow
12th August 2006, 09:06
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...
JMP
12th August 2006, 09:09
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 :)
Malow
12th August 2006, 09:20
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!
IanB
12th August 2006, 10:35
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.
JMP
12th August 2006, 11:36
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...
Malow
13th August 2006, 05:13
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"
JMP
13th August 2006, 08:28
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.
Fizick
13th August 2006, 10:07
I am not sure, that abberations value is linear along radius.
JMP
13th August 2006, 10:35
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).
Fizick
13th August 2006, 11:20
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.
Backwoods
13th August 2006, 22:31
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
Malow
14th August 2006, 04:48
i think zoom info is not included... :(
redfordxx
8th January 2008, 00:58
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
a uio
21st April 2008, 22:17
Some good links on Chromatic Aberration:
http://en.wikipedia.org/wiki/Chromatic_aberration
http://wiki.panotools.org/Chromatic_aberration
Cheers,
A
a uio
21st April 2008, 22:37
I recently tested my Sony Fx1 for Chromatic Aberration and did indeed find that it is zoom dependent, even to the point of reversing. The red channel is larger than the green channel on full wide, and the red channel is smaller than the green channel on full zoom in. The difference on either end is .1%.
Cheers,
A
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.