[Radiance-general] Falsecolor tricks

Christian Humann chris at coolshadow.com
Tue Sep 24 14:54:04 PDT 2013


Hi Michael,

I had asked a similar question several years ago on how to extract a value at a specific pixel location in the original HDR image. Greg responded with the following (you'll have to pass the result to the equivalent pixel location in the false color HDR using psign  piped into pcompos *don't forget to add the pixel width of the false color scale  to the x-location in the false color image);

From Greg…….
If you haven't passed the picture through pfilt or otherwise introduced an exposure change, then it would be much faster to use pcompos to extract the value you're interested in.  E.g.:

	pcompos -x 1 -y 1 rendered_image.hdr -Xpos -Ypos | pvalue -h -H -d | rcalc -e '$1=($1*0.265+$2*0.670+$3*0.065)*179'

If getinfo shows one or more EXPOSURE= lines in the header, then the above won't quite work and you'll need to use pvalue.  The syntax for the command you want is:

	pvalue -o -h -H rendered_image.hdr | rcalc -e 'eq(a,b):if(a-b+.5,b-a+.5,-1);and(a,b):if(a,b,a)' \
		-e 'cond=and(eq($1,x_location),eq($2,y_location))' -e '$1=$3;$2=$4;$3=$5'

Nasty, eh?  It's also slow.  Use pcompos if you can.  A faster alternative to the above is to use sed:

	pvalue -o -h -H rendered_image.hdr | sed -n 's/^ *x_location  *y_location //p'

EXAMPLE:
pvalue -o -h -H dec_cie_43-63tvis_dome_sit_west.hdr  | sed -n 's/^ *284  *248 //p' | rcalc -e \ '$1=($1*0.265+$2*0.670+$3*0.065)*179' > value.txt
_________________________

For the second part

ex:
psign -cf 1 1 1 -cb 0 0 0 -h 16 the_value_from above  | pompos     falsecolor_image.hdr +t .5 - x_location y_location >     image_out.hdr



Hope this helps,

Chris
On Sep 24, 2013, at 1:25 PM, Michael Martinez <michael at coolshadow.com> wrote:

> Hi All - 
> 
> I'd like to make falsecolor stamp an image with a value for a single pixel of my choosing (say at 250, 300 in a 1000px x 700px image), similar to how -e works. This is to show irradiance levels changing at a given point in a sequential animation. Anybody have a trick to do this, or something like it? 
> 
> Thanks very much,
> Mike
> 
> 
> Michael Martinez ~ Associate
> LOISOS + UBBELOHDE
> - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> 1917 Clement Avenue  Building 10A
> Alameda, CA  94501 USA
> - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> 510 521 3800 VOICE
> 510 521 3820 FAX
> - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> www.coolshadow.com
> 
> 
> 
> 
> 
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20130924/5f93f095/attachment.html>


More information about the Radiance-general mailing list