Auto-mirror an image?

Discussion in 'Digital Cameras' started by Armando, Oct 25, 2004.

  1. Armando

    Armando Guest

    Hi all -

    First time poster here (for a great while anyway) - I've lurked and not seen
    this discussed, hope that lets me in...

    I had long ago heard that if you mirror an image of a person's face (two
    left or two right halves together), you can see two different
    "personalities" emerge. I tried it myself, and immediately realized that
    the "personalities" are due mainly to side-lighting, and maybe some facial
    asymmetries. With further playing, I started to get some pretty hilarious
    results, especially by putting the "fold line" off-center or skewed on the

    While I've gotten pretty adept at the mouse- and keystrokes required to whip
    one of these up quickly by now, I'd really like a way to do it "live", where
    I can actually view the image I'd get given where the camera is currently
    pointing. I'm not sure what kind of output the camera would need (my Sony
    DSC-S50 has a live TV out, but that's analog/raster/whatever and maybe not
    right). I assume the conversion device would have to be hardware as opposed
    to software, but I know nothing of what is out there.

    Can anyone give me some ideas as to what I'm probably going to need to look
    for to do this?

    Thanks one and all,

    Armando, Oct 25, 2004
    1. Advertisements

  2. Can't this be done without all the technology? Just use a mirror and take a
    photo of it.
    Gene Palmiter, Oct 25, 2004
    1. Advertisements

  3. If you're a programmer, this may be possible to do in essentially real
    time using current graphics cards. The idea would be to read in a
    video image and store it in memory every 1/30 second (obviously, you
    need a video card with video input). Then tell your graphics card to
    draw two rectangles, one filling the left half of the monitor and one
    the right half of the monitor. Use the current video image as a texture
    to texture-map the two rectangles. Now, by setting the (u,v) texture
    coordinates of each of the corners of the rectangles, you can determine
    exactly what pixels of the texture get mapped to the rectangles on the
    screen, so you can do the mirror-imaging easily - as well as
    magnification, rotation, and lots of other fun things. The texture
    mapping hardware of the graphics card will take care of all of the
    address calculations, image filtering, and so on.

    Dave Martindale, Oct 25, 2004
  4. Armando

    Armando Guest

    An obvious but low-tech solution, thanks. What I'm after is a seamless
    transition at the fold, and full quality on both sides. I imagine a kid's
    kaleidoscope with a folded sheet of metal as the mirror pair - looking in, I
    can easily see which section is the actual, and which sections are the
    reflections. Using a first-surface mirror would probably come close, but I
    don't want a klunky (and fragile) apparatus on the camera. I don't mind
    doing some coding if necessary, or spending a bit on hardware (both of which
    might let me create additional effects as I play), but I don't think the
    answer is optical.

    Thanks for the reply, sometimes the obvious IS the right answer but gets
    overlooked, so it never hurts to suggest it.

    Armando, Oct 25, 2004
  5. Armando

    Armando Guest

    Dave -

    I can't remember if it's top- or bottom-posting that pisses people off, so I
    won't include your reply...

    This is getting closer to what I think I'll need to do. I don't mind the
    programming, it might be a challenge but then I'd be learning something new,
    which is never bad (especially since I'm out of hi-tech for a bit too long

    Your solution sounds feasible, but I suspect the video out from the camera
    is lots lower resolution than what the CCD can deliver - is there another
    way (or another type of camera) that will give me VGA (or hopefully better,
    up to say 1600x1200) output in real time? How would that get into the PC in
    a way I can grab it?

    Thanks again for your thoughts!

    Armando, Oct 25, 2004
  6. Video out from a digicam may or may not be full video resolution, but
    video output from a good video camera or camcorder should be equivalent
    to 640x480 pixels at 30 FPS (higher res, lower frame rate in the case of
    PAL). Standard graphics boards with video in will handle this.

    If you really need higher resolution, you'll need a HDTV video camera
    and special video input hardware.

    There are digital still cameras that will give you megapixel images
    under control of a computer, but you're now talking about seconds per
    single image, not 30 images per second.

    Dave Martindale, Oct 26, 2004
  7. Armando

    Armando Guest


    Thanks again for the return info. All I really want in "real time" is the
    ability to see what the camera is pointed at, with the mirror (or other neat
    effect) applied. That can easily afford to be less than 30 FPS, since all I
    need to do is compose and then grab a frame when I like it.

    We can take this to email if it starts to have less interest to other
    armando_odie (at) att (dot) net

    Armando, Oct 26, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.