Inverse of padarray()?
이전 댓글 표시
I am working on MRI image processing, wherein I work with 3D arrays. To increase the resolution while taking the FFT of the array, I use padarray() and double the size of the image. After the FFT is done, I want to make the size of the resultant array, the same as that of the original array. Is there a way to do it other than looping over and deleting the extra voxels?
For example, if I have 64*64*64 matrix and I increase its size to 128*128*128, and even the resultant will have the same size. I want to change the resultant to a size 64*64*64. To keep it short, is there some kind of inverse padarray?
댓글 수: 4
Adam
2016년 12월 2일
fft will pad for you if you tell it to use more points than you have. It will always pad at the end so that you can just take the initial portion of the result and leave the trailing zeros behind again afterwards.
Image Analyst
2016년 12월 2일
Simply crop it. By the way, you're not increasing the spectral resolution, though you may incorrectly think so because the FFT has more elements. Think about it. If you don't realize the truth of what I said, ask.
jupiter
2016년 12월 3일
Adam
2016년 12월 3일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!