How to quantify the difference between two image stacks?

3 次查看(过去 30 天)
Hi, I want to quantify the registration efficacy of two 3D image stacks. Is there a function that can quantify this? For now I have to do average projection of xy, yz, and xz plane and compare their absolute difference with imabsdiff. https://www.mathworks.com/help/images/ref/imabsdiff.html Thanks!
  1 个评论
Yajie Liang
Yajie Liang 2020-4-16
actually, the real question is how to quantify the quality of 3d image registration. For example, how much percentage of the volume is overlapped.

请先登录,再进行评论。

回答(1 个)

Satwik
Satwik 2025-4-16
I believe that an in-built MATLAB function to determine percentage of volume overlapped between two images does not exist as of now. However, we can calculate the percentage volume overlapped between two 3D binary images by using the statistical method of Dice Similarity Coefficient (DSC). The DSC is calculated as twice the size of the intersection of the two sets divided by the sum of the sizes of the two sets.
Here is an example script you may refer to:
% Example binary 3D images (img1 and img2)
% Make sure these are logical arrays
img1 = rand(100, 100, 100) > 0.7;
img2 = rand(100, 100, 100) > 0.7;
% Calculate Dice Similarity Coefficient
intersection = sum((img1 & img2), 'all');
dsc = (2 * intersection) / (sum(img1, 'all') + sum(img2, 'all'));
% Convert to percentage
dsc_percentage = dsc * 100;
fprintf('Dice Similarity Coefficient: %.2f%%\n', dsc_percentage);
I hope this helps!

类别

Help CenterFile Exchange 中查找有关 Geometric Transformation and Image Registration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by