java.lang.Object
Ch08_Binary_Regions.Make_Projections
- All Implemented Interfaces:
PlugInFilter
,JavaDocHelp
This ImageJ plugin demonstrates the calculation of horizontal and vertical projections from a grayscale image. See Sec. 8.7 of [1] for additional details. The input image is not assumed binary, i.e., gray values are simply added up without thresholding. This plugin only works for 8-bit grayscale images, the original image is not modified. If no image is currently open, the plugin optionally loads a suitable sample image. The resulting projections are shown as separate diagrams, which either show the relative amount of white (default) or black, selectable in the user dialog:
- The horizontal projection diagram has the same height as the original image and user-adjustable width, with diagram bars being drawn from left to right.
- The vertical projection diagram has the same width as the original image and user-adjustable height, with diagram bars being drawn from top to bottom.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2020/12/17, 2022/09/29 revised to match book examples
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic BasicAwtColor
Background color for projection diagrams.static BasicAwtColor
Foreground value for horizontal projection.static BasicAwtColor
Foreground value for vertical projection.static int
Size of horizontal/vertical projection bars.static boolean
Plot the relative amount of white (false) or black (true).Fields inherited from interface ij.plugin.filter.PlugInFilter
CONVERT_TO_FLOAT, DOES_16, DOES_32, DOES_8C, DOES_8G, DOES_ALL, DOES_RGB, DOES_STACKS, DONE, FINAL_PROCESSING, KEEP_THRESHOLD, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, NO_UNDO_RESET, PARALLELIZE_IMAGES, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor, asks to open a predefined sample image if no other image is currently open. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface imagingbook.core.jdoc.JavaDocHelp
getJavaDocUrl
-
Field Details
-
ProjectionSize
Size of horizontal/vertical projection bars. -
BackgroundColor
Background color for projection diagrams. -
PlotColorH
Foreground value for horizontal projection. -
PlotColorV
Foreground value for vertical projection. -
ShowAmountOfBlack
Plot the relative amount of white (false) or black (true).
-
-
Constructor Details
-
Make_Projections
public Make_Projections()Constructor, asks to open a predefined sample image if no other image is currently open.
-
-
Method Details
-
setup
- Specified by:
setup
in interfacePlugInFilter
-
run
- Specified by:
run
in interfacePlugInFilter
-