pinterp on a rectangle image

Folks,

I want to convert an angular fisheye to a hemispherical fisheye, like the example in pinterp man page.

pinterp -vf fish.hdr -vth -ff fish.hdr 1 > hemi.hdr

My concern is that pinterp force the result image to be a square. The image that I have is a rectangular image, with the fisheye circle in the middle. When I use the above command, the result is always a square.

My question: is the interpolation also applied to the black region on the left and right side of the fisheye circle?

I tried to crop the input hdr to square with the following command (from 5616x3744 to 3744x3744 pixels):

ra_xyze -r -u -o fisheye.hdr | pcompos -x 3744 - -936 0 > fisheye_crop.hdr

But when I use fisheye_crop.hdr as an input to the pinterp command, it gives a "bad view file"error. Does this simply confirm that man page that the output of pcompos cannot be used with pinterp?

Thanks,

Ery

Hi Ery,

Pcompos isn't smart enough to adjust the view after cropping, so it doesn't write it into the header in a way that pinterp can use it.

The image may be coming out square because a hemispherical fisheye can encompass at most 180 degrees vertically and horizontally, whereas an angular fisheye can be up to 360 degrees. You can of course specify a different horizontal and vertical size with the -vh and -vv options, but both must be less than 180.

What is the view in your original fish.hdr file?

-Greg

···

From: Ery Djunaedy <[email protected]>
Date: February 11, 2012 4:54:07 PM PST

Folks,

I want to convert an angular fisheye to a hemispherical fisheye, like the example in pinterp man page.

pinterp -vf fish.hdr -vth -ff fish.hdr 1 > hemi.hdr

My concern is that pinterp force the result image to be a square. The image that I have is a rectangular image, with the fisheye circle in the middle. When I use the above command, the result is always a square.

My question: is the interpolation also applied to the black region on the left and right side of the fisheye circle?

I tried to crop the input hdr to square with the following command (from 5616x3744 to 3744x3744 pixels):

ra_xyze -r -u -o fisheye.hdr | pcompos -x 3744 - -936 0 > fisheye_crop.hdr

But when I use fisheye_crop.hdr as an input to the pinterp command, it gives a "bad view file"error. Does this simply confirm that man page that the output of pcompos cannot be used with pinterp?

Thanks,

Ery

Greg,

I guess the more important question is whether or not the original file can be used? The purpose for this conversion is to calculate the illuminance at the camera point.

Thanks,

Ery

···

On 02/11/2012 09:48 PM, Greg Ward wrote:

Hi Ery,

Pcompos isn't smart enough to adjust the view after cropping, so it doesn't write it into the header in a way that pinterp can use it.

The image may be coming out square because a hemispherical fisheye can encompass at most 180 degrees vertically and horizontally, whereas an angular fisheye can be up to 360 degrees. You can of course specify a different horizontal and vertical size with the -vh and -vv options, but both must be less than 180.

What is the view in your original fish.hdr file?

-Greg

From: Ery Djunaedy<[email protected]>
Date: February 11, 2012 4:54:07 PM PST

Folks,

I want to convert an angular fisheye to a hemispherical fisheye, like the example in pinterp man page.

pinterp -vf fish.hdr -vth -ff fish.hdr 1> hemi.hdr

My concern is that pinterp force the result image to be a square. The image that I have is a rectangular image, with the fisheye circle in the middle. When I use the above command, the result is always a square.

My question: is the interpolation also applied to the black region on the left and right side of the fisheye circle?

I tried to crop the input hdr to square with the following command (from 5616x3744 to 3744x3744 pixels):

ra_xyze -r -u -o fisheye.hdr | pcompos -x 3744 - -936 0> fisheye_crop.hdr

But when I use fisheye_crop.hdr as an input to the pinterp command, it gives a "bad view file"error. Does this simply confirm that man page that the output of pcompos cannot be used with pinterp?

Thanks,

Ery

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Thanks Greg,

The view is:
VIEW= -vtv -vh 132.125290 -vv 112.682388

Ery

···

On 02/11/2012 09:48 PM, Greg Ward wrote:

Hi Ery,

Pcompos isn't smart enough to adjust the view after cropping, so it doesn't write it into the header in a way that pinterp can use it.

The image may be coming out square because a hemispherical fisheye can encompass at most 180 degrees vertically and horizontally, whereas an angular fisheye can be up to 360 degrees. You can of course specify a different horizontal and vertical size with the -vh and -vv options, but both must be less than 180.

What is the view in your original fish.hdr file?

-Greg

From: Ery Djunaedy<[email protected]>
Date: February 11, 2012 4:54:07 PM PST

Folks,

I want to convert an angular fisheye to a hemispherical fisheye, like the example in pinterp man page.

pinterp -vf fish.hdr -vth -ff fish.hdr 1> hemi.hdr

My concern is that pinterp force the result image to be a square. The image that I have is a rectangular image, with the fisheye circle in the middle. When I use the above command, the result is always a square.

My question: is the interpolation also applied to the black region on the left and right side of the fisheye circle?

I tried to crop the input hdr to square with the following command (from 5616x3744 to 3744x3744 pixels):

ra_xyze -r -u -o fisheye.hdr | pcompos -x 3744 - -936 0> fisheye_crop.hdr

But when I use fisheye_crop.hdr as an input to the pinterp command, it gives a "bad view file"error. Does this simply confirm that man page that the output of pcompos cannot be used with pinterp?

Thanks,

Ery

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Ery

Without modification you can't use the cropped image as input to pinterp.
You have to add an appropriate "view ..." line to the header of the cropped
image manually to give pinterp the information it needs for the conversion.

If you are just taking away the black area to the left and right of a (180
degree) angular fisheye projection you can copy the view line from the
original file and only adjust the "-vh" value to match the "-vv" value. If
you also reduce the opening angle you have to calculate how large the
cropped angle would be and add that as the value for "-vv" and "-vh".

Regards,
Thomas

···

On Sun, Feb 12, 2012 at 9:00 AM, Ery Djunaedy <[email protected]>wrote:

Greg,

I guess the more important question is whether or not the original file
can be used? The purpose for this conversion is to calculate the
illuminance at the camera point.

Thanks,

Ery

On 02/11/2012 09:48 PM, Greg Ward wrote:

Hi Ery,

Pcompos isn't smart enough to adjust the view after cropping, so it
doesn't write it into the header in a way that pinterp can use it.

The image may be coming out square because a hemispherical fisheye can
encompass at most 180 degrees vertically and horizontally, whereas an
angular fisheye can be up to 360 degrees. You can of course specify a
different horizontal and vertical size with the -vh and -vv options, but
both must be less than 180.

What is the view in your original fish.hdr file?

-Greg

From: Ery Djunaedy<ery.mailinglist@**gmail.com<[email protected]>

>
Date: February 11, 2012 4:54:07 PM PST

Folks,

I want to convert an angular fisheye to a hemispherical fisheye, like
the example in pinterp man page.

pinterp -vf fish.hdr -vth -ff fish.hdr 1> hemi.hdr

My concern is that pinterp force the result image to be a square. The
image that I have is a rectangular image, with the fisheye circle in the
middle. When I use the above command, the result is always a square.

My question: is the interpolation also applied to the black region on
the left and right side of the fisheye circle?

I tried to crop the input hdr to square with the following command (from
5616x3744 to 3744x3744 pixels):

ra_xyze -r -u -o fisheye.hdr | pcompos -x 3744 - -936 0>
fisheye_crop.hdr

But when I use fisheye_crop.hdr as an input to the pinterp command, it
gives a "bad view file"error. Does this simply confirm that man page that
the output of pcompos cannot be used with pinterp?

Thanks,

Ery

______________________________**_________________
Radiance-general mailing list
Radiance-general@radiance-**online.org<[email protected]>
http://www.radiance-online.**org/mailman/listinfo/radiance-**general<http://www.radiance-online.org/mailman/listinfo/radiance-general>

______________________________**_________________
Radiance-general mailing list
Radiance-general@radiance-**online.org<[email protected]>
http://www.radiance-online.**org/mailman/listinfo/radiance-**general<http://www.radiance-online.org/mailman/listinfo/radiance-general>

Hi Ery,

The output of pinterp in this case shouldn't be square, but may be "almost square" because 132 and 112 degrees are closer to each other in a hemispherical fisheye than they are in an angular fisheye. In fact, what you have given me here with -vtv is not a fisheye view at all, but a perspective projection. In this case, the aspect ratio is even greater.

Unless you go all the way to 180 degrees in each direction, you cannot compute an exact value for the illuminance. You can come reasonably close if there aren't any really bright areas just out of view. The cosine correction on most illuminance meters is not much better.

-Greg

···

From: Ery Djunaedy <[email protected]>
Date: February 12, 2012 5:16:15 AM PST

Thanks Greg,

The view is:
VIEW= -vtv -vh 132.125290 -vv 112.682388

Ery

Hi Ery,

Pcompos isn't smart enough to adjust the view after cropping, so it doesn't write it into the header in a way that pinterp can use it.

The image may be coming out square because a hemispherical fisheye can encompass at most 180 degrees vertically and horizontally, whereas an angular fisheye can be up to 360 degrees. You can of course specify a different horizontal and vertical size with the -vh and -vv options, but both must be less than 180.

What is the view in your original fish.hdr file?

-Greg

From: Ery Djunaedy<[email protected]>
Date: February 11, 2012 4:54:07 PM PST

Folks,

I want to convert an angular fisheye to a hemispherical fisheye, like the example in pinterp man page.

pinterp -vf fish.hdr -vth -ff fish.hdr 1> hemi.hdr

My concern is that pinterp force the result image to be a square. The image that I have is a rectangular image, with the fisheye circle in the middle. When I use the above command, the result is always a square.

My question: is the interpolation also applied to the black region on the left and right side of the fisheye circle?

I tried to crop the input hdr to square with the following command (from 5616x3744 to 3744x3744 pixels):

ra_xyze -r -u -o fisheye.hdr | pcompos -x 3744 - -936 0> fisheye_crop.hdr

But when I use fisheye_crop.hdr as an input to the pinterp command, it gives a "bad view file"error. Does this simply confirm that man page that the output of pcompos cannot be used with pinterp?

Thanks,

Ery

Greg,
You are right, the pinterp result is not exactly square.
Thanks a lot for the pointers.

···

On 02/12/2012 09:57 AM, Greg Ward wrote:

Hi Ery,

The output of pinterp in this case shouldn't be square, but may be "almost square" because 132 and 112 degrees are closer to each other in a hemispherical fisheye than they are in an angular fisheye. In fact, what you have given me here with -vtv is not a fisheye view at all, but a perspective projection. In this case, the aspect ratio is even greater.

Unless you go all the way to 180 degrees in each direction, you cannot compute an exact value for the illuminance. You can come reasonably close if there aren't any really bright areas just out of view. The cosine correction on most illuminance meters is not much better.

-Greg

From: Ery Djunaedy<[email protected]>
Date: February 12, 2012 5:16:15 AM PST

Thanks Greg,

The view is:
VIEW= -vtv -vh 132.125290 -vv 112.682388

Ery

Hi Ery,

Pcompos isn't smart enough to adjust the view after cropping, so it doesn't write it into the header in a way that pinterp can use it.

The image may be coming out square because a hemispherical fisheye can encompass at most 180 degrees vertically and horizontally, whereas an angular fisheye can be up to 360 degrees. You can of course specify a different horizontal and vertical size with the -vh and -vv options, but both must be less than 180.

What is the view in your original fish.hdr file?

-Greg

From: Ery Djunaedy<[email protected]>
Date: February 11, 2012 4:54:07 PM PST

Folks,

I want to convert an angular fisheye to a hemispherical fisheye, like the example in pinterp man page.

pinterp -vf fish.hdr -vth -ff fish.hdr 1> hemi.hdr

My concern is that pinterp force the result image to be a square. The image that I have is a rectangular image, with the fisheye circle in the middle. When I use the above command, the result is always a square.

My question: is the interpolation also applied to the black region on the left and right side of the fisheye circle?

I tried to crop the input hdr to square with the following command (from 5616x3744 to 3744x3744 pixels):

ra_xyze -r -u -o fisheye.hdr | pcompos -x 3744 - -936 0> fisheye_crop.hdr

But when I use fisheye_crop.hdr as an input to the pinterp command, it gives a "bad view file"error. Does this simply confirm that man page that the output of pcompos cannot be used with pinterp?

Thanks,

Ery

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general