loading
 
Counting drops
Kaarn from Netherlands  [3 posts]
16 year
I am looking for a way to count the number and size of paint drops in a picture. I have already triad out a few things and in the pictures you can see some results. Not all the drops get measured and there are a couple that get measured that aren't even there, but whit a few adjustments and just using parts of the picture I think I can solve the those problems.

But now I need to export the data I got from the pictures (the number of drops and the size) to something like a exel sheet so I can do the rest of the calculations. Is there a way to do this?

  
Kaarn from Netherlands  [3 posts] 16 year
i have done a lot more work on this and I just have 1 problem.

As you may know when you use Circles to you get a integer array whit all the info about every circle. All I need to do now is to isolate the diameter of every circle and put it in an other array so I can load it in excel.
I think this must be really easy to but I cant figure it out, can someone help please?

for some inspiration I include a image of 109 drops measured

 
Anonymous 16 year
Kaarn,

You could use the following VBScript in the VBScript module to isolate just the diameter of the circle array. Then you would save that array using the write_variables module.


circles = GetArrayVariable("CIRCLES")
ReDim diameters(ubound(circles)/13)

if isArray(circles) then
  if ubound(circles) > 0 then
    j = 0
    for i = 0 to ubound(circles)-1 step 13
      diameters(j) = circles(i+2)
      j=j+1
    next
  end if
end if

SetArrayVariable "diameters", diameters

Also have a look at the attached robofile that includes this plus the write variables module.

STeven.
program.robo
Kaarn from Netherlands  [3 posts] 16 year
Thank you for the help, it works perfectly!

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index