This is a fast-track guide to performing a batch analysis on an image. Pictured is a 30" black shoelace laid onto a whiteboard with scalebars drawn by hand in inches.
Thumbnails are initially presented for faster viewing. You may click on any of the images to see larger versions.
Run ImageJ. Now, File > Open... and select your image.
The pictured shoelace measured 31.25 inches long and approximately 3/32 of an inch in diameter.
My calculations 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.
Customize the batch process by Plugins > VNT > Create Settings, which will alter the behavior for all the images in the folder.
By using the ImageJ line selection tool, the number of pixels per inch can be computed, as well as the aspect ratio.
- The scale settings in the settings editor are an extension of the ImageJ's Analyze > Set Scale... command.
- 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.
- The skeleton prune length should be approximately the width 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.
- For the first attempt, Human Modification should be unchecked.
- On an untested batch process, temporary image files should be kept.
- Graph Text Files are for use in conjunction with graph analysis Mathematica.
- Display Advanced Settings allows the verbose output of debug information as well as graphical visualizations which animate the processing and analysis steps.
If the automated segmentation proves insufficient, make sure "Keep Temporary Image Files" is checked. This allows for later modification, shown later.
With your settings file created, the image is ready to be batched. Since we are only analyzing a single image, run Plugins > VNT > Batch File.
Assuming we aren't happy with the result, we can change the settings file to change the lighting correction, segmentation routine, or pruning algorithm.
If no segmentation routine is correct for your image (segmentation is hard), check on "(Human Modification) Begin with Segmentation?" This allows you to specify your own binary segmented image.
ImageJ is not a drawing program. Binary images can be created through various ImageJ operations and modified in the GIMP or any other drawing program if necessary.
The pictured segmented image was created by the following:
- Inspection revealed that the red channel of the original image held the most contrast.
- Image > Type > RGB Stack
- Image > Stacks > Convert Stack to Images
- A rolling ball was used to smooth out the irregular background and highlight the thin shoestring.
- Process > Subtract Background...
- To threshold with control over range, use
- Image > Adjust > Threshold...
- The resultant threshold selected some shadow. This was removed manually with other drawing software.
After rerunning the batch process by running Plugins > VNT > Batch File on our new segmented image created above, new results are computed. Pictured is the new visualization generated after using the above segmented image. Clearly the analysis depends heavily on the preprocessing.
The tool yielded a length measurement of 31.289 inches. The thickness was measured to be an average of 0.053 inches.