This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Using External Mode with Image Processing for Parrot Minidrone

The image-processing algorithm can be used as an additional input to control the flight of a Parrot® minidrone. In the Simulink® model, this algorithm is part of a separate subsystem (Image Processing System) which integrates with the main subsystem (Flight Control System). The tasks that are being executed in the two subsystems run at different rates.

The image-processing algorithm can be analyzed by using the External mode feature. In this case, the External mode and image-processing run at the same priority, which results in a slow-down of the image-processing algorithm. To ensure that image-processing runs at real-time, you may need to disable the External mode.


The performance limitations are due to the limited computational power of the Parrot minidrone when External mode is used along with image-processing from the drone's camera.

However, if you want to use External mode to analyze the image-processing algorithm in the Simulink model, you need to change the External mode settings accordingly:


The guidelines explained in this section requires that you install Simulink Coder before using the External mode feature for the Simulink model, as it provides additional options in External mode.

  1. On the Simulink toolbar, go to Code > External Mode Control Panel.

  2. In the External Mode Control Panel, click Signal & Triggering.

    The External Signal & Triggering dialog box displays a list of blocks and signals in the model that support data uploading and logging. By default, all the items listed are selected for viewing in the External mode and logging data (see the x label for each signal). (For more details about External mode, refer to Tune and Monitor Models Running on Target Hardware (Simulink) documentation)

  3. Change the settings for selection of signals because logging of multiple signals during image processing slows down both the image-processing algorithm and the External mode logging:

    • Ensure that you select only the signal that is important for visualization. If you would like to view a signal using a Video Viewer block (from the Computer Vision Toolbox™) or a Scope/Display block, connect it at the output of the intermediate stage of the image-processing algorithm. In this case:

      1. In the External Signal & Triggering dialog box, clear the Select all option (by default, this option is selected).

      2. Click the row corresponding to the Video Viewer block or Scope/Display block.

      3. Click the on option (which appears at the right side of the dialog box). This ensures that the Video Viewer or Scope/Display is the only block that can be viewed in External mode, and the performance of image-processing algorithm is not affected.

      4. Click Apply and then OK.


      In the Simulink model, avoid using multiple Video Viewer blocks for visualization of image data as it slows down the image processing.

    • Remove some signals from uploading any data for analysis. To do this:

      1. In the External Signal & Triggering dialog box, clear the Select all option (by default, this option is selected).

      2. Navigate through the list and identify the unwanted signals and Scope/Display blocks that are being logged from the Flight Control System subsystem.

      3. Click the row corresponding to the signal or Scope/Display block, and click the off option (which appears at the right side of the dialog box). This ensures that these signals or Scope/Display blocks are not used for logging of any data, thereby improving the overall performance of the drone while the image-processing is in progress.

      4. Click Apply and then OK.

See Also