Up-sampling a radiance picture?

Dear list

I have a weird question. How can I upsample a radiance image with a factor of 2 (or 4 or 8 ...) on the command line? It is easy to do in HDRShop but I need the functionality embedded in a large script.

I don't any fancy bi-linear interpolation ... simply nearest neighbour will do (i.e., repeating the same pixel four times in the upsampled output image).

I am doing compositing and I wish to composite a high res render with a low res real image. I want to do the compositing in high res, and subsample (using pfilt) afterwards to achieve a little blurring at the edges of the rendered objects ... sort of to feather them into the image.

Best,
Claus

Hi Claus,

you can use pfilt to do that. The -x and -y parameters allow to set a target resolution. Many use them like -x /2 -y /2 to downsample, but you can also do the opposite by setting -x /.5 -y /.5 and achieve upsampling.

Cheers, Lars.

Hi Lars,

Thanks! That was also my immediate idea ... then I read the man-page and saw that when using -x xres, xres has to be less than or equal to the target device. And when I read that I was reading it too quickly and simply "reading" (or getting the understanding) that xres needs to be less than or equal to the input resolution.

Sorry. One can say I was not reading what was written, but rather what I was fearing to read.

Best,
Claus

···

-----Original Message-----
From: Lars O. Grobe [mailto:[email protected]]
Sent: 12. januar 2011 13:56
To: Radiance general discussion
Subject: Re: [Radiance-general] Up-sampling a radiance picture?

Hi Claus,

you can use pfilt to do that. The -x and -y parameters allow to set a target resolution. Many use them like -x /2 -y /2 to downsample, but you can also do the opposite by setting -x /.5 -y /.5 and achieve upsampling.

Cheers, Lars.