Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

ImageJ Automated Tracker

  1. Dec 29, 2016 #1

    joshmccraney

    User Avatar
    Gold Member

    Hi PF!

    I have a series of photographs taken of water being drained from a cup. I would like to automatically track the meniscus profile (not a particle) as it changes from photograph to photograph in ImageJ. Does anyone have a recommendation of where to start reading, or any plugins to use, so that I may do this?

    Thanks a ton!
     
  2. jcsd
  3. Dec 29, 2016 #2

    Hesch

    User Avatar
    Gold Member

    You haven't attached a photograph, but I guess that you want to track something like an ellipse ( surface seen skew from above ).

    Enhance edges in the image, then use a Hough-transform to locate the ellipse. Other geometric shapes may be found in the same way. The method is very accurate and robust.
     
  4. Dec 29, 2016 #3

    joshmccraney

    User Avatar
    Gold Member

    Oops, I've now attached two, separated by a 1-second interval.

    Are you referring to this plug-in: https://imagej.nih.gov/ij/plugins/ght/index.html
     

    Attached Files:

  5. Dec 30, 2016 #4

    Hesch

    User Avatar
    Gold Member

    No, I'm referring to a course ( pattern recognition ) where I participated years ago, and a lot of experience afterwards.

    First of all, you must convert this ".jpg" file into a ".bmp" file, gray scale with no compression. Now you can directly read color values pixel by pixel in the file.

    By some spatial method you can enhance vertical and horizontal lines separately. By a Hough transform, you can determine two vertical ( you know where about ) lines in the image ( edges of the cup ). So now you can determine the vertical center axis in the cup.

    The surface of the water in the cup ( middle section ) may then be expressed something like: y = ax2 + b , ( a<0 ). From the horizontal edge ( water surface ), you can determine sets of (x,y) placed on the surface edge, so knowing an edge pixel, you have two unknown: "a" , "b".

    Now you "guess" some different values as for "a", until a "sharp" value as for "b" is found by means of a Hough transform. I think that this "b" is the value you want to determine. The Hough transform is a statistical method to find such a value, and it can be determined within at most 0.1 pixel accuracy.

    If you include a vertical scale in the picture ( ml ), you may automatically read out the volume in ml.

    The calculation steps are quite simple, but the number of calculations - say 5 megapixels - are huge. Therefore FPGA's are often used to support a processor in practical applications. But stick to assembler programming :wink:. Then I think you can calculate an image within, say 10 sec. ( not real time ).
     
    Last edited: Dec 30, 2016
  6. Dec 30, 2016 #5

    joshmccraney

    User Avatar
    Gold Member

    Is this a course you are referring to? Can you do everything you described above in imageJ or are there other programs necessary?
     
  7. Dec 30, 2016 #6

    Hesch

    User Avatar
    Gold Member

    It was the firm "Learning Tree" that arranged a course in Stockholm ( Sweeden ) for one week. After this I got 2 months to experiment with my new knowledge and afterwards I made about 3 projects, measuring different industrial productions "on the fly". In one project the measurements/calculations were done by 28 cameras, 7 PC's and about 35 FPGA's.

    I'm not familiar with imageJ, but have instead developed software myself, specifically for the application. As earlier said it's not complicated as each calulation step is simple. It's these:

    for i1 := 1 to 1024 do
    for i2 := 1 to 820 do
    for i3 := 1 to 9 do
    . . . . .

    - loops that "eat" execution time. Hence the assembly coding and FPGA's. But if you can spend 10 sec. per photograph, you will just need a PC.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: ImageJ Automated Tracker
Loading...