List Info

Thread: Simulating or correcting chromatic aberration




Simulating or correcting chromatic aberration
user name
2006-09-03 19:16:33
Hi!

I was trying to simulate chromatic aberration using the
following command:

convert -channel Red -affine 0.9,0,0,0.9,0,0 -transform
-channel Blue 
-affine 1.1,0,0,1.1,0,0 -transform +channel -resize 800x600
-quality 90 
-sampling-factor 1x1 input.jpg output.jpg

The idea being that by scaling each channel separately (and
not scaling 
green) I could emulate (or correct a lens) chromatic
aberration.

The results are nil thought... what's wrong with my
command?
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
Simulating or correcting chromatic aberration
user name
2006-09-04 05:07:23
Rodrigo Cunha on  wrote...
| Hi!
| 
| I was trying to simulate chromatic aberration using the
following command:
| 
| convert -channel Red -affine 0.9,0,0,0.9,0,0 -transform
-channel Blue 
| -affine 1.1,0,0,1.1,0,0 -transform +channel -resize
800x600 -quality 90 
| -sampling-factor 1x1 input.jpg output.jpg
| 
| The idea being that by scaling each channel separately
(and not scaling 
| green) I could emulate (or correct a lens) chromatic
aberration.
| 
| The results are nil thought... what's wrong with my
command?

I do not think -affine understands -channel settings.  would
be
supprised if it did as it does interpolation of colors to
generate new
pixels that would in the old image fall between pixels.

I think you would be better off separating each RGB channel
(using
-separate) adjusting the size of the images, and cropping
them so they
are all the same size, then -combine them back together
again.

See Channels
  http://www.cit.gu.edu.au/~anthony/graphics/imagick6
/channels/


  Anthony Thyssen ( System Programmer )    <A.Thyssengriffith.edu.au>
 -----------------------------------------------------------
------------------
   No one ever listens to Zatheris. "Quite
Mad!", thay say. It is good
   the Zatheris does not mind.  He has even grown to like
it.  Oh yes!
                    -- Zatheris's Mumbling,  Bablyon 5,
"War Without End"
 -----------------------------------------------------------
------------------
     Anthony's Home is his Castle     http://www.cit.gu.
edu.au/~anthony/
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )