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

4 visualizaciones (últimos 30 días)
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.

Respuestas (1)

Image Analyst
Image Analyst el 23 de Feb. de 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 comentarios
Image Analyst
Image Analyst el 25 de Feb. de 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.

Iniciar sesión para comentar.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by