Getting Started with Spinnaker SDK on MacOS

Applicable products

All Teledyne FLIR machine vision USB3 and GigE cameras

Application note description

This application note describes how to install and use the Spinnaker® SDK in MacOS from High Sierra (10.13.0) to Ventura (13).

Mac computers with Intel-based processors will work with Spinnaker 3.x and older, up to (and including) Mac OS 11.6. Mac computers that use the newer M1/M2 processors will work with Spinnaker 4.1 (and newer).

Install the required libraries

You must install some dependencies before installing Spinnaker for MacOS. These dependencies are available through a package manager called Homebrew. Homebrew is not available by default in MacOS so you may have to install it first.

To install the dependencies:

1. If Homebrew is not already installed, in terminal run the following:

user$:  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

If prompted, enter your password.

2. Wait until you see "Next Steps". Homebrew is now installed.

3. In terminal run the following:

user$:  brew install pkg-config libomp libusb

This installs all the required dependencies.

Install Spinnaker

If you already have a different version of Spinnaker installed on your macOS, you need to uninstall this prior to installing the new version. See Uninstall Spinnaker below.

  1. Download the Spinnaker SDK.
  2. In the download folder for Spinnaker-1.xx.x.xx, double-click the Spinnaker.pkg file to launch the installer.
  3. Follow the install wizard.

The installation generates the following directory structures:

  • /Applications/Spinnaker/lib
  • /Applications/Spinnaker/include
  • /Applications/Spinnaker/examples
  • /Applications/Spinnaker/PySpin

In addition, Spinnaker libraries are copied to /usr/local/lib and Spinnaker headers are copies to /usr/include for system-wide reference.

Run examples

The Spinnaker SDK comes with several precompiled C++ examples. These are found in /Applications/Spinnaker/bin. You can run an example by double-clicking on the file in the bin folder or through a command line as sudo.

The source for the examples is found in /Applications/Spinnaker/src/.

To modify an example:

  1. Copy the /Spinnaker/ folder (and subfolders) from the /Applications/ folder to a location where you have write permissions.
  2. With a text editor, edit the source file in the /src/ folder.
  3. Compile the updated file.
  4. Run the updated example from the /bin/ folder.

Run SpinView

SpinView is a GUI application that you can use to stream, save, or record images. You can also access or modify Spinnaker nodes to control the camera settings.

For a detailed explanation of Spinnaker nodes, see Spinnaker Nodes.

To run SpinView, from the /Applications/Spinnaker/apps folder double-click SpinView_QT.

SpinView_QT is packaged as an .app file. It is self-contained and can be moved anywhere on the system and still function normally.

Install PySpin

PySpin is a wrapper for the Spinnaker library to allow you to code your application in python. Detailed installation instructions are in the README file. You can find this file after you double click on one of the PySpin installation files located at /Applications/Spinnaker/PySpin.

Choose the package that corresponds to your python version and Spinnaker version. For example, spinnaker_python-1.24.0.60-cp37-cp37m-macosx_10_9_x86_64.tar.gz represents PySpin version 1.24.0.60 and it is for python version 3.7.

Ensure that Python and the corresponding version of the Spinnaker SDK is installed before installing PySpin.

Uninstall Spinnaker

To uninstall Spinnaker, run the supplied “uninstall_spinnaker.sh” included in the Spinnaker-1.xx.x.xx.dmg file. This script removes all installed Spinnaker files and removes Spinnaker from your Mac’s list of installed applications.