I want get the code to find average line width of the following prints (image attached)
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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.
0 Commenti
Risposte (1)
Image Analyst
il 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 Commenti
Image Analyst
il 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.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!