Colordata question!

Hi,

I have rectangular surface with sensor points organized as a regular 2D
grid. The color of each sensor is defined based on sun exposure data, I
calculate separately (some kind of false-color). With this data I can create an image with the surface and sensors on it, where color of sensors define the distribution of sun exposure on the surface.
Now, I want to make this representation continual (like the results of
falsecolor program), so I must somehow interpolate the color data from
the sensor points.
My idea is to define the rectangular surface near the original one, made
of plastic with colordata pattern. Colordata takes next form:
mod colordata id
7+n+
rfunc gfunc bfunc rdatafile gdatafile bdatafile
funcfile x1 x2 transform
0
m A1 A2 .. Am

rdatafile gdatafile bdatafile will be defined with my sensor colors.

How should I define rfunc, gfunc, bfunc to enable bilinear or bicubic interpolation of color?

Related question:
Are there any example of coloradata definition? I tried to find them in the Book and in mail archives, but without success!

Thanks,
Marija

Hi Marija,

If you use the default "red" "green" and "blue" functions for rfunc, gfunc, and bfunc, you will get a bilinear interpolation by default. It may not look very nice, though, as bilinear interpolations tend to show "mach band" artifacts. A simpler approach would be to convert your data into a low-resolution image then upsample it with pfilt. The conversion can be done using pvalue.

-Greg

···

From: Marija Cvetkovic <[email protected]>
Date: July 24, 2006 3:52:28 AM PDT

Hi,

I have rectangular surface with sensor points organized as a regular 2D
grid. The color of each sensor is defined based on sun exposure data, I
calculate separately (some kind of false-color). With this data I can create an image with the surface and sensors on it, where color of sensors define the distribution of sun exposure on the surface.
Now, I want to make this representation continual (like the results of
falsecolor program), so I must somehow interpolate the color data from
the sensor points.
My idea is to define the rectangular surface near the original one, made
of plastic with colordata pattern. Colordata takes next form:
mod colordata id
7+n+
rfunc gfunc bfunc rdatafile gdatafile bdatafile
funcfile x1 x2 transform
0
m A1 A2 .. Am

rdatafile gdatafile bdatafile will be defined with my sensor colors.

How should I define rfunc, gfunc, bfunc to enable bilinear or bicubic interpolation of color?

Related question:
Are there any example of coloradata definition? I tried to find them in the Book and in mail archives, but without success!

Thanks,
Marija

Sorry -- I should have offered an example. Say you have a 10x15 grid of color values, given as ASCII triples like:

1.3871 3.8183 2.1783
(continue for another 149 values)

And the ordering corresponds to left-to-right, top-to-bottom (English text) organization. To convert this to a smooth 1000x1500 picture, you could use:

% pvalue -r -h -Y 15 +X 10 -d data.txt | pfilt -1 -x 1000 -y 1500 -r .6 > data.pic

-G

···

From: "Gregory J. Ward" <[email protected]>
Date: July 24, 2006 5:18:58 PM PDT

Hi Marija,

If you use the default "red" "green" and "blue" functions for rfunc, gfunc, and bfunc, you will get a bilinear interpolation by default. It may not look very nice, though, as bilinear interpolations tend to show "mach band" artifacts. A simpler approach would be to convert your data into a low-resolution image then upsample it with pfilt. The conversion can be done using pvalue.

-Greg