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
- TIF/TIFF
- JPG/JPEG
- …
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 |
|
Position of focus stage, with precision |
|
Position of stage |
|
Position of stage |
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. Demo stages provided by the DemoCamera device adapter can be used in place of physical stages to fully work without hardware (to add multiple stages, add multiple DHub devices)
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 mask |
Resolved 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
2.4.8.3, following the guide
here.
In short:
- Dependencies
- Download code & extract it
- Build & install it
- During “Create the Autotools files” add
--with-opencv
to the configure call:
- Continue normally
Click here to search for FakeCamera on the Micro-Manager mailing list archive.