Question
Need help with matlab. Will thumbs up if fast response is given thank you! Make a new script called process 2) You should have two
Need help with matlab. Will thumbs up if fast response is given thank you!
Make a new script called process"
2) You should have two image files. L-8F.jpg is the SEM image that you will use. load in the image as a matrix. 3) Because there are four possible compositions for each pixel, you will need to pre-allocate a matrix completely filled with white pixels (1) for each composition. Name these matrices IronOxide, Calcite, Dolomite, and Pores.
4) Loop through the entire matrix to identify which of the 4 different compositions applies to each pixel. When a given pixel is identified, make the corresponding pixel in the appropriate matrix (i.e. IronOxide, Calcite, Dolomite, or Porosity) black. 5) To visualize your results make a plot of each image matrix in a single figure. Please use the gray colormap, but make sure that everything is properly scaled. Figures should have the titles shown below. Note that all of the images will consist of only either black or white pixels, except for the raw image, which is grayscale.
Your script should calculate the percentages of each type of pixel for the entire image and print the results to the screen stating the abundances to two decimal places. Your printout should look like the example below (but with actual numbers), with all of the % values lined up neatly. The print command should refer to variables, so if a different SEM image were loaded, the command window output would automatically update. Pixel Abundances Porosity: xx.xx % Dolomite: xx.xx % Calcite: xx.xx %
Iron Oxides: x.xx % Total: xxx.xx %
\begin{tabular}{llc} PixelComposition & \multicolumn{1}{c|}{ Color Name } & GrayscaleRange \\ \hline Iron Oxides & Light Gray to White & >175 \\ \hline Calcite & Medium Gray & 95175 \\ \hline Dolomite & Dark Gray & 6194 \\ \hline Porosity & Very Dark Gray to Black &Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started