POV-Ray : Newsgroups : povray.general : reading images Server Time
25 Dec 2024 14:42:49 EST (-0500)
  reading images (Message 1 to 4 of 4)  
From: stevenvh
Subject: reading images
Date: 29 Sep 2007 11:25:00
Message: <web.46fe6e0b678158c4e99dba500@news.povray.org>
Hi,
I know I can use input from images in function like height fields or image
maps, but is there also a way to use individual pixel information, i.e.
read the image as an array?
TIA
Steven


Post a reply to this message

From: M a r c
Subject: Re: reading images
Date: 29 Sep 2007 11:45:19
Message: <46fe730f@news.povray.org>

web.46fe6e0b678158c4e99dba500@news.povray.org...
> Hi,
> I know I can use input from images in function like height fields or image
> maps, but is there also a way to use individual pixel information, i.e.
> read the image as an array?
> TIA
> Steven
>
I didn't try but if you scale your image_map properly and use eval_pigment?

Marc


Post a reply to this message

From: Alain
Subject: Re: reading images
Date: 29 Sep 2007 21:31:34
Message: <46fefc76$1@news.povray.org>
M_a_r_c nous apporta ses lumieres en ce 2007/09/29 11:45:
> "stevenvh" <nomail@nomail> a écrit dans le message de news: 
> web.46fe6e0b678158c4e99dba500@news.povray.org...
>> Hi,
>> I know I can use input from images in function like height fields or image
>> maps, but is there also a way to use individual pixel information, i.e.
>> read the image as an array?
>> TIA
>> Steven
>>
> I didn't try but if you scale your image_map properly and use eval_pigment?
> 
> Marc 
> 
> 
Use an image_map OK
Use eval_pigment OK
Scale the image_map useless.
If you have a 100x160 pixel image maped to a 1x1 image_map, then location <0.03, 
0.825> will give you the value of pixel 3,132.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when a co-worker nearly kills himself 
over losing an hour's worth of work after a computer crash, and you just calmly 
shrug your shoulders and say, "Is that all?"
Taps a.k.a. Tapio Vocadlo


Post a reply to this message

From: M a r c
Subject: Re: reading images
Date: 30 Sep 2007 03:02:07
Message: <46ff49ef@news.povray.org>

46fefc76$1@news.povray.org...
>>
> Use an image_map OK
> Use eval_pigment OK
> Scale the image_map useless.
> If you have a 100x160 pixel image maped to a 1x1 image_map, then location 
> <0.03, 0.825> will give you the value of pixel 3,132.
>
> -- 
> Alain

Right but it's easier for my non mathematician brain to scale <160,100,1> 
and use actual pixel values :-)

Marc


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.