Any Mac software that projects random points?

Discussion in 'Mac Apps and Mac App Store' started by parrothead, Jan 27, 2005.

  1. parrothead macrumors 6502a

    parrothead

    Joined:
    Sep 24, 2003
    Location:
    Edmonds, WA
    #1
    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 )
     
  2. DanTekGeek macrumors 6502

    Joined:
    Nov 11, 2004
    Location:
    Denver, CO
    #2
    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!
     
  3. clayj macrumors 604

    clayj

    Joined:
    Jan 14, 2005
    Location:
    visiting from downstream
    #3
    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.
     
  4. parrothead thread starter macrumors 6502a

    parrothead

    Joined:
    Sep 24, 2003
    Location:
    Edmonds, WA
    #4

    Any programmers out there want a new project? ;)
     
  5. SilentPanda Moderator emeritus

    SilentPanda

    Joined:
    Oct 8, 2002
    Location:
    The Bamboo Forest
    #5
    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?
     
  6. parrothead thread starter macrumors 6502a

    parrothead

    Joined:
    Sep 24, 2003
    Location:
    Edmonds, WA
    #6
    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.
     
  7. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #7
    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.
     
  8. parrothead thread starter macrumors 6502a

    parrothead

    Joined:
    Sep 24, 2003
    Location:
    Edmonds, WA
    #8
    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:
     
  9. parrothead thread starter macrumors 6502a

    parrothead

    Joined:
    Sep 24, 2003
    Location:
    Edmonds, WA
    #9
    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)
     
  10. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #10
    Please - any programmer worth their salt would make it customizable. Same with dot size and color, at least.
     
  11. Blue Velvet Moderator emeritus

    Joined:
    Jul 4, 2004
    #11
    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...
     
  12. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #12
    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.
     
  13. Blue Velvet Moderator emeritus

    Joined:
    Jul 4, 2004
    #13
    Ha-ha! :D

    Topical, too...
     
  14. parrothead thread starter macrumors 6502a

    parrothead

    Joined:
    Sep 24, 2003
    Location:
    Edmonds, WA
    #14
    ::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:
     
  15. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #15
    Any chance of still getting sample images, just in case?
     
  16. parrothead thread starter macrumors 6502a

    parrothead

    Joined:
    Sep 24, 2003
    Location:
    Edmonds, WA
    #16

    emailed you, and will email them to anyone else that is interested.
     
  17. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #17
    As long as this remains OK with parrothead, people can get the samples from me:

    [​IMG]

    and


    [​IMG]

    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.
     
  18. parrothead thread starter macrumors 6502a

    parrothead

    Joined:
    Sep 24, 2003
    Location:
    Edmonds, WA
    #18
    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. ;)
     
  19. willy wonka macrumors newbie

    Joined:
    Jan 28, 2005
    #19
    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


     
  20. notjustjay macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #20
    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...
     
  21. SilentPanda Moderator emeritus

    SilentPanda

    Joined:
    Oct 8, 2002
    Location:
    The Bamboo Forest
    #21
    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.
     
  22. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #22
    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.
     
  23. Blue Velvet Moderator emeritus

    Joined:
    Jul 4, 2004
    #23
    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...
     
  24. parrothead thread starter macrumors 6502a

    parrothead

    Joined:
    Sep 24, 2003
    Location:
    Edmonds, WA
    #24
    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.
     
  25. Mechcozmo macrumors 603

    Mechcozmo

    Joined:
    Jul 17, 2004
    #25
    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....
     

Share This Page