MATLAB: Comparing volume of two 3d matrices

arraydigital image processingimage analysisimage processingMATLAB

I have two 3d matrices called ORIGINAL and RECONSTRUCTED, size 500x500x500.
  • ORIGINAL [Solid intensity: 0 black , 1 white]
  • RECONSTRUCTED [intensity: 0 black to 1 white]
each matrix contain an object that can be viewed using command : isosurface(Volum,0.5);
How can I compare the size of those two object in Matlab?
Is there a way to combine the two matrix together and draw an isosurface of the two Objects after combination?
Thanks

Best Answer

If the objects are convex then you can use the second output of convhulln to give you the volume directly. If not, then you have a few options:
You can just sum the images:
v1 = sum(sum(sum(original)));
v2 = sum(sum(sum(original)));
You could use a more fancy approach such as this:
And there are other ways.
For my masters thesis that did quite a bit of CT volume analysis, I just summed - it was a good enough approximation and there were many other attributes in the image that cause more error than this (reconstruction/downsampling bits/binarizing/noise, etc).