POV-Ray : Newsgroups : povray.unofficial.patches : Another post_process idea : Re: Another post_process idea Server Time
2 Sep 2024 06:13:19 EDT (-0400)
  Re: Another post_process idea  
From: Chris Huff
Date: 25 Apr 2000 09:08:30
Message: <chrishuff_99-D28D5E.08112825042000@news.povray.org>
In article <B5QFORZjezhKLtkTgr2FzuvyFcJQ@4ax.com>, Glen Berry 
<7no### [at] ezwvcom> wrote:

> On Tue, 25 Apr 2000 07:23:17 -0500, Chris Huff
> <chr### [at] yahoocom> wrote:
> 
> >How about a color_matrix? It would simply transform the colors of the 
> >image according to a matrix, it should make a lot of effects possible. 
> 
> I'm not sure what you mean. Would you mind explaining more about what
> you have in mind? A hypothetical example would be great.

It would be a 3*3 matrix, like this:

<AA, AB, AC,
 BA, BB, BC,
 CA, CB, CC>


resultRed   = AA*inputRed + AB*inputGreen + AC*inputBlue;
resultGreen = BA*inputRed + BB*inputGreen + BC*inputBlue;
resultBlue  = CA*inputRed + CB*inputGreen + CC*inputBlue;

This matrix would not make any change:
< 1, 0, 0,
  0, 1, 0,
  0, 0, 1>

This one would reverse the red and green components of the image:
< 0, 1, 0,
  1, 0, 0,
  0, 0, 1>

and so on.
BTW, I just got it to compile, time for testing. Oh, and another change 
I made was allowing post_process to be specified in the camera 
statement.(which is where I think it should have been in the first 
place) :-)

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

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