Can we automatically find the threshold from CT images having 3 different materials?
Show older comments
I am having 551 CT images (Fractal characteristics of unsaturated sands (figshare.com)) and i have to reconstruct the into 3d. I need to find the thresohold automatically, as each slice of ct image have different thresold values. So in order to get better volume construction using volumer viewer matlab app. I am attaching the code but i dont want to put the treshold values manually (135 and 41), as for more accurate volume construction the treshold values should be calculated differently for each slice based on histogram of each slice.
Note : Please download the images from the link provided.
Link for CT images:https://figshare.com/articles/figure/Fractal_characteristics_of_unsaturated_sands/6938261.
clear;clc;
% Download the CT Images (https://figshare.com/articles/figure/Fractal_characteristics_of_unsaturated_sands/6938261)
rfiles = dir('*.tif');
for i = 1:length(rfiles)
im = imread(rfiles(i).name);
imc(:,:,i) = im;
end
% h= histogram(imc);
%%% I want threshold no. to be automated based on each CT images inside the
%%% loop. NOT manually inserting it
imbin_w = imc <= 135 & imc >= 41; % these threshold should be different for each slice based on histogram for each slice
imbin_particles = imc > 135;
imbin_gas = imc <41;
%% Use this once you export from volume viewer
volshow(imc,objectConfig)
Accepted Answer
More Answers (1)
Shreeya
on 7 May 2024
0 votes
Hello
According to my understanding, you want to determine the thresholds in the images without any manual intervention. If you can determine an objective function which needs to be minimized for obtaining the required thresholding parameters, maybe bayesian optimization can help you. I have linked the resouces for helping with the implementation:
Categories
Find more on Particle & Nuclear Physics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!