35 thoughts on “Lazy Psp Player (automatic Woodchopper)

  1. Something does indeed intrigue me, is how exactly does laptop #1 decide what is wood and what is a bunny?

    Inquiring minds wish to know where I could get that software or at the very least, give me an idea how to code it.

    Reason: Just think what that would do if you combine it with that airsoft turret (basic friend/enemy recongnition)?

  2. This is mildly stupid, but at the same time fairly intellectual, I’m sure ~50% of HAD readers couldnt do this, I know that I couldnt, but hey its a fairly decent project

    #8 One might write a computer program that checks for a certain image, if the image is what the computer is looking for, it does job X, if its not, it does job Y, of course with a webcam you get a crappy pic so there’d be a threshold to make sure that variations of teh same image all work

    If anybody wanted to do the scripting side of this, or check out more projects, Diablo 2 had plenty of nice AutoIT bots (google it), and if you read the tutorial, you could program autoIT do play just about any flash game, and possibly some more advanced stuff…

    I find the project was fairly cool, but IMO that game looks boring as @!%#

    Nice Hack!!

    -Fragged

  3. @the pagan wolf
    Hmmm, I don’t think it would be that complicated,
    just take the average color of all the pixels of the webcam and if it’s more brown than pink/blue/red its no rabbit but wood.
    probably something in that direction…

  4. sees to be on the right track. if it’s using a webcam to see it, it can only possibly interpret the image based on a defined value, ie. like mentioned more of one colour than another predominantly, or even focusing on a smaller cluster of pixels which would be enough to differentiate between images on the stump.

  5. @the pagan wolf – I don’t know what algorithm the author used, but you could do it something like this:

    1) Determine the area of the screen that you need to monitor.
    2) Save images of that area for each possibility: nothing, wood, bunny.
    3) Compare the current image (cropped to that area) against each saved image. Basic pseudocode to compare two images:

    Delta=0
    For X=0 To CurrentImage.Width-1
    For Y=0 To CurrentImage.Height-1
    Delta=Delta+Abs(CurrentImage(X,Y).Red-SavedImage(X.Y).Red)
    Delta=Delta+Abs(CurrentImage(X,Y).Green-SavedImage(X.Y).Green)
    Delta=Delta+Abs(CurrentImage(X,Y).Blue-SavedImage(X.Y).Blue)
    Next Y
    Next X

    The comparison that returns the lowest Delta (difference) wins.

    Also, sometimes it’s also useful to multiply each pixel/color’s Delta by itself, which gives higher “weight” to larger differences. This tends to filter out changes in the camera’s auto-exposure. For instance, red would be (same change applies to green & blue):

    Delta=Delta+Abs(CurrentImage(X,Y).Red-SavedImage(X.Y).Red)^2

  6. am i the only one that think this was a sweet piece of hacked schnizzles`? in my eyes hacking is also about using your knowledge in another way.
    this was so sweet i got diabetes! keep up the good work and use your knowledge in ways humanity never needs it!
    best regards:
    Mahder Pwned Inc.

  7. Hey guys, I wanted to answer a couple questions.. I have two computers, because only one has a parallel port, but it’s slow, and is impossible to develop on, and it adds to the “excess” factor :)

    What I did, is I had a series of points that are monitored. When the log comes up, I tell it to “remember” those points. When those points come within a tolerance of the remembered pixel values, it strikes.

    Darkcobra was right on:

    difference = abs( (RemR – CurR) + (RemG – CurG) + (RemB – CurB) )

    I also scaled the image to about 32×24 as to reduce the affect of static (essentially just sampled). Oh, and turned off the automatic gain control of the camera.

    I agree this is a silly project, but come on, like anyone is cooking for their family with a CPU hotplate (which is awesome)

  8. ehhh… i give it an OK. i like the creativity and the urge to beat the system, but it seems like a lot of time for an otherwise dumb game. also, i usually look forward to hacks that are a bit more complex and sort of awe-inspiring :P

  9. looks very cool, and thers no way Id be able to setup something like that, but like some of the others above I find it kinda pointless, and it kinda also defeats the object of making games doesnt it? But I think you knew that it was pointless before you did it :)

  10. I’d agree that this application is rather pointless, but the technique itself is a good exercise which can be applied to something more useful. In fact, I’m going to be using it very soon.

    My favorite method of cooking a beef pot roast is as follows:

    1) Marinate roast for 24 hours.
    2) In a skillet over high heat, quickly brown each side of the roast in butter.
    3) Remove roast from skillet and set aside. Reduce heat, add some sliced onions and bell peppers, cook until softened.
    4) Add one cup of stock to deglaze pan. Put contents of skillet along with roast in an oven bag. Press out all air and tie off bag.
    5) Fill a crockpot 2/3 full of hot tap water. Place bag in crockpot, with the top of bag hanging out the side. Cover and cook at 147°F for 12 hours.

    The result is the best I’ve ever had – a deliciously seasoned, incredibly tender roast that’s nicely browned on the outside, yet cooked to a perfect medium on the inside…

    …at least when my crockpot cooperates. It’s hard to dial in exactly 147°F, so my results vary. I considered solving this with an industrial temperature controller (cheap on eBay), along with a thermocouple and relay. I could even make my own controller with a PIC, comparators, or whatever. Then I realized I could hack a more versatile solution, with zero wiring or soldering, using only what I already own: a kitchen remote digital thermometer, a webcam, and the X10 system already hooked to my computer.

    The crockpot is set to its highest setting. The thermometer probe goes in the crockpot. The remote display goes in front of the webcam. A program reads the temperature from the display by determining which LCD segments in the numbers are on/off, and turns on/off an X10 appliance module hooked to the crock-pot as necessary. Voila – an infinitely programmably crockpot, which will cook my roast (or anything else) perfectly.

    See? A useful application. :)

  11. I always wanted to do this with Final Fantasy X, the scene where you dodge lightning 100 times to get Lulu’s ultimate weapon. I can’t make it past like 4 or 5 usually, the control is so awkward. My plan was to do it with video input off an ATI card, since the image would be cleaner than a webcam, but you can’t do that on PSP. I gave up going for the ultimate weapon after realizing I had spent over 110 hours playing that game and I didn’t really care anymore. And as for the roast a few messages up, crock pot slow-coaking usually improves the flavor (flavour for our canadian friends) of food. I don’t know that it would be that much better for 2 days than the typical 8 hour crock-pot cooking time.

  12. Full details of how it was done should be a pre-requisite. Without any of that it’s just a way to brag about what you can make. Details on the webcam software, and how to make the PC interact with the motor/servo would have been really interesting.

  13. Hey, Im very curious about how you actually programmed this, I use Java as my programming language now, but would it be possible to do this on java, or what language/extensions(if any) did you need in order to do this? Please and thank you

  14. Great hack! Pointless, but it solves your problem of poor eye-brain-hand-coordination. :P Most definitely overkill, but I like it! I do have to agree with everyone else though- why use two laptops? My only guess is one laptop has serial and the other doesn’t… But why not just use that laptop by itself? Nevertheless, great setup.

  15. Yes, does anyone know of a standard way of getting the video output of a webcam available in the form of images that can be analyzed by a program?

    That digital thermometer reading would be awesome for ANY digital display. Add a few webcams to a science experiment with lots of digital displays and you could have a computer monitor the whole thing!

  16. Thanks for all the comments, two laptops because one had Flash (which I used to read the webcam), and the other had a parallel port. I used Flash/Actionscript to sense if it’s wood or not, and it sends a packet to the other laptop (over wifi) which is running a Java app that just flips on/off the parallel. Pointless? Yes. Girfriend I had at the time I built this? Left me. High Score? Oh yeah.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.