How to Use Texture Maps in EOIR

« Go Back

Information

 
ProblemHow do I use texture maps in EOIR?
Solution

Create a texture map

You can use any texture map if you know the corner points and parameter value(s). For this article example, you will create a texture map.
  1. Take a screenshot of an area of interest; STK and Google Earth are good options. 
  2. Make note of the latitude and longitude of the images corner points.
  3. Convert your image file into a CSV file. To do this, you can copy and modify the following MATLAB code:
a=imread('C:\FilePath\test.jpg');
b=mean(a,3);
imagesc(b)
b=b/max(b(:));
csvwrite('C:\FilePath\TextureFile.csv',b);

Set the environment variables

  1. Click the Windows icon and search for "Edit environment variables for your account."
  2. When you see the full control panel label, click it. Verify that it is the control panel for your account, not for system variables. https://lh6.googleusercontent.com/dFUH5Hos4c5-n8g-1M8FuBc1-Ji2VF8UXIWPqkdE04N2YfT9fp5gw3ZMaEjlQJodUXV_boVyzOzXf_I35IpsSmGo0EWX1sh0EHha1Cv-ZVo05dElpL6K0Yy9Ejr1XnOkzKMjvS_D
  3. Create a user variable for the CSV files location.
  4. Click New... to add environment variables for your account.
  5. Enter “AGI_EOIR_CUSTOM_TEXTUREMAP_FILE” into the Variable name field.
  6. Insert the file pathway into the Variable value field.

    Ex: C:\FilePath\TextureFile.csv

    https://lh5.googleusercontent.com/LAQO5iakfyayXocqGXlRrz2QSv5pIwi6LeGB6h2QzFqeT6M_S4lPe2bPtlpXsynqzmart5TcdtJJoFCHNsI_fbc-ehCmVleuT_EquaVRdxTVoObVPquGipkhXIrcJEO4Z7CPKH3n

  7. Click OK after the variable is set up to add user variable.
  8. Create a new variable to store the coordinates of the image in latitude and longitude.
  9. Click New....
  10. In the Variable name field, put “AGI_EOIR_CUSTOM_TEXTUREMAP_COORDINATES”.
  11. In the Variable value field, insert your coordinates in the following format:
    north-bound, south-bound, west-bound, east-bound
    Or
    top-left lat, top-left lon, top-right lat, top-right lon, bottom-left lat, bottom-left lon, bottom-right lat, bottom-right lon

    *THE FORMAT OF THE COORDINATES REQUIRES COMMAS FOLLOWED BY A SPACE BETWEEN EACH POINT* 

    https://lh5.googleusercontent.com/g8dm21zNUWH143YtciZnbrVqD4gm8xEt7gyApXg-sYI17pAWjGOsztYOVzz-eDIjXx2PnYMl8Ds49LeaPiC-439A5uJX1asySAl9RKtmTwqWwyoQmCxdNQobx43eHHZbDz5WL_Su

    The latitude range is -90deg to 90deg; the longitude range is -180deg to 180deg.

  12. Click OK.
  13. Now set the reflectance, emissivity, and temperature coordinates of the image. Create a new environment variable with the name: AGI_EOIR_CUSTOM_REFLECTANCE_TEXTURE_FILE
  14. Next, click the ellipsis and go to the file location of the CSV.
  15. Create variables with the following names and enter the variable values of the coordinates in the same style as for latitude and longitude:
    AGI_EOIR_CUSTOM_REFLECTANCE_TEXTURE_COORDINATES
    AGI_EOIR_CUSTOM_EMISSIVITY_TEXTURE_COORDINATES
    AGI_EOIR_CUSTOM_TEMPERATURE_TEXTURE_COORDINATES
    	
  16. Lastly, create two variables with the following names; for the variable values, click the ellipsis and go to the location of the CSV.
    AGI_EOIR_CUSTOM_EMISSIVITY_TEXTURE_FILE
    AGI_EOIR_CUSTOM_TEMPERATURE_TEXTURE_FILE 

Open STK and set up your EOIR sensor (close and reopen STK if it was already running)

This assumes an EOIR sensor is already in place.

  1. Make sure the plugin is marked as active by going to Edit > Preferences > UI Plugins and verifying that the Active check box is selected for EOIR Sensor Plugin.
  2. Then right-click the toolbar and choose to add the EOIR Sensor Plugin.
  3. Click your sensor with EOIR enabled.

    https://lh5.googleusercontent.com/4HxoTnmD_i8V9Wu2CZMFqLqWauNByddC1m0X_PvmoxroD5Qtnrugv-WCC2b99QE1Nre7AzKrVtIggwq8HqiFFleo33TXShWx6J0kgPV8HGYVYyFQsQkYadNSn2OgZ9enAolQxYKM

  4. Open the synthetic scene.
  5. Right-click the synthetic scene and open the details panel.
  6. Change the Scene Details to Fine.
  7. In your image you will see a texture overlay of your custom map.

Note: Sample file is attached to this article.

Texture Map example using the Pyramids of Giza.
ProductSTK
Version(s)
TitleHow to Use Texture Maps in EOIR
URL NameHow-to-use-Texture-Maps-in-EOIR

Related Files

TextureMapsSample.zip