Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[WaffleJS] KittyCam: Smile, you're on camera!

[WaffleJS] KittyCam: Smile, you're on camera!

This is my fun little project I did in my free time, called KittyCam - Raspberry camera with cat facial detection!

I used Raspberry Pi 2, with a camera module and PIR sensor to detect motion- so every time it detects motion, the software triggers the camera to take photos, then it does some image-processing-

If cats are detected in the image, the photo is sent to a cloud storage, at the same time, publishing the data, which is timestamp then the url, to PubNub data stream network. I also have a separated web page that subscribes the data that sent from Raspberry Pi, so that I can view the updated photos on website anywhere realtime.

Tomomi Imura

June 02, 2016
Tweet

More Decks by Tomomi Imura

Other Decks in Technology

Transcript

  1. @girlie_mac
    KittyCam
    Smile, you’re on camera!
    Tomomi Imura (@girlie_mac)

    View full-size slide

  2. @girlie_mac
    Tomomi (@girlie_mac) is a:
    ● Front-End Engineer
    ● Open Web + Tech Advocate
    ● N00b Hardware Hacker
    ● Sr. Developer Evangelist at
    PubNub

    View full-size slide

  3. @girlie_mac
    KittyCam
    Camera app w/a motion sensor & cat facial detection
    Hardware: Raspberry Pi, camera module, and PIR
    sensor
    Software: Node.js + Open-source goodies

    View full-size slide

  4. @girlie_mac
    1. Raspberry Pi 2
    (with WiFi
    adapter)
    2. 5MP Camera
    Board Module
    3. Pyroelectric
    Infrared (PIR)
    motion sensor
    4. Female/Female
    wires

    View full-size slide

  5. @girlie_mac
    kittyCam.js
    1. Detect motion
    2. Take photos
    3. Cat facial detection
    4. Store the photos
    5. Real-time view on web

    View full-size slide

  6. @girlie_mac
    kittyCam.js
    1. Detect motion (Johnny-Five IR.Motion obj)
    2. Take photos (Raspistill, command line tool)
    3. Cat facial detection (KittyDar)
    4. Store the photos in Cloudinary
    5. Publish the url data to PubNub network &
    subscribe them real-time to display on web

    View full-size slide

  7. @girlie_mac
    canvas
    catDetect.js
    app.js
    kittyDar
    Motion detected
    take a photo
    Store the photo if cats
    are detected
    display photos on
    web browsers real-
    time anywhere
    Johnny-Five
    w/ raspi-io
    child
    process
    Publish (the photo url)
    Subscribe

    View full-size slide

  8. @girlie_mac
    PIR Motion Sensor

    View full-size slide

  9. @girlie_mac
    Raspistill for Camera Module
    https://www.raspberrypi.org/documentation/usage/camera/raspicam/raspistill.md

    View full-size slide

  10. @girlie_mac
    PIR Sensor > Run Camera
    motion detected!
    Take a photo!

    View full-size slide

  11. @girlie_mac
    Processing Photo

    View full-size slide

  12. @girlie_mac
    QA Team
    Lead QA:
    Jamie
    Ginger Basil Alice Yugi
    Venom
    @kittenVenom

    View full-size slide

  13. @girlie_mac
    https://twit.tv/shows/new-screen-savers/episodes/19

    View full-size slide

  14. @girlie_mac
    github.com/girliemac/RPi-KittyCam

    View full-size slide

  15. @girlie_mac
    Thank you!
    @girlie_mac
    github.com/girliemac
    girliemac.com
    speakerdeck.com/girlie_mac
    Yes, I do feel pretty dumb using an underscore in
    my handle name in the first place...

    View full-size slide