The following is a quick-start guide on how to perform a full manual analysis of an image. Every step is given, however more explanation is available from the overview.
Thumbnails are initially presented for faster viewing. You may click on any of the images to see larger versions. Note that images are saved in JPEG format for faster viewing. It is essential to use a lossless file format when manipulating your images.
The pictured shoelace was marketed as a 30 inch shoelace, and it measured 31.25 inches long and approximately 3/32 of an inch in diameter. The scalebar was drawn onto a whiteboard by hand with measuring tape.
Run ImageJ. Now, File > Open... and select your image.
Use the ImageJ line selection tool to gather measurements about the scale of your image.
Measurements show that approximately 54 pixels horizontally is equal to 1 inch, whereas 53 pixels vertically equals 1 inch. The aspect ratio is approximately 1 to 1 (square pixels). By these measurements, the total viewing area is approximately 18.96 inches by 14.49 inches.
At this point you should have:
- shoelace.jpg - the original image
It is important to create a settings file for an image immediately, as the preferences will influence the behavior of all VNT plugins. Customize the settings by Plugins > VNT > Create Settings.
The following settings are important, even for manual processing and analysis.
- The scale settings in the settings editor are an extension of the ImageJ's Analyze > Set Scale... command.
- The skeleton prune length should be approximately the diamter of the object, which measured approximately 5 pixels.
- Max Prune Area is another measure to determine if a segment should be pruned. This feature hasn't been fully implemented yet.
- Prune Isolated Segments will prune endsegments which are too short or lack branching points. This could result in the entire shoelace being pruned because it is topologically only a single edge.
- Display Advanced Settings allows the verbose output of debug information as well as graphical visualizations which animate the processing and analysis steps.
The following settings only influence decisions during batching. They are kept here for completion but will not affect our manual analysis.
- Lighting is not regular, but because lighting can not be described as polynomial, VNT Lighting Correction is not appropriate.
- Since our shoelace is darker than the rest of the image, High/Low segmentation is appropriate.
- For the first attempt, Human Modification should be unchecked.
- On an untested batch process, temporary image files should be kept. This allows for later modification.
- Graph Text Files are for use in conjunction with graph analysis Mathematica.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
It is important to convert your image into a lossless format as soon as possible. If possible, capture your images in a lossless format from the very beginning. Use File > Save As > Tiff... and backup your original image.
The VNT uses prefixes to identify different images. The "Eye Candy" plugin uses these prefixes to draw visualizations. The original_ will be used by "Eye Candy" as the background that all overlays will be drawn over.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
You must grayscale your image to proceed. For this shoelace series, the highest contrast between the shoelace and the surrounding background is obtained from the Red color channel after performing a stack split.
To look at red, green, and blue channels separately, use Image > Type > RGB Stack, which creates an image stack. To split the stack into different images, Image > Stacks > Convert Stack to Images.
Save your result with the gray_ prefix.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
The following visualization was created by Plugins > ImageJ's Interactive 3D Surface Plot.
An important step in preprocessing is determining if lighting needs to be regularized. A 3D visualization of the image can be helpful in determining the type of correction, if any, to be performed. Here a surface is visualized which appears to be irregular but not polynomial.
While it is not used to generate the lighting surface approximation, the visualization here was created using Kai Uwe Barthel's ImageJ's Interactive 3D Surface Plot.
This image's lighting is irregular, but it is not polynomial. Built into ImageJ is a rolling ball subtraction, which can be performed by Process > Subtract Background.... A ball size of 50 pixels was used for this image.
In this case, background subtraction is sufficient. Save your result with the lightcorrected_ prefix.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
- lightcorrected_shoelace.tif - a light corrected/background subtracted version of the grayscale
To include the shadow during segmentation:
On our contrast-enhanced greyscale image use Plugins > VNT > Basic Segment to attempt an automated segmentation. This creates multiple thresholds and feature-ANDs them In this case the closest segmentation produced is the Low, which includes some shadow.
To remove the shadow during segmentation:
Manual thresholding reveals that some pixel values of shadow are identical to parts of our shoelace. To darken our shoelace, use Process > Filters > Minimum. This will result in a thicker segmentation, after performing a manual threshold via Image > Adjust > Threshold..., use Process > Binary > Erode to uniformly reduce the thickening.
The image displayed was generated by leaving the shadow in during segmentation, and it was removed afterwards using a drawing program. Save your result with the segmented_ prefix.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
- lightcorrected_shoelace.tif - a light corrected/background subtracted version of the grayscale
- segmented_shoelace.tif - segmentation
Enclosed meshes are areas completely surrounded by segmentation above a certain pixel area. To generate mesh information on the segmentation, use Plugins > VNT > Mesh Analysis. Since shadows were removed, the mesh for this image is blank. The plugin also generates a segmentation that has been filled of all meshes below the specified area.
The plugin should automatically save your result with the mesh_ prefix. The plugin should automatically have saved your filled segmentation image with the filled_ prefix.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
- lightcorrected_shoelace.tif - a light corrected/background subtracted version of the grayscale
- segmented_shoelace.tif - segmentation
- mesh_shoelace.tif - enclosed meshes
- filled_shoelace.tif - recreated segmentation from pruned skeleton
With the segmented binary image active, run Plugins > VNT > DistanceMap Skeleton to generate a Blum skeleton.
The plugin should automatically save your result with the skeleton_ prefix.
Note: If your skeleton appears white, that is normal. The image shown has been contrast enhanced. EDM skeletons are usually very close to the color white and are difficult to see with the human eye. To enhance the contrast of your image to allow you to see it without modifying the color values, use Image > Adjust > Brightness/Contrast and increase the Minimum slider as needed.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
- lightcorrected_shoelace.tif - a light corrected/background subtracted version of the grayscale
- segmented_shoelace.tif - segmentation
- mesh_shoelace.tif - enclosed meshes
- filled_shoelace.tif - recreated segmentation from pruned skeleton
- skeleton_shoelace.tif - EDM skeleton
With the Blum skeleton as the active image, run Plugins > VNT > DistanceMap Outline to recreate an outline of the segmented image. This will be used later as a verification that the skeleton is correct.
The plugin should automatically save your result with the outline_skeleton_ prefix.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
- lightcorrected_shoelace.tif - a light corrected/background subtracted version of the grayscale
- segmented_shoelace.tif - segmentation
- mesh_shoelace.tif - enclosed meshes
- filled_shoelace.tif - recreated segmentation from pruned skeleton
- skeleton_shoelace.tif - EDM skeleton
- outline_skeleton_shoelace.tif - outline generated from skeleton
With the distance map skeleton as the active image, run Plugins > VNT > Endpoint Prune to prune short segments. This process is influenced heavily by your settings file. Because our object of interest is very thin, very little if any pruning will be performed.
Warning: With incorrect settings, your skeleton may be completely pruned.
Note: If your skeleton appears white, that is normal. The image shown has been contrast enhanced. EDM skeletons are usually very close to the color white and are difficult to see with the human eye. To enhance the contrast of your image to allow you to see it without modifying the color values, use Image > Adjust > Brightness/Contrast and increase the Minimum slider as needed.
The plugin should automatically save your result with the pruned_ prefix.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
- lightcorrected_shoelace.tif - a light corrected/background subtracted version of the grayscale
- segmented_shoelace.tif - segmentation
- mesh_shoelace.tif - enclosed meshes
- filled_shoelace.tif - recreated segmentation from pruned skeleton
- skeleton_shoelace.tif - EDM skeleton
- outline_skeleton_shoelace.tif - outline generated from skeleton
- pruned_shoelace.tif - pruned EDM skeleton
With the pruned distance map skeleton as the active image, run Plugins > VNT > DistanceMap Outline to recreate an outline of the segmented image after pruning. This will be used later as a verification that the pruned skeleton is correct.
The plugin should automatically save your result with the outline_pruned_ prefix.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
- lightcorrected_shoelace.tif - a light corrected/background subtracted version of the grayscale
- segmented_shoelace.tif - segmentation
- mesh_shoelace.tif - enclosed meshes
- filled_shoelace.tif - recreated segmentation from pruned skeleton
- skeleton_shoelace.tif - EDM skeleton
- outline_skeleton_shoelace.tif - outline generated from skeleton
- pruned_shoelace.tif - pruned EDM skeleton
- outline_pruned_shoelace.tif - outline generated from pruned skeleton
With the pruned distance map skeleton as the active image, run Plugins > VNT > DistanceMap Filled to recreate a pruned, solid segmentation. This will be used later as a verification that the pruned skeleton is correct.
The plugin should automatically save your result with the solid_ prefix.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
- lightcorrected_shoelace.tif - a light corrected/background subtracted version of the grayscale
- segmented_shoelace.tif - segmentation
- mesh_shoelace.tif - enclosed meshes
- filled_shoelace.tif - recreated segmentation from pruned skeleton
- skeleton_shoelace.tif - EDM skeleton
- outline_skeleton_shoelace.tif - outline generated from skeleton
- pruned_shoelace.tif - pruned EDM skeleton
- outline_pruned_shoelace.tif - outline generated from pruned skeleton
- solid_shoelace.tif - recreated segmentation from pruned skeleton
With the pruned distance map skeleton as the active image, run Plugins > VNT > Node Analysis to perform graph modeling of the skeleton.
The plugin should automatically save your results with the nodes_, graph_, and merged_ prefixes.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
- segmented_shoelace.tif - segmentation
- mesh_shoelace.tif - enclosed meshes
- filled_shoelace.tif - recreated segmentation from pruned skeleton
- skeleton_shoelace.tif - EDM skeleton
- outline_skeleton_shoelace.tif - outline generated from skeleton
- pruned_shoelace.tif - pruned EDM skeleton
- outline_pruned_shoelace.tif - outline generated from pruned skeleton
- solid_shoelace.tif - recreated segmentation from pruned skeleton
- nodes_shoelace.tif - graph model's nodes
- graph_shoelace.tif - original graph model with edges
- merged_shoelace.tif - graph model after node simplification
After running the Node Analysis plugin, a new line will be appended to the Results window (it will appear if there are no other results open).
The plugin should automatically save your results file with the results_ prefix. It will also append the data to the folder's results.txt file.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
- segmented_shoelace.tif - segmentation
- mesh_shoelace.tif - enclosed meshes
- filled_shoelace.tif - recreated segmentation from pruned skeleton
- skeleton_shoelace.tif - EDM skeleton
- outline_skeleton_shoelace.tif - outline generated from skeleton
- pruned_shoelace.tif - pruned EDM skeleton
- outline_pruned_shoelace.tif - outline generated from pruned skeleton
- solid_shoelace.tif - recreated segmentation from pruned skeleton
- nodes_shoelace.tif - graph model's nodes
- graph_shoelace.tif - original graph model with edges
- merged_shoelace.tif - graph model after node simplification
- results.txt - quantitative results output
If you've saved all the appropriate prefix files, on your original_shoelace.tif file run Plugins > VNT > Eye Candy to generate overlay visualizations to evaluate the quality of your analysis.
Assuming there were no errors, the plugin should automatically save your result as a stacked TIFF with the eyecandy_ prefix.
At this point you should have:
- shoelace.jpg - the original image
- settings.txt - the settings file
- original_shoelace.tif - a copy of the original
- gray_shoelace.tif - a grayscale of the original
- segmented_shoelace.tif - segmentation
- mesh_shoelace.tif - enclosed meshes
- filled_shoelace.tif - recreated segmentation from pruned skeleton
- skeleton_shoelace.tif - EDM skeleton
- outline_skeleton_shoelace.tif - outline generated from skeleton
- pruned_shoelace.tif - pruned EDM skeleton
- outline_pruned_shoelace.tif - outline generated from pruned skeleton
- solid_shoelace.tif - recreated segmentation from pruned skeleton
- nodes_shoelace.tif - graph model's nodes
- graph_shoelace.tif - original graph model with edges
- merged_shoelace.tif - graph model after node simplification
- results.txt - quantitative results output
- eyecandy_shoelace.tif - Eye Candy visualizations