LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calculating volume from an image

Solved!
Go to solution

Thanks altenbach for the clarification, I thought to do that I would need IMAQ tool ! Can you please assist in detecting these variables? 

0 Kudos
Message 21 of 33
(164 Views)

You have 2D array data that you can slice and dice as shown and do some simple signal processing.

 

A picture indicator can show the picture and there are plenty of tools to detect mouse interaction and draw decorations (lines, circles, text, etc.) in any color. No IMAQ needed.

 

As a first step you need to define the scenario bounds.

 

  • Is the sight glass always fully visible or can parts be cut off?
  • Is the magnification always the same?
  • Is the picture always greyscale or can it be color?
  • Is is always exactly vertical or can it be tilted?
  • Does it always have the same number of markers over its length?
  • Is the liquid always darker than the space above it?
  • How fast does the level change?
  • What is the required precision?
  • etc.
0 Kudos
Message 22 of 33
(162 Views)

For example just doing the average brightness of each row shows the pattern of major and minor tick marks, the zero line, the sight glass limits, and the level. A simple 1D feature detection can get all required information. Try it!

 

altenbach_0-1760626128667.png

 

 

 

0 Kudos
Message 23 of 33
(156 Views)

Thank you really appreciated. I will try it. 

0 Kudos
Message 24 of 33
(143 Views)

I think the pixel at zero line could be found using the same code and then the rest of the calculations to be donecalculating pixel of zero number.JPG

0 Kudos
Message 25 of 33
(128 Views)

The zero line is the only one that is present on the left half of the object and is the only real sharp feature, you could apply a filter on that column data and see which point changes the most, for example.

0 Kudos
Message 26 of 33
(108 Views)

Thank you albentach I am trying to do that, and also I want to understand how to get the therhold Y and how I can calculate it? 

0 Kudos
Message 27 of 33
(83 Views)

Using this vi resulting 800 which somehow close to 797 that could be detected visually. 

0 Kudos
Message 28 of 33
(69 Views)

Hello altenbach, I have a question am trying to solve but struggling to solve it. how to change the code if the image ITest me.jpg am selecting is in different orientation similar to the attached picture? 

0 Kudos
Message 29 of 33
(36 Views)

I got that solved. please see attached picture. The issue I am facing now is when the position of the opject changes, the vi wrongly calculates number of lines!! is there are way to fix that? 

I appreciate your help and support. Thank you.  Capture.JPG

0 Kudos
Message 30 of 33
(26 Views)