comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Can I do this without using loops?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Can I do this without using loops? [message #6322 is a reply to message #6321] Wed, 05 June 1996 00:00 Go to previous message
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
Peter Clinch (p.j.clinch@dundee.ac.uk) wrote:
: Can't quite see how, but I have a feeling there's a Better Way...

: I have a couple of images, same size, and I need to compare the two and
: take a result which has the highest value from either of the inputs. Ay
: the mo. I'm just using loops through all the pixels using an if greater
: than comparison, and it takes ages... :(

result = a > b

will place the greater of a and b in result, on a pixel=by-pixel basis.

Even if the > function didn't exist, the following would do it without
loops

test = a gt b
result = a*test + b*(1-test)


Peter
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Call_External and the C Math Library
Next Topic: Re: another composite image question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 22:18:08 PDT 2025

Total time taken to generate the page: 2.15678 seconds