Gear teeth dimension identification

3 visualizaciones (últimos 30 días)
Sankaramuthu
Sankaramuthu el 3 de Oct. de 2024
Comentada: Sankaramuthu el 29 de Nov. de 2024
Hi, I am doing the project where i need to measure the Gear Teeth dimension like (Teeth width ,thickness, pitch error, PCD) acquired images from Machine vision system.I tried with Simulink script. But the results are not correct.Request you to share your views and coding on how to estimate the gear teeth dimension.
  7 comentarios
DGM
DGM el 27 de Nov. de 2024
For the record, I agree with @Image Analyst here. It looks like the subject is a molded plastic part with mold flash. A telecentric lens would mean that we're not trying to look diagonally through narrow sections near the edge of a translucent part. Besides being better for any quantitative analysis, it should improve subject contrast.
Sankaramuthu
Sankaramuthu el 29 de Nov. de 2024
Thankyou verymuch sir. You answer was verymuch helpful.

Iniciar sesión para comentar.

Respuesta aceptada

Jacob Mathew
Jacob Mathew el 26 de Nov. de 2024
Hey Sankaramuthu,
There is an exmple on Boundary Tracing on Images which can be used to find and plot the boundary of the gear from the image. You can launch the example using the following command:
openExample('images/TraceBoundariesOfObjectsInImagesExample')
You can adjust the above to suit the gear’s image as follows:
gear = imread("gear.bmp"); % loading the image
% Binarising the image
% We first convert the 3 Dimensional RGB image into Grayscale
% We then smoothen the image using gaussian filter to get better boundary
% We then binarize the image
gear_BW = imbinarize( ...
imgaussfilt( ...
rgb2gray(gear),3 ...
));
% Remove any small pixels in the image before boundary
cleanedBinaryImage = bwareaopen(gear_BW, 100);
imshow(cleanedBinaryImage);
% Create boundary
boundaries = bwboundaries(gear_BW);
figure;
hold on;
% the first one is the outline of the image file
for i = 2:length(boundaries)
b = boundaries{i};
plot(b(:,2),b(:,1),'r')
end
hold off;
% the second one is the inner boundary of the gear
% the third one is the teethed boundary of the gear
gearBoundary = boundaries{3};
gearCentroid = mean(gearBoundary);
distances = sqrt((gearBoundary(:,2) - gearCentroid(1)).^2 + (gearBoundary(:,1) - gearCentroid(2)).^2);
plot(distances) % we can see the peaks which correspond to the teeth of the gear
% we find the minimum height to find a peak in the graph
[peaks, locs] = findpeaks(distances,'MinPeakProminence', 20);
% One peak is cut out since the graph doesn't wrap around
numTeeth = length(peaks)+1;
% average distance between teeth
averageDistance = mean(diff(locs));
fprintf('Number of teeth: %d\n', numTeeth);
fprintf('Average distance between teeth: %.2f pixels\n', averageDistance);
>>
Number of teeth: 24
Average distance between teeth: 604.41 pixels
You can extend the above code to further analyse other parameters of the gear.
  1 comentario
Sankaramuthu
Sankaramuthu el 29 de Nov. de 2024
Thankyou verymuch sir. You answer was verymuch helpful.

Iniciar sesión para comentar.

Más respuestas (0)

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by