Binarizing of a 3D image

7 次查看(过去 30 天)
Hege
Hege 2020-9-14
评论: Hege 2020-9-18
I have scanned a pack of fibres using Micro CT machine and now I want to process it using the Matlab. I used below code to processed the .vol file. However, now I want to view this 3D array clearly which means to see the fibres. my expectations are mentioned in below. please correct me if I am wrong.
1)convert the 3D grey scale array in to a binarise image and then start the thresholding.
2)find the optimum thresholding value and add filters accordingly to remove the noise which means to find the air and fibres clearly and then convert back to the 3D grey scale image
Are my expectations are correct? Could you help me to do these things for the 3D array.
Below is the code for my pack of fibers
fid = fopen('E:\FL\fl_D_7mm_6um_1d42s\rfl_D_7mm_6um_1d42s.vol');
voxels = fread(fid, '*uint32'); %read as 32 bit unsigned. I'm assuming they're unsigned
fclose(fid);
voxels = reshape(voxels,[1920,1920,1536]);
%voxels = reshape(voxels, [1920, 1920, 1536]); %you may need to permute the numbers here
% %and you may need to permute the dimensions afterward

采纳的回答

Image Analyst
Image Analyst 2020-9-14
  14 个评论
Image Analyst
Image Analyst 2020-9-16
Try this:
image3d = randi(255, 100, 100, 100); % Sample data. Replace with your 3-D array.
histObject = histogram(image3d);
title('Histogram of 3-D Image', 'FontSize', 15);
xlabel('Gray Level', 'FontSize', 15);
ylabel('Count', 'FontSize', 15);
grid on;
Hege
Hege 2020-9-18
Thank you so much for your great help Image Analyst!

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by