I want get the code to find average line width of the following prints (image attached)
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Image Analyst
2022-2-23
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 个评论
Image Analyst
2022-2-25
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!