top bar


Revision as of 05:23, 1 November 2017 by Lukas-lang (Talk | contribs)

Summary:Adapter for fake/virtual camera that loads images from disk. Can provide different images depending on stage postions.
Author:Lukas Lang
License:Apache License, Version 2.0
Platforms:Windows, 32 & 64-bit, Linux (see below)
Available since version:1.4.23, 1. November 2017

This camera adapter adds a virtual camera that can be configured to load arbitrary images from disk. Supported formats are all those supported by OpenCV's imread, in particular:

  • PNG
  • BMP
  • ...

The pixel type can be set to 8/16-bit grayscale and 8/16-bit RGB (16-bit RGB does currently not work due to a limitation in Micromanager). All images are converted to the selected type, regardless of their true pixel format.

The path mask can be set in the Device Property browser and supports the following placeholders:

??Position of focus stage
?{<prec>}?Position of focus stage, with precision <prec>
?[<stage>]Position of stage <stage>
?{<prec>}[<stage>]Position of stage <stage> with precision <prec>

The positions are rounded according to the specified precision (default is 0, i.e. integers). The resolved path (i.e. the path with the current positions inserted) is shown in the "Resolved path" property.

Example path mask

The examples assume the following stage positions:

  • Focus stage: 7.41um
  • "x-Axis" stage: 3.52um
  • "y-Axis" stage: -1.33um
Path maskResolved path

Building on Linux

The device adapter can be used on Linux (RGB mode currently does not work). To build it, the instructions in Linux_installation_from_source_(Ubuntu) need to be adapted as follows (tested on Ubuntu 16):

  • During "Install Build programs & libraries", also install OpenCV, following the guide here. In short:
    • Dependencies
      sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev   libavformat-dev libswscale-dev tar
    • Download code & extract it
      tar -xvf
    • Build & install it
      cd opencv-
      mkdir release
      cd release
      sudo make install
  • During "Create the Autotools files" add --with-opencv to the configure call:
    cd ~/mm/micro-manager1.4
    ./configure --enable-imagej-plugin=/usr/local/ImageJ --with-opencv
  • Continue normally

Click here to search for FakeCamera on the Micro-Manager mailing list archive.

© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact