Calculate the cone angle of a spray image

6 vues (au cours des 30 derniers jours)
sanjeet
sanjeet le 13 Mai 2015
Commenté : Image Analyst le 2 Août 2023
Please find the image bellow - the angle is between the boundary lines in red shown, while the reference point is the center point in the line shown as reference. The reference point is at fixed distance known value. The dark fish shaped is the spray shape after impingement- for which we need to measure the angle. Scattered dots are particle in liquid form-
To tackle I thought to get following steps: read the image Subtracting image with background image to get clear spray visualization convert grey-scale to binary setting threshold for separating the dark and light area- for boundary Drawing the boundary lines as spray after collision and calculating the angle between lines
  3 commentaires
Image Analyst
Image Analyst le 13 Mai 2015
Attach the original, un-annotated image and your script if you need help on it.
sanjeet
sanjeet le 13 Mai 2015
Modifié(e) : sanjeet le 13 Mai 2015
My actual image to be processed is
My matlab code:
% Calculate the cone angle of a spray image
clear, clc, close all
Image = imread(['44_M_b.jpg']);
[a1 a2 a3]=size(Image);
x0=215; %if picture higher than increase number 215
y0=255; %if picture to the left than increase number 255
r=170; %170
Image2=imadjust(rgb2gray(Image));
figure(1); imshow(Image2)
hold on
BW = im2bw(Image2);
figure(2); imshow(BW)
BW1 = edge(BW,'sobel');
figure(3); imshow(BW1);
size(BW1)
I am getting the image as
My next step is to get scan pixel to get a line to represent the spray edge as shown in image earlier. They should start from intersection at reference point. I tried using bwtraceboundary and find but unable to create boundary along the edge inner. Please guide me to get the line along the desired spray edge.

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 14 Mai 2015
Modifié(e) : Image Analyst le 16 Juil 2021
Alright sanjeet, I spent way more time than I should have to make this fancy for you (about half an hour) but attached below the image is the code.
It determined that the angle is 23.1 degrees. If you want the lines overlaid on the image, I'm sure you can figure out that simple part. As I mentioned in the comments you might want to figure out an algorithm to examine the widths plot and figure out where to fit your line over. The min is fairly straight forward, but the widest part is somewhat of a judgement call.
  1 commentaire
sanjeet
sanjeet le 14 Mai 2015
Thanks a lot
I got 24 degree as cone angle on increasing the threshold value to 65 from 40... which matches with that measure by protector using paint shop

Connectez-vous pour commenter.

Plus de réponses (2)

Dhruv Gandhi
Dhruv Gandhi le 29 Avr 2019
Hallo image analyst,
i want to calculate the area of the coloured image , see the attachment.
i try to convert all the blue lines into white and other then Blue in to Black. after That want to calculateArea of this Black region in the image. i Dont know How to do that. can ypu please Help.

I Komang Gede Tryas Agameru Putra
Dear Image Analyst,
Thank you for providing the code above, I tried to use your code to analyze the cone angle, but it turns out that the cone angle is not properly calculated since it shows zero values (please kindly see the attachment).
Please kindly help me to solve this issues.
Thank you in advanced.
  5 commentaires
I Komang Gede Tryas Agameru Putra
Dear Image Analyst,
I have posted the question in separate section. Thank you in advanced
Image Analyst
Image Analyst le 2 Août 2023
Thanks. I'll look at it later today.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by