I want get the code to find average line width of the following prints (image attached)

4 views (last 30 days)
hi
i am working on an image analysis and control loop process for my electronics printer and i want to generate a code that would recognise the printed line width of the print from the image acquired after printing.

Answers (1)

Image Analyst
Image Analyst on 23 Feb 2022
I'd do color segmentation first. Try the Color Thresholder on the Apps tab.
Then, once you have the segmented image, I'd assume the blob is a long curvy snake or rectangle and you can get the area and perimeter with regionprops() and then divide to get the length
props = regionprops(mask, 'Area', 'Perimeter');
% Area = length * width
allAreas = [props.Area];
allPerimeters = [props.Perimeter];
% Divide by half the perimeter, which is approximately the length.
allLengths = allAreas ./ (allPerimeters/2);
  4 Comments
Image Analyst
Image Analyst on 25 Feb 2022
But you don't want those images, right? Because if we get something for that, it may not work on the original images you posted because they're completely different.

Sign in to comment.

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!