JOURNAL ARTICLE

Protocol for extracting basic color metrics from Images in ImageJ/Fiji

Christopher Strock

Year: 2021 Journal:   Zenodo (CERN European Organization for Nuclear Research)   Publisher: European Organization for Nuclear Research

Abstract

Protocol provided here is to help researchers with a need to extract basic summary statistics of component channels of RGB, Lab, and HSB colorspaces from image sets using ImageJ/Fiji. Using a macro helps to automate a job in ImageJ and ensures reproducibility of our work. This macro functions to 1) open an image from a directory folder, 2) threshold the image to segment out the object of interest from the background then "clear" the background so it is completely black, 3) separate the image into the component channels for each color space, 4) extract summary statistics for each channel in each colorspace, 5) add these summary statistics for each channel of each colorspace (RGB, Lab, and HSB) to a .csv file. Before you start, a note on thresholding: The supplied macro (Whole Color Macro_All.components.ijm) is parameterized to use color thresholding to segment out the object of interest from the background. The thresholding parameters in the supplied macro will need to be adjusted for your specific image set (lines 37-75 in macro). Thresholding parameterization provided in the downloadable macro is based on the RGB colorspace, but thresholding based on other color spaces may be a better option for other image sets. Before running this macro, determine the best colorspace and parameters for thresholding the image set you are working with and replace the code in the macro with the correct parameters for your images at lines 35-75. Detailed information on how to determine the ideal thresholding method/ values for your image set, and how to edit the supplied macro with your parameters can be found in the supplied .pdf document (Protocol for extracting basic color metrics from Images in ImageJ/Fiji) I also provide a protocol and R script (Reformat.row.to.column.R) that automates the reformatting of summary statistics from component channels of three colorspaces (RGB, Lab, and HSB) included in the output file “Whole_Color_Measurements.csv” from ImageJ macro “Whole Color Macro_All.components.ijm”. This script functions to reformat the “Whole_Color_Measurements.csv” so each colorspace channel is transposed into a separate column rather than a row for each image. The final .csv file produced by running this script should have each image listed as a row, with each summary statistic (mean, mode, min, max, etc.) for each channel in each colorspace presented in a separate column for that image (row).

Keywords:
Protocol (science) Computer science Artificial intelligence Computer vision Information retrieval Computer graphics (images) Medicine

Metrics

5
Cited By
0.00
FWCI (Field Weighted Citation Impact)
0
Refs
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Image Retrieval and Classification Techniques
Physical Sciences →  Computer Science →  Computer Vision and Pattern Recognition

Related Documents

JOURNAL ARTICLE

Batch Cropping Images in ImageJ/Fiji

Christopher Strock

Journal:   Zenodo (CERN European Organization for Nuclear Research) Year: 2021
JOURNAL ARTICLE

Basic Image Analysis and Manipulation in ImageJ/Fiji

Fabio StossiPankaj K. Singh

Journal:   Current Protocols Year: 2023 Vol: 3 (7)Pages: e849-e849
JOURNAL ARTICLE

Wavelet_Denoise Fiji/ImageJ plugin for filtering/denoising microscopic images

Martin ČapekMartin Čapek

Journal:   Proceedings of the European Microscopy Congress 2020 Year: 2021
© 2026 ScienceGate Book Chapters — All rights reserved.