I have a 3D image and need a method by which be able to compress it. The quality for the available methods for 2D compressing is very good. But, I could not find any suitable method for 3D. Anyone can help me about it? I am using MATLAB for my work. Thanks in advance for your help and suggestion.
Asked
Active
Viewed 1,708 times
1
-
what do you mean by 3D image? a 3-channel image, a set of 3D points (point-cloud), a polygonal mesh (surface), a volume (set of images in sequence or depth)? Consider elaborating a bit and include an example of the method you are using for compression in 2D through MATLAB, e.g. DCT etc. – gevang Sep 21 '12 at 23:32
-
@ Gevang: I have a 3D volume (a matrix of 100x100x50) and I want to make it smaller but without losing the accuracy. And, in MATLAB I just use imresize to resizing my 2D images – Sam Sep 21 '12 at 23:44
-
If you want simple re-sizing (and not some form of data compression), by preserving quality try resampling at a regular 3D grid (i.e. using `ndgrid`) and applying 3D interpolation (using `interp3`)or antializing (like in `imresize`). Also take a look at http://stackoverflow.com/questions/12520152/resizing-3d-matrix-image-in-matlab – gevang Sep 22 '12 at 08:04
2 Answers
-1
If your data is grid based like a 2d image, you will find that it is very easy to adapt the png format to a third dimension.

Jannis Froese
- 1,347
- 2
- 10
- 23
-
The PNG image format compresses images by [processing line by line and storing only the difference to other pixels](http://en.wikipedia.org/wiki/Portable_Network_Graphics#Filtering). This produces constant values from gradients (if the data was 1, 2, 3, it can be stored as 1, 1, 1). This makes the data more compressible for 'general purpose' algorithms like deflate. Then the resulting image is compressed by with the deflate algorithm. If your 3d image has similar properties as a typical 2d image, you can write a format that is basically png with aditional filter methods for the third dimension – Jannis Froese Sep 21 '12 at 23:47
-1
You can consider that your 3D image is a video (the third dimension is the time). Then, you can use standard video compression algorithms.
In matlab, you can use the videoWriter
class to make compressed video files:
https://www.mathworks.com/help/matlab/ref/videowriterclass.html

Oli
- 15,935
- 7
- 50
- 66