Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Using ENVI / Crop Science / Create Crop Location Grid

Create Crop Location Grid

Create Crop Location Grid

Use the Create Crop Location Grid tool to estimate crop locations in an image, based on three specified points. The tool creates a classification image with circles that represent crops. It is best used in fields where crops are equally spaced and sized. You can optionally create a polygon region of interest (ROI) that defines the field of interest so that the grid of crop locations is constrained to that field only. The crop locations can be used as input to tools such as Calculate Crop Metrics

The Create Crop Location Grid tool is part of ENVI Crop Science, which requires a separate license and installation. You can also write a script to estimate crop locations using ENVIAgCreateAndRasterizeCropLocationGridTask.

See the following sections:

Background


The Create Crop Location Grid tool estimates crop locations based on their geometry and location from one another. Here are some of the advantages of using this tool:

  • It accepts any type of imagery, including RGB files in various formats (TIFF, JPEG, JPEG2000, etc.).
  • No image preprocessing is necessary.
  • It works well in fields where crops are equally spaced and sized.
  • It performs better than the Count Crops tool when crops have significant overlap.
  • It estimates crop locations independently from the brightness or spectral characteristics of the crops. By contrast, the Count Crops tool detects crops if they are bright against a dark background. If a crop is hidden beneath a tree canopy or other structure, that tool will not detect it. However, the Create Crop Location Grid tool assumes that crops exist in these regions, based on the layout of other crops in the field.

Here are some limitations to be aware of:

  • The accuracy of the crop location grid depends on the quality of the polygon ROI used to define a field. The ROI should be drawn as close to the crop boundaries as possible. See Step 4 below in the Isolate the Field of Interest section.
  • It should not be used in fields where the crops have mixed sizes (young and old, for example). The crops should have a relatively similar size.
  • You can specify the average crop diameter if you know it, or you can let the tool automatically calculate it. The tool will use this value for every crop location. If crop sizes vary significantly in your field, or if you want to calculate the diameters of individual crops, use the Count Crops tool instead.
  • It should not be used if you need precise geographic locations of each crop. It estimates the locations of each crop from grid-based geometry, not by detecting objects in the image. Use the Count Crops tool if you need more precise geographic locations for each crop.
  • It should not be used if the crops turn direction. Rotated fields are okay, but they should have horizontal and vertical alignment:

How it Works

When you run the Create Crop Location Grid tool, you can choose any crop as a starting point (Point 1). You will draw a polyline annotation from that point to another crop along a straight line (Point 2), then to another crop in an orthogonal direction (Point 3). Then count the spaces between Point 1 and Point 2, and between Point 2 and Point 3.

The following example shows three spaces between Point 1 and Point 2, and six spaces between Point 2 and Point 3.

The Create Crop Location Grid tool will estimate the locations of other crops within the field, based on a grid alignment.

Count Crops


Follow these steps to isolate the field of interest and to run the Create Crop Location Grid tool.

Isolate the Field of Interest

For the most accurate estimate of crop locations, you should define a spatial subset or region of interest (ROI) that encompasses the field of interest. A spatial subset is a good option if the field is rectangular and not rotated. Select File > Save As > Save As (ENVI, NITF, TIFF, DTED) from the ENVI menu bar and click the Spatial Subset button. Here is an example of a field that has been subsetted:

In most cases, your field will not be rectangular or it will be rotated within the image. In these cases, you should create a polygon ROI around the field. Follow these steps:

  1. Display the image.
  2. Right-click on the image name in the Layer Manager and select New Region of Interest.
  3. In the Region of Interest (ROI) Tool dialog, click the Geometry tab and ensure that the Polygon option is selected.
  4. Click to add points that define a line along the edge of your field of interest. Keep the line as close to the crops as possible. Where gaps exist, try to draw the line in a stepwise pattern; otherwise the tool may insert crops in the gaps where none really exist.
  5. When finished drawing a line around the entire field, right-click and select Complete and Accept Polygon.
  6. From the ROI Tool menu bar, select File > Save As, and save the ROI file to disk.
  7. Close the ROI Tool.

Here is an example that uses High-Resolution Orthoimagery available from the U.S. Geological Survey, at 0.5-foot spatial resolution. The field of interest contains olive trees.

A polygon ROI was created to isolate the field from the rest of the image:

Run the Create Crop Location Grid Tool

  1. From the ENVI Toolbox, select Crop Science > Create Crop Location Grid.
  2. Click the Browse button next to Input Raster, and select the input image.
  3. If you created a polygon ROI to isolate the field of interest, click the Browse button next to Field ROI and select that ROI.
  4. Click the Annotations drop-down list in the ENVI menu bar, and select Polyline.
  5. Click on the center of any crop in the image. This is Point 1.
  6. Click on another crop that is along a straight line from Point 1. This is Point 2.
  7. Click on a crop that is orthogonal to, and along a straight line from, Point 2. This is Point 3.
  8. Right-click and select Accept to finish drawing the polyline annotation. Here is an example of a polyline (in red) drawn between three points.
  9. Tip: The points in this example were labeled using the Feature Counting tool, for illustration. You do not have to use the Feature Counting tool to label the points, but it may help you keep track of where they are located.

  10. In the Create Crop Location Grid tool, click the Get Points from Polyline Annotation button . The Point 1, Point 2, and Point 3 fields are automatically populated with the file coordinates of the three points.
  11. Count the spaces between the crop at Point 1 and the crop at Point 2. Enter that number in the Spaces between points 1 and 2 field.
  12. Count the spaces between the crop at Point 2 and the crop at Point 3. Enter that number in the Spaces between points 2 and 3 field.
  13. As mentioned in the Background section above, the Create Crop Location Grid tool is best used in agricultural fields where the crops have a relatively similar size. If you know the approximate diameter of a typical crop in your image, enter it (in meters) in the Crop Diameter field. If you will be using the output of this tool to calculate crop metrics, you should enter a diameter that covers as much of the crop as possible without extending beyond it. If you leave this field blank, the tool will estimate the diameter automatically.
  14. Select an output filename and location for Output Crops. This is a JSON-format text file that specifies the approximate locations of the crop centers. This can be used as input for tools such as Crop Metrics.
  15. Enable the Fill Raster Crops option to display filled circles instead of outlines in the classification result. The default value is No.
  16. Select an output filename and location for the Output Crops Raster. This is a classification raster showing circles that represent individual crops.
  17. Enable the Preview check box to see a preview of the settings before you click OK to process the data. The preview is calculated only on the area in the Image window and uses the resolution level at which you are viewing the image.
  18. Select the Display result option to display the output image when processing is complete.
  19. Click OK. ENVI adds the resulting output to the Data Manager and Layer Manager, and it displays the output in the Image window.

To edit the name and color of the Crops class, right-click on the Classes folder in the Layer Manager and select Edit Class Names and Colors.

The number of crops is listed next to the Crops class in the Layer Manager. You can also right-click on the raster layer in the Layer Manager and select View Metadata. In the View Metadata dialog, click the Supplementary node to see the number of crops.


See Also


Count Crops, Crop Metrics, Crop Metrics with Spectral Index



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us