X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10 Jan 2005 02:42 PM by  anon
instruction “if” with image
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
10 Jan 2005 02:42 PM
    Hi, I would like to make a conditional instruction “if” about several images witch built a “imageresult” with desired values : For each pixels of image1 and image2 If ( image1 Greater than image2) then imageresult = 2 else imageresult= 3 I already found this syntax : imageresult =(image1 GT image2) but that is not enough because the result is a mask image which contains O et 1 and it is not possible to choose the values of imageresult thank for your help Stéphane Lhomme

    Deleted User



    New Member


    Posts:
    New Member


    --
    10 Jan 2005 02:42 PM
    Here's an example : IDL> image1 = INDGEN (3, 3) IDL> PRINT, image1 0 1 2 3 4 5 6 7 8 IDL> image2 = ROTATE (image1, 2) IDL> PRINT, image2 8 7 6 5 4 3 2 1 0 IDL> imageresult = (image1 LE image2) + 2B IDL> PRINT, imageresult 3 3 3 3 3 2 2 2 2
    You are not authorized to post a reply.