Gear teeth dimension identification

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 3 de Oct. de 2024
Well I was going to set the scaling on that image so that it actually showed up in frame, but it turns out that it's a 46MB BMP, so the editor won't even load anymore. There's an image there. You just have to scroll around to find it.
That said, where is the boundary of the gear? Is that penumbra or is that light shining through the edge of a translucent part? Is the nonuniformity of the "penumbra" evidence that the subject is slightly off-axis, or is it backlit from an angle? Are those missing chunks or just photography artifacts?
Sankaramuthu
Sankaramuthu el 4 de Oct. de 2024
Penumbra is due to lighting effect.Backlight is not kept as an angle and kept horizontally and parallel to the object.It is due to photography effect
DGM
DGM el 4 de Oct. de 2024
Editada: DGM el 4 de Oct. de 2024
I'm really not sure what to make of the image. Is the part the edge of the yellow region (solid line), or the darker region (dashed line)? If it's the yellow region, is the cusp a defect? If it's the dark region, it's going to be difficult to get an accurate measure of a fuzzy boundary.
Sankaramuthu
Sankaramuthu el 4 de Oct. de 2024
Hi Sir, Really thanks for immediate support. It is a part of yellow region and it is also defect produced in the machine.
Can you able to support and guide my to find the PCD and teeth width and height.Dotted lines are correct profile of teeth, the cap between te dotted line and darkline is defect in the part.
Image Analyst
Image Analyst el 26 de Nov. de 2024
The blurry edges and penumbra are most likely due to your using the wrong lens. You should be using a telecentric lens which will have parallel rays. Google Telecentric lens.
If you use a telecentric lens rather than a regular lens, the light rays will not strike the edge of the gear at an angle and you'll avoid penumbra.
Another possible reason could be glare, which could be caused by a number of things like a dirty lens, poor quality lens (internal scatter or dust), bad coating on the lens, or particulates in the air between the gear and the lens.
See @Jacob Mathew's solution below if you want to continue using your sub-optimal images. But you could have better and more accurate results with a telecentric lens (trust me - I have a Ph.D. in optics).
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)

Categorías

Productos

Versión

R2024a

Preguntada:

el 3 de Oct. de 2024

Comentada:

el 29 de Nov. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by