File Exchange

image thumbnail

Phase fraction calculation of microstructure

version 1.0.4 (5.01 KB) by Santosh Kumar
Phase fraction calculation for optical and SEM microstructure. Can do single and Batch processing too. Enjoy!

8 Downloads

Updated 20 Jun 2021

View License

%% Phase fraction calculation from optical or SEM microstructure. %%
% Works on Matlab 2021a (Not checked with previous version ;hopefully it works)
It is based on Adaptive image threshold. {https://uk.mathworks.com/help/images/ref/adaptthresh.html}
The sensitivity is set to default 0.5. It could be changed manually in code if required.
There are two options available
****************************************************************
Option one : Analaysis of single Image
Use the script names single_image_analysis.
=>select the image
=>Crop the image and double click
=>Should give you the result.
**************************************************************************
Option Two : Batch Image processing
This is useful when you have several images to process at one go.
{https://uk.mathworks.com/help/images/batch-processing-using-the-image-batch-processor-app.html}
Open matlab => open apps=> select Image Batch Processer
=> load the folders with all the images
=> Under Function name, browse the batch_processing script file
=> Under Process you can select either single or all and run.
=> Crop the image and double click for all the image.
=> you can see the results at right column for respective image
=> Under Export option => you can export result of all processed image to workspace.
=> Tick the required black ,white fraction and name of the image and export.
=> you should be able to see the allresults in workspace.
=> Use this to save as excel in cmd :
{writetable(allresults,'statistics.xls','WriteRowNames',true) }
It would be saved in matlab directory.
Hope you enjoy it !

Cite As

Santosh Kumar (2021). Phase fraction calculation of microstructure (https://www.mathworks.com/matlabcentral/fileexchange/94490-phase-fraction-calculation-of-microstructure), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!

Phase fraction calculation/Option 1- Single Image

Phase fraction calculation/Option 2- Batch Image processing