X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 17 May 2008 05:48 AM by  anon
How can I get the image of proper size?
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
17 May 2008 05:48 AM
    The non-image data surrounding the actual image data is background value fill. I want to have the size of the image is same as the size of the actual image data. How can I realize it in ENVI?

    Deleted User



    New Member


    Posts:
    New Member


    --
    17 May 2008 05:48 AM
    or further more ,How can I realize it in IDL?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    17 May 2008 05:48 AM
    All raster formats must form a rectangle of some sort because it is number of samples x number of lines. The best you can do is make the smallest bounding box around an irregularly shaped region of interest and mask out areas outside of your ROI. One way to do this in ENVI is to use the Subset data via ROIs. This tool makes the smallest bounding box around your region of interest and you can set the background values to whatever value you wish. Now, if you want to access the actual data within an ROI, you can do this using something like ENVI_GET_DATA but with the DIMs array accessing an ROI. Or you can use the ENVI_GET_ROI_DATA to get the data associated with ROI addresses. This data is held in a variable in memory and you can manipulate it, but if you go to output an image file of whatever format (ENVI, TIFF, JPEG, Imagine, etc.) it *must* return a rectangular image. So there will always be background if the area is irregularly shaped.
    You are not authorized to post a reply.