Coder Social home page Coder Social logo

camtrapr's Introduction

camtrapr is designed to process photos from camera trapping projects into a form useful for further analysis in R. The functions are inspired by the Windows programs developed for the same purpose by the Small Wild Cat Conservation Foundation. So, users of these tools will easily be able to transition to camtrapr.

The motivation behind creating this package was a desire to have an open source, user friendly, cross platform tool (i.e. not Windows only) that allows for a seamless R camera trapping workflow.

Installation

install.packages("devtools")
devtools::install_github("mstrimas/camtrapr", build_vignettes = TRUE)
library(camtrapr)

Use

This package is designed to take a set of identified and organized camera trap photos in a directory structure like this:

camera-trap-photos/
├── logged
│   ├── cam001
│   │   ├── muntjac
│   │   │   └── 1
│   │   │       ├── IMG020.JPG
│   │   │       ├── IMG021.JPG
│   │   │       └── IMG022.JPG
│   │   ├── squirrel
│   │   │   └── 1
│   │   │       ├── IMG025.JPG
│   │   └── wild-boar
│   │       ├── 1
│   │       │   ├── IMG032.JPG
│   │       └── 2
│   │           ├── IMG049.JPG
│   └── cam002
│       ├── squirrel
│       │   └── 1
│       │       ├── IMG034.JPG
│       └── wild-boar
│           ├── 2
│           │   ├── IMG046.JPG
│           └── x
│               ├── IMG048.JPG
└── primary
    ├── cam003
    │   ├── ignore
    │   │   └── IMG001.JPG
    │   ├── muntjac
    │   │   └── 1
    │   │       ├── IMG004.JPG
    │   └── porcupine
    │       └── 1
    │           └── IMG008.JPG
    └── cam004
        ├── muntjac
        │   └── 1
        │       ├── IMG010.JPG
        ├── squirrel
        │   └── 2
        │       ├── IMG012.JPG
        └── wild-boar
            └── 1
                ├── IMG015.JPG

And produce a tidy data frame ready for analysis like this:

photo_path <- system.file("extdata", "example-photos", package = "camtrapr")
cam_data <- cam_process(photo_path, verbose = FALSE)
knitr::kable(head(cam_data, 5))
photo_path photo_file site camera species n datetime
logged/cam001/muntjac/1 IMG020.JPG logged cam001 muntjac 1 2014-06-14 07:36:50
logged/cam001/muntjac/1 IMG021.JPG logged cam001 muntjac 1 2014-06-14 07:36:54
logged/cam001/muntjac/1 IMG022.JPG logged cam001 muntjac 1 2014-07-06 21:07:23
logged/cam001/squirrel/1 IMG025.JPG logged cam001 squirrel 1 2014-06-02 18:43:13
logged/cam001/squirrel/1 IMG026.JPG logged cam001 squirrel 1 2014-06-25 14:21:32

For further details on the use of this package consult the vignette on GitHub or via:

browseVignettes('camtrapr')

camtrapr's People

Contributors

mstrimas avatar ccheng91 avatar

Stargazers

 avatar

Watchers

James Cloos avatar Mairin Deith avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.