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

Home » Public Forums » archive » Re: ENVI band math: "b1 gt b2 " , "(b1-b2) gt 0" same or not?
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: ENVI band math: "b1 gt b2 " , "(b1-b2) gt 0" same or not? [message #34744 is a reply to message #34743] Fri, 11 April 2003 20:02 Go to previous messageGo to previous message
rmoss4 is currently offline  rmoss4
Messages: 21
Registered: October 2002
Junior Member
Um, that should have been

( b1 - b2 ) gt 0 = 1B i.e. ( b1 - b2 ) = -1 = 255B > 0 = 1

Nevertheless, the point is the same: it is the byte arithmetic that is
causing your confusion.

R

Robert Moss wrote:
> That's what it is. Trust me on this. Here's an example:
>
> Take a single pixel in each band, i.e.
>
> b1 = 17B
> b2 = 18B
>
> Remember, these are both bytes.
>
> Then you get
>
> ( b1 gt b2 ) = 0B
> ( b1 - b2 ) gt 0 = 255B ( b1 - b2 ) = -1 = 255B > 0
>
> Robert Moss, PhD
>
>
>
> xinhai68 wrote:
>
>> I do not think so. You could try using ENVI's self-contained example
>> bhtmref.img to do "b1 gt b2" and "(b1-b2)gt 0" to see the different
>> result.
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Floating point error
Next Topic: Re: IDL objected oriented question

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

Current Time: Wed Oct 08 18:38:51 PDT 2025

Total time taken to generate the page: 0.00453 seconds