Camera overlays

Discussion in 'iOS Programming' started by larswik, Jul 6, 2012.

  1. larswik macrumors 68000

    Joined:
    Sep 8, 2006
    #1
    Can someone push me to the correct docs to read for this? I am getting ready to make some new additions to my tourist app for the Danish town I live in. I thought it would be fun to add a camera feature that would overlay a photo of a Viking helmet. Then you line up your subject under it and snap a photo.

    I have not worked with the camera object before and then trying to combined the photo taken with an overlay and saving to the photo album.

    I assume this is possible so I thought about reading some doc's on the subject starting with the camera. But if anyone has a better idea for me to start researching to save some time looking around I would be thankful.
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    Start with UIImagePickerController.h and cameraOverlayView. Your helmet image will have to be partly transparent. Use an imageView as your overlay view, with the transparent helmet image.

    Compositing on the camera and compositing on the resulting image are different. To generate the resulting image draw the camera image into an image context then draw the overlay image into the image context. Save the image from the context as a jpeg.
     
  3. larswik thread starter macrumors 68000

    Joined:
    Sep 8, 2006
    #3
    Ahhh, thanks for detailing that out for me. Now I have a plan of attack for this project this weekend. It's always fun learning new things!
     
  4. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #4
    Lars,

    A collegue of me made a blog post about something like that, but instead putting a moustache on the users face on a live stream.

    Face detection with Core Image on live stream

    I'm also thinking of writing an app like that for normal images because i've done that last week, so if you want that, let me know, i can help with that.
     
  5. larswik thread starter macrumors 68000

    Joined:
    Sep 8, 2006
    #5
    Thanks Jnoxx, I think I want to try and tackle this project myself so I can learn the tools and be a better programmer. But I am sure I will have questions. I thought it would be a fun addition to the app for tourists here as well as a nice challenge for myself.

    As I run into problems I will let you guys know!

    Thanks!
     
  6. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #6
    sure, im always here for help :)
    for adding it to a still photo is alot easier though ;)
     
  7. larswik thread starter macrumors 68000

    Joined:
    Sep 8, 2006
    #7
    Good to know. This site has been a great resource for me for my projects and learning.
     

Share This Page