Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

VersiLab Plugin

VersiLab_Plugin is early development targeted towards pre-clinical optical endo-microscopy (OEM). It runs as an ImageJ/Fiji plugin using a JavaFX GUI, can acquire images from webcam, allows the processing of images in real-time from selection of drop down processing algorithms, and control of National Instruments Digtal Module for controlling LEDS.

Demonstration on YouTube at

Snapshot of Versilab detecting cores:

versilab snapshot

Snapshot of Versilab blurring real-time webcam images:



Java JDK 1.8

install JDK 1.8 from

Ensure JAVA_HOME environment variable is set and points to your JDK installation


and follow installation instructions

Extract distribution archive in any directory


Add the bin directory of the created directory apache-maven-3.5.0 to the PATH environment variable


Download and install Eclipse from

Clone the Versilab project from and unzip to the working directory of Eclipse.

import > existing Maven Project > (the pom.xml of the Versilab clone)

Eclipse Run configurations:

Add new Maven Build

select workspace: ${workspace_loc:/Versilab_Plugin}

add Parameter: value={path to ImageJ or Fiji directory}

Running Maven build will have more enforcements than running Java Application and will ensure outputs are ImageJ compatible and ready for distribution to ImageJ update sites.

Add new Java Application.

Select Project: Versilab_Plugin

Main class: com.Proteus.imagej.Versilab_Plugin

Running this Java application will use Maven to download the projects dependencies and store them in a .m2 folder like C:\Users\Owner\.m2\repository. Note: Running the Java Application will bypass some Maven enforcement rules, which can be helpful for local development testing but May cause issues if trying to upload jar updates that fail Maven enforcement rules.


download and install OpenCV

The instalation of OpenCV 3.2 for webcam control. On startup a FileChooser popup will request opencv_java320.dll filepath. typically \opencv\build\java\x64\opencv_java320.dll for 64-bit machines.

National Instruments LED's

Versilab_Plugin tested with NI-9402 C Series Digital Module for LED control.

Install NI-DAQmx 17.0.0 from,n8:3478.41.181.5495,ssnav:ndr/

Then using NI Max to name the Digital Module as cDAQ1

New Image Processing Algorithms

package com.Proteus.algorithms contains Image Processing algorithms.

CoreDectionOCV is during the background calibration phase

CorePopulationOCV uses the results of cores detected in CoreDetectionOCV to draw circles in the starting of camera image stream.

To implement a new image processing algorithm called NewAlgorithm that gaussian blurs the image stream create a file in com.Proteus.algorithms

package com.Proteus.algorithms;

import com.Proteus.gui.view.PopupController;
import com.Proteus.gui.view.VersiLabController;
import com.Proteus.imagej.Versilab_Plugin;
import org.opencv.core.Mat;
import org.opencv.core.Size;
import org.opencv.imgproc.Imgproc;
import static org.opencv.core.Core.BORDER_DEFAULT;
import static org.opencv.imgproc.Imgproc.*; 

public class NewAlgorithm implements VersiLabController.OpenCVImageProcess {

public void initialise(){
	// this is how we initialise initialise popup sliders
	VersiLabController mainController = Versilab_Plugin.getVersiLabPluginController();
	mainController.addPopupSlider("Sigma", 0,20,1,0.1);

public Mat processImage(Mat imageIn, int counter) {

	Size size = new Size(401, 401);
	// get value from slider
	double sigma = PopupController.getSliderValue(0); 
	// Do blurring based on slider value
	Imgproc.GaussianBlur(imageIn, imageIn, size, sigma, sigma, BORDER_DEFAULT);
	return imageIn;

And add the name NewAlgorithm to VersiLabRootLayout.fxml in com.Proteus.gui.view to an algorithm drop down menu

<ComboBox fx:id="AlgorithmComboBox" prefWidth="170.0" promptText="Loop Algorithm" GridPane.columnIndex="0" GridPane.rowIndex="14">
                    <FXCollections fx:factory="observableArrayList">
                        <String fx:value="NewAlgorithm"/>
                        <String fx:value="CorePopulationOCV"/>
                        <String fx:value="TestImageJ" />
                        <String fx:value="TestOpenCV" />


Versilab is an ImageJ plugin built from combination of ImageJ guides

More details for Proteus and OEM Imaging can be found at:

YouTube demonstration at

Next To Do

Native OpenCV dll files get imported during runtime using FileChooser to specify a local directory. OpenCV can then be used to acquiring images from Webcam. It is possible that a similar method would work with Bytedeco, which shows the most promise for implementing universal hardware controls of specialised cameras, such as Grasshopper from FlyCapture2 dll files, which would be the next line of investigation and integration for having a modular approach to hardware for real-time image acquisition and processing.

Memory management with Java and real-time image processing requires attention.


Project Handed over to




Build for an ImageJ plugin called VersiLab_Plugin. Real-time acquisition and image processing for optical endo-microscopes








No packages published