Applying Gaussian 3D filter to 32 bit float 3D Micro-CT image
이전 댓글 표시
Hi All,
I have a Micro-CT data file to process it through Matlab as shown in below. My array is a 3D array and it is 32 bit float. but gaussian filters which are introduced in mathworks are not supported to float data type
fid = fopen('E:\RE\re_C_7mm_6um_1d42s_01\re_C_7mm_6um_1d42s.vol');
voxels = fread(fid, '*float32'); %read as 32 bit float. I'm assuming they are 32 bit float(CT data)
fclose(fid);
voxels = reshape(voxels,[1920,1920,1536]);
d=imbinarize(voxels,95); % Thresholding the volume
d1=imgaussfilt3(d) % This lines gives me an error that it supports only for uint,int, single or double.check the error

What I should do to filter my 3D array using the gausfilt3 command? Appreciate your valuable advices. I want to remove the P(see the attached image)with or without gausfilt3.Appreciate your valuable adivces!
Error is shown below. A is the file for the filtering. If you check the gaussfilt3 command in mathworks A is defined. it is not my own name.
Error using imgaussfilt3
Expected A to be one of these types:
uint8, uint16, uint32, int8, int16, int32, single, double
Instead its type was logical.
Error in imgaussfilt3>parseInputs (line 285)
validateattributes(A, supportedClasses, supportedImageAttributes, mfilename, 'A');
Error in imgaussfilt3 (line 116)
[A, options] = parseInputs(args{:});
Error in volreading (line 55)
d1=imgaussfilt3(d)
답변 (1개)
Image Analyst
2020년 10월 11일
0 개 추천
Try imfilter() with your own custom kernel that is a Gaussian shape.
댓글 수: 11
Hege
2020년 10월 11일
Image Analyst
2020년 10월 11일
Not sure what you consider noise. Have you tried bwareaopen() to remove small particles? Do you just want to smooth the fiber surface by blurring the binary image and re-thresholding?
Hege
2020년 10월 11일
Image Analyst
2020년 10월 11일
You can threshold on intensity of course. But as of now, there is no bwareafilt() equivalent for 3-D to threshold based on blob size. But you can get the volumes with regionprops3() and find volumes in a certain range and get rid of them that way.
Hege
2020년 10월 12일
Image Analyst
2020년 10월 12일
Is your threshold on blob volume? Or intensity value?
Hege
2020년 10월 12일
Hege
2020년 10월 14일
Image Analyst
2020년 10월 15일
(i&&j&&k) will just be true (1) or false (0), and in this case since i, j, and k all more than 1, it will always be true, so not sure what you're doing there. To convert voxels to double, you can do
d = double(voxels);
Hege
2020년 10월 15일
Hege
2020년 10월 20일
카테고리
도움말 센터 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
