Problem in band operations. [message #88868] |
Mon, 30 June 2014 03:27  |
SUNIL CHOUDHURY
Messages: 11 Registered: June 2014
|
Junior Member |
|
|
Hi,i am using envi 4.8 .
I have selected some image file using ENVI_SELECT command.
I want to perform some mathematical operation on the bands of the image file like-
b1+b2-20
How to get bands b1 and b2.
|
|
|
Re: Problem in band operations. [message #88891 is a reply to message #88868] |
Tue, 01 July 2014 12:02   |
skymaxwell@gmail.com
Messages: 127 Registered: January 2007
|
Senior Member |
|
|
Good day!
Here is the code,which allow to solve your task
ENVI_SELECT,FID=image_fid,POS=position_bands, $
DIMS=image_dims,TITLE='Pick file'
IF (image_fid EQ -1) THEN RETURN
ENVI_FILE_QUERY,image_fid,NS=number_samples,NL=number_rows,N B=number_bands, $
INTERLEAVE=data_format,WL=wavelengths
band1=ENVI_GET_DATA(FID=image_fid,DIMS=image_dims, POS=position_bands[0])
band2=ENVI_GET_DATA(FID=image_fid,DIMS=image_dims, POS=position_bands[1])
temp=band1+band2-20
ENVI_ENTER_DATA,temp,BNAMES='Calculated value'
regards
понедельник, 30 июня 2014 г., 14:27:28 UTC+4 пользователь SUNIL CHOUDHURY написал:
> Hi,i am using envi 4.8 .
>
> I have selected some image file using ENVI_SELECT command.
>
> I want to perform some mathematical operation on the bands of the image file like-
>
> b1+b2-20
>
> How to get bands b1 and b2.
|
|
|
Re: Problem in band operations. [message #88896 is a reply to message #88891] |
Wed, 02 July 2014 04:04   |
SUNIL CHOUDHURY
Messages: 11 Registered: June 2014
|
Junior Member |
|
|
On Wednesday, July 2, 2014 12:32:16 AM UTC+5:30, skymaxwell wrote:
> Good day!
>
> Here is the code,which allow to solve your task
>
>
>
>
>
> ENVI_SELECT,FID=image_fid,POS=position_bands, $
>
> DIMS=image_dims,TITLE='Pick file'
>
> IF (image_fid EQ -1) THEN RETURN
>
> ENVI_FILE_QUERY,image_fid,NS=number_samples,NL=number_rows,N B=number_bands, $
>
> INTERLEAVE=data_format,WL=wavelengths
>
> band1=ENVI_GET_DATA(FID=image_fid,DIMS=image_dims, POS=position_bands[0])
>
> band2=ENVI_GET_DATA(FID=image_fid,DIMS=image_dims, POS=position_bands[1])
>
> temp=band1+band2-20
>
> ENVI_ENTER_DATA,temp,BNAMES='Calculated value'
>
>
>
> regards
>
>
>
>
>
> понедельник, 30 июня 2014 г., 14:27:28 UTC+4 пользователь SUNIL CHOUDHURY написал:
>
>> Hi,i am using envi 4.8 .
>
>>
>
>> I have selected some image file using ENVI_SELECT command.
>
>>
>
>> I want to perform some mathematical operation on the bands of the image file like-
>
>>
>
>> b1+b2-20
>
>>
>
>> How to get bands b1 and b2.
Thanks for your reply,it was helpful
but still i have one problem ,
in exp=band1+band2-20 ,only the first two band are selected I want to select the band from the available band list
waiting for your reply
regards
|
|
|
|
Re: Problem in band operations. [message #88940 is a reply to message #88931] |
Sun, 06 July 2014 22:53  |
SUNIL CHOUDHURY
Messages: 11 Registered: June 2014
|
Junior Member |
|
|
On Saturday, July 5, 2014 10:48:24 AM UTC+5:30, skymaxwell wrote:
> look at ENVI_GET_DATA routine and look there to POS keyword.
>
>
>
> Also may be using of Band Math will be easy for your task ?
>
>
>
>
>
> regards
THANKS skymaxwell your guidance was helpful
regards
sunil
|
|
|