Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

parrothead

macrumors 6502a
Original poster
Sep 24, 2003
644
0
Edmonds, WA
I am looking for some software that runs native in OSX (as opposed to VPC) that will project up to 50 random points onto a photo. I would be using this program to analyze digital photos of the seafloor bottom. Basically I categorize anything that a point is touching. The software must be able to create 50 points and it must be able to make them random.

If I can find something like this, then I will be able to work from home if I want instead of going into the office. I am sure many of you could see the benefit of this! Any help or suggestions will be greatly appreciated and if I use your idea I will name a coral after you (well probably not, but it could happen :D )
 
An app like that cant be very hard to make. Unfortunatly, I'm not a programmer. It all depends on exactly or inexactly how random they need to be. Might want to check out #macdev on irc.freenode.net. Good luck!
 
Seems to me that you could use a macro in Excel to do this... you could import the picture into a worksheet, size the cells so they're squares, and then run a macro that shades 50 randomly-selected cells within the range of cells that covers the picture.
 
DanTekGeek said:
An app like that cant be very hard to make. Unfortunatly, I'm not a programmer. It all depends on exactly or inexactly how random they need to be. Might want to check out #macdev on irc.freenode.net. Good luck!


Any programmers out there want a new project? ;)
 
Soooo.... you want a program that takes a photo as input and basically changes 50 random pixels to bright pink or something?

What format are the images in? How big are they? Can it just be any 50 random pixels?
 
SilentPanda said:
Soooo.... you want a program that takes a photo as input and basically changes 50 random pixels to bright pink or something?

What format are the images in? How big are they? Can it just be any 50 random pixels?

The images are jpegs taken at the highest resolution with a 6MP Canon EOS 10D. I am thinking that with a picture that large the dots that are projected on the pic need to be bigger than a single pixel. It is critical that they are projected totally randomly, as this is for a scientific project and us scientists are obsessed with "random sampling."

Since we exclusively use PCs at work and I, of course, will be using my powerbook at home I can't use the software (unless, like I said before, I use VPC, but who wants to do that?) The software is freeware, with restricted distribution. It basically projects dots on the photo. However I like the idea of actually changing the color of pixels in the image, because that would allow us to preserve the altered photos in case we needed to verify our work.

Panda if you can or know of someone who can write a program like this that would be great.
 
Any chance of posting or linking to a sample image? I'd be happy to play around with one. The "random dots" bit is easy enough, once the photo is loaded. If I end up doing it in Java, it'll run on the PCs as well.
 
Just thought of another thing, if someone were to actually write a program it would be great if the number of dots that are created/projected could be adjusted up to 50. My supervisors might want to tweak things in the future. :rolleyes:
 
jsw said:
Any chance of posting or linking to a sample image? I'd be happy to play around with one. The "random dots" bit is easy enough, once the photo is loaded. If I end up doing it in Java, it'll run on the PCs as well.

If anyone else wants a sample image just pm/email me with your email address and I will send you one.

Edit: Oh yeah, and if someone does end up writing a program for this I will make sure you get credit in the scientific circles and I could at the very least ask my supervisors about some possibility of payment. (I work for the government, we should have enough money, but definitely no gurantees on that one)
 
parrothead said:
Just thought of another thing, if someone were to actually write a program it would be great if the number of dots that are created/projected could be adjusted up to 50. My supervisors might want to tweak things in the future. :rolleyes:

Please - any programmer worth their salt would make it customizable. Same with dot size and color, at least.
 
parrothead said:
It is critical that they are projected totally randomly, as this is for a scientific project and us scientists are obsessed with "random sampling."

I thought 'total' randomness was a hard thing to achieve with a computer and even harder to measure...

How will you know when you get it right?
By doing some kind of distribution graphs with millions of measurements?

Just curious...
 
I'm going to use the word rank of any English words in the latest posts by mymemory as seeds for the random number generator. As close to utterly random as modern science can hope to get.
 
jsw said:
I'm going to use the word rank of any English words in the latest posts by mymemory as seeds for the random number generator. As close to utterly random as modern science can hope to get.

Ha-ha! :D

Topical, too...
 
::Stop the presses::

Just talked to my boss and she really wants to continue to use the same program. :mad: I can try and see if the original author can adapt it for OSX or would be willing to let someone else take a crack at it. Anyway, if those of you that like the challenge of writing a program like I have been requesting want to continue, I will definitely advertise it in the marine bio world in case there are any Mac using scientists out there that have non-narrow-minded bosses. :mad:
 
As long as this remains OK with parrothead, people can get the samples from me:



and




Both are ~2 MB (click on thumbnails to get hi-res versions). The images are not to be used commercially or redistributed, and so on.
 
enjoy the photos, they were taken on a coral reef off of Jarvis Island in the South Pacific. Believe it or not these are really good pictures. We leave the beautiful picturesque diving to the amatuers and we get the boring... uh, I mean other areas. ;)
 
Got one done...

It is just a plugin to ImageJ but should work well. You can eMail me using the user name "wdouglas2", then that little "@" sign, then the domain "myrealbox.com".

The plugin will likely have to be customized. For example, you should be able to select the colour and possibly the number of points. But even so, it is currently working with hard coded values.

William


clayjohanson said:
Seems to me that you could use a macro in Excel to do this... you could import the picture into a worksheet, size the cells so they're squares, and then run a macro that shades 50 randomly-selected cells within the range of cells that covers the picture.
 
parrothead said:
::Stop the presses::

Just talked to my boss and she really wants to continue to use the same program.

Sounds like a neat project; I could see why you might not want to switch programs though. Even if your boss only meant it in a sense of convenience, switching between two programs alters the workflow and process and you can't be sure you're not introducing noise into the results. You seem pretty keen on having absolutely random samples, which someone else has stated is hard to do with computers. Even if the programs you use now were biased in their random number generators, you'd want to keep that same bias consistent across all the results...
 
Hrmmm... I wouldn't think it'd be a hugely difficult task to write an app to do this. I wrote (a few years back) a program that took a 16 shades of gray TIFF image and write to a text file each pixel with a hex value 0-F representing how dark the pixel was thus recreating the image in an ASCII art sort of format. It wouldn't have been terribly hard to random turn pixels (or an area of pixels) a certain color at random.

Why'd I write it? I dunno. :)

I have thought about random numbers a bit and I thought a fun way to do it (although I'm sure somebody will argue, "That's not random at all!") would be to use an audio CD. Basically the program would randomly (via your standard rand time seeded function) pick a track, find out how many seconds long it was, pick a random time in the track, and then use the data for that second of audio to generate a random number somehow. It's just as random as pulling a random seeded from time I guess but it would seem more fun to require the user to insert an audio-CD to run your program.

Of course... you could also contact the CDDB or whatever when the CD was inserted and reject music you don't like... :)

Heh... I've also contemplated writing a CD playing app that would reject users audio-cds based on my own preference...

Anyhow I'm getting off topic with my ridiculous programs.
 
Since the photos themselves are, in essence, of a random location, I'm not sure how important "true" randomness is, as opposed to simply ensuring a relatively even distribution of points. I'm not even sure why you couldn't use exactly the same points on every picture.
 
jsw said:
Since the photos themselves are, in essence, of a random location, I'm not sure how important "true" randomness is, as opposed to simply ensuring a relatively even distribution of points. I'm not even sure why you couldn't use exactly the same points on every picture.

But they're not random locations. There must have been some intent on the photographers' part...

And an even distribution wouldn't be random, would it? Occasionally, you'd get some clumpiness... wouldn't you?

I have no clue what I'm talking about though, just blabbing...
Think Keith & the JD are getting to me...
 
Blue Velvet said:
But they're not random locations. There must have been some intent on the photographers' part...

And an even distribution wouldn't be random, would it? Occasionally, you'd get some clumpiness... wouldn't you?

I have no clue what I'm talking about though, just blabbing...
Think Keith & the JD are getting to me...

Well, the photos are random in many senses. They are set on a timer that hits the shutter release every 15 seconds. The camera itself is mounted to a "towboard" which is a board that is "flown" by a diver that is being pulled behind a boat. The randomness comes in because the driver of the boat doesnt really know what he is driving over and the diver tries hard not to bias the results by flying as straight as possible. As far as how random the points have to be, it doesnt have to be the most-amazing-randomizer-ever type random, just random enough so that it is not in a pattern. The points must be different between pictures though. I am really please with all the interest you all have shown, it really reflects well on the Macrumors community.
 
SilentPanda said:
I have thought about random numbers a bit and I thought a fun way to do it (although I'm sure somebody will argue, "That's not random at all!") would be to use an audio CD. Basically the program would randomly (via your standard rand time seeded function) pick a track, find out how many seconds long it was, pick a random time in the track, and then use the data for that second of audio to generate a random number somehow. It's just as random as pulling a random seeded from time I guess but it would seem more fun to require the user to insert an audio-CD to run your program.

There was a Tom Clancy where they used an audio CD recorded with random noise generated from the atmosphere to create an encryption key. You want to read the message? Insert the CD... Want to hide the message? Insert the CD...

They would destroy the CDs after each use, but that was because they didn't want anyone else to read their messages. You could use the same CD many times.

iWould assume this is the audio track on the CD:
It would be a recording of a microphone just sitting there, and then the gain would be upped the gain on it so those random popping, hissing, etc. noises were clearly audible.
Insert that into computer
Take random place on the CD, read 50 seconds from it, and then use each one of those second clippings of sound to generate a really big number. Voila! Random.
Or just use a dial up modem and then pick up the phone... that is pretty random too....
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.