Application Tips for ENVI 5 – Image classification of drone video frames

This is part of a series on tips for getting the most out of your geospatial applications. Check back regularly or follow HySpeed Computing to see the latest examples and demonstrations.

Objective: Utilize ENVI’s new video support (introduced in ENVI 5.2) to extract an individual frame from HD video and then perform supervised classification on the resulting image file.

ENVI drone video analysis

Scenario: This tip demonstrates the steps used for implementing the ENVI Classification Workflow using a HD video frame extracted from a drone overflight of a banana plantation in Costa Rica (video courtesy Elevated Horizons). In this example image classification is utilized to delineate the total number of observable banana bunches in the video frame. In banana cultivation, bunches are often covered using blue plastic sleeves for protection from insects and disease and for increasing yield and quality. Here the blue sleeves provide a unique spectral signature (color) for use in image classification, and hence a foundation for estimating total crop yield when analysis is extrapolated or applied to the entire plantation.

The Tip: Below are the steps used to extract the video frame and implement the Classification Workflow in ENVI 5.2:

  • There are three options for opening and viewing video in ENVI: (i) drag-and-drop a video into the ENVI display; (ii) from the main toolbar select File > Open to select a video; and (iii) from the main toolbar select Display > Full Motion Video, and then use the Open button at the top of the video player to select a video.

ENVI video player

  • Once opened, the video player can be used to playback video using standard options for play, pause, and stepping forward and backward. There are also options to add and save bookmarks, adjust the brightness and frame rate, and export individual frames, or even the entire video, for analysis in ENVI.
  • Here we have selected to export a single frame using the “Export Frame to ENVI” button located at the top of the video player.
  • The selected video frame is then automatically exported to the Layer Manager and added to the currently active View. Note that the new file is only temporary, so be sure to save this file to a desired location and filename if you wish to retain the file for future analysis.
  • We next launch the Classification Workflow by selecting Toolbox > Classification > Classification Workflow.
  • For guidance on implementing the Classification Workflow, please visit our earlier post – Implementing the Classification Workflow – to see a detailed example using Landsat data of Lake Tahoe, or refer to the ENVI documentation for more information.
  • In the current Classification example, we selected to Use Training Data (supervised classification), delineate four different classes (banana bunch, banana plant, bare ground, understory vegetation), run the Mahalanobis Distance supervised classification algorithm, and not implement any post-classification smoothing or aggregation.

ENVI drone video classification workflow

  • Classification output includes the classified raster image (ENVI format), corresponding vector file (shapefile), and optionally the classification statistics (text file). Shown here is the classification vector output layered on top of the classification image, where blue represents the observable banana bunches in this video frame.

ENVI drone video classification output

With that analysis accomplished, there are a number of different options within ENVI for extending this analysis to other frames, from as simple as manually repeating the same analysis across multiple individual frames to as sophisticated as creating a custom IDL application to utilize ENVI routines for automatically classifying all frames in the entire video. However, we leave this for a future post.

In the meantime, we can see that the ability to export frames to ENVI for further analysis opens up a wealth of image analysis options. We’re excited to explore the possibilities.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s