but I do not know enough programming to do it.
That is how I am trying but I know little about image processing so the commands are difficult to understand so how can the program be done?
]]>1. Use something like what is called a magic wand in Image editing software. It selects all the pixels which it thinks is of the same color as a given pixel to a certain thresold.
2. Count the number of discontinuous pieces of the unselected region. This can be done by scanning the whole image pixel by pixel and incrementing the counter by one whenever the current pixel is outside a selection and a immediate neighbouring pixel is selected.
Alternate to 2: Divide the total unselected area by the average area of 1 ball
]]>I will do a little reading on it and see what turns up. See you tomorrow.
]]>It's not making any sense to me either, and I think it would be a loooong, steeeep, uphill road to make this work...if that's even possible. What might have helped is a background of constant shade and of a colour quite different from the balls.
I'm at a total loss and would need to dive into M and graphics analysis/processing at the deep end before I could be of any real help, and of course that's not on.
I've probably spent enough time on this, and I'm soooo far out of my depth here that it's probably about time I called it quits...unless you can revive my flagging interest.
Catch you later, and sleep well (I'm about to tuck in too). You never know...in the a.m. I might wake up rejuvenated, rearing to have another crack at it. Ha!
]]>Very confusing and doubly so because I have no idea what any of the commands are doing.
See you later, need some sleep.
]]>...and the rings around those shapes are correctly positioned.
]]>I included two links in post #33 just now.
]]>Okay, I am looking at it now.
]]>It doesn't draw circles around the balls properly and the numbering is strange, but it found 199 objects (balls?)...and it drew about that number of circles (I didn't count them).
The code is from StackExchange, here.
StackExchange had .81 where I've got .7 in line 2. I played around with several options, and that was close to the best.
You'll need to paste Agnishom's image (just use my cropped one below) immediately before the semicolon in the first line.
The last image shows the result I got in M by pasting the StackExchange image into their code (with their .81 in the second line instead of my .7).
]]>Link please.
]]>