How to use "imhistmatch" for 3D images?

1 visualización (últimos 30 días)
ML
ML el 22 de Nov. de 2016
Respondida: DGM el 14 de Mayo de 2021
I have two 3D images of different size.
a = 120 x 120 x 80
b = 192 x 192 x 120
how can I use imhistmatch or another method to make the intensity ranges in a and b to be (almost) the same?

Respuestas (1)

DGM
DGM el 14 de Mayo de 2021
imhistmatch() operates on pages of a 3D array independently. For two images with the same number of pages, each page is matched to the corresponding page in the reference image. If the two images have a different number of pages, one has to ask what the expected correspondence is.
Say the reference image has 10 pages and the input image has 8. You could simply use referenceimg(:,:,1:8). While that might work, would it meet the expectations? Is it okay that the last pages of the reference have no influence over the output?
What if the reference has 8 pages and the input image has 10? Now what's the reference for page 9 and 10?
Or is it expected that the intensity distribution of the entire image volume is considered as a whole? I imagine that's what is expected here. In that case, just reshape the images into 2D arrays, do the matching, and then reshape the result back into a volume.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by