Detect the edge and mesaure the distance measurement of jet?

7 vues (au cours des 30 derniers jours)
Irfan Tahir
Irfan Tahir le 4 Juil 2017
Hi, i have high speed images of a jet, now i need to measure its penetration. Since i am a beginner with matlab therefore needed help to measure it. There is a jet with an angle. I need to detect the jet edge and to measure it distance (horizontal) from the origin.
% code clear all
mmPerPixel = 0.101;
Img=imread('C00018.tif');
[rows, columns, numberOfColorChannels] = size(Img);
pixelsPermm = 25 / mmPerPixel;
x1 = 15; % Starting column.
x2 = x1 + pixelsPermm;
y = round(0.9 * rows);
edge_r=edge(Img,'Roberts');
figure(1);imshow(Img, [0 2500]);
figure(2); imshow(edge_r);
line([x1, x2], [y, y], 'Color', 'r', 'LineWidth', 3);
text(x1, y-20, '25 cm', 'Color', 'r', 'FontSize', 20);
after using the code, i can see the horizontal length of the jet but i dont have its numerical value. I need to measure it till the edge. Needed help with detection. I dont know much about the edge command and its value. or may be i am using the wrong function. Help will be really appreciated.

Réponses (1)

Dimitris Iliou
Dimitris Iliou le 14 Juil 2017
There is a relevant MATLAB Answers post that might be of help. It talks about finding the length of an object in an image.

Community Treasure Hunt

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

Start Hunting!

Translated by