Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB Help please Image Analysis. I have been struggling with a code for my assignment. Basically I need a code that can first find jpg

MATLAB Help please Image Analysis.

I have been struggling with a code for my assignment. Basically I need a code that can first find jpg files in the directory and then threshold them. After that I have a black picture with a few grey blobs. I then need to find the area centroid and major/minor axis length for each file. I then need to concatenate the 4 matrices from the 4 pictures so that all area values are together and etc. Here's the code l already have and it can threshold the pics and show them, but it only does the regionprops for the last image. So i need help figuring out a loop that will show 4 separate matrices for each image with area, centroid, major/minor axis length. Please help

close all clc clear variables FileList=dir('*.jpg');

for k=1 : length(FileList) baseFileName=FileList(k).name %#ok A=imread(baseFileName); figure imagesc(A) A(A<=220)=0; imshow(A) A2 = bwareaopen(A, 20); imshow(A2) S = regionprops(A2,'Area'); Area = cat(1,S); stats= regionprops('table',A2,'Area','Centroid','MajorAxisLength','MinorAxisLength');

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions