I have a color image stack (along the z-direction) with the size of HxWx3xZ and I want to convert to the gray image stack with the size of HxWx1x(3*Z).
Could you please help me to get this conversion using ImageJ? (code in Java is also fine)
I want to extend this to higher dimensions like HxWxZxT -> HxWx1x(ZT) and HxWx3xT -> HxWx1X(3T) and HxWx3XZxT -> HxWx1x(3ZT) and this input formats are required since my machine learning model accepts input of the format HxWx1XN i.e only grayscale images.
H = image height
W = image weight
Z = image depth (in z-direction)
T = image time series samples (in time-direction)
C = 1 for gray scale and 3 for color image
N = (mini) batch size of the machine learning model
Could you please suggest a method to go back to original image format (i.e HxWx1x(3*Z) -> HxWx3xZ)?