[Radiance-general] Falsecolor tricks

Greg Ward gregoryjward at gmail.com
Tue Nov 12 12:10:47 PST 2013


Yes, it's possible.  You just need to hack falsecolor.

Is that the answer you're looking for?

More detailed:  Use pfilt to box-filter the image, then run pextrem on the output.  Upscale the positions it gives you and reinsert them in the appropriate place in the code.

An option to do this could be added if it's of general interest.  Axel Jacobs is the maintainer of falsecolor.pl these days.

Cheers,
-Greg

> From: Michael Martinez <michael at coolshadow.com>
> Date: November 12, 2013 11:42:11 AM PST
> 
> Hi folks - one more question about falsecolor hacks. 
> 
> any chance one could make -e in falsecolor return not the extrema pixels, but the extrema pixels averaged by their immediate neighbors (8 surrounding pixels), or possibly an even larger radius or neighboring pixels? in other words, i'd like to highlight the maximum value on a set of images, but instead of a single point, a larger 'extrema zone' on the image. 
> 
> Thanks for any ideas... 
> 
> MM
> 
> 
> 
> 
> On Sep 24, 2013, at 3:21 PM, Greg Ward wrote:
> 
>> Funny -- I guess I'm repeating myself!  I didn't think of using ra_xyze -o before, though, so maybe a slight improvement...
>> 
>> -Greg
>> 
>>> From: Christian Humann <chris at coolshadow.com>
>>> Date: September 24, 2013 2:54:04 PM PDT
>>> 
>>> 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
>>>> 
>> _______________________________________________
>> Radiance-general mailing list
>> Radiance-general at radiance-online.org
>> http://www.radiance-online.org/mailman/listinfo/radiance-general
> 
> _______________________________________________
> 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/20131112/84d556c8/attachment.html>


More information about the Radiance-general mailing list