Git Product home page Git Product logo

cameraview-overlay-demos's Introduction

CameraView overlay demos

Some demos built around the overlay feature (preview + picture + video record) of @natario1's CameraView (https://github.com/natario1/CameraView) Android library.

FreeDrawing (link)

You can paint on the camera with your fingers, you can record a video as you are drawing and snap a picture of the masterpiece! Relies heavily on Android Draw.

I wrote a blog post explaining what's going on in more details, you can find the it here.

screenshot video picture

BasicWatermark (link)

Bare minimum camera overlay demo using CameraView:

  • full screen camera preview
  • little text as overlay that gets recorded
  • video recording button + preview
  • picture button + preview
  • front/back camera button

Other demos will build upon it.

Ideas for other demos

  • something w/ Tensorflow
  • something w/ OpenCV or dlib

cameraview-overlay-demos's People

Contributors

giacomoran avatar

Stargazers

Karun Shrestha avatar Menes SIMEU avatar Manish Patel avatar sejin avatar Daniel Larsen avatar LuC4s Bérgamo  avatar  avatar

Watchers

Daniel Larsen avatar LuC4s Bérgamo  avatar

cameraview-overlay-demos's Issues

Help with WaterMarks

im try to use this lib with cameraview to put drawables and move drag and rotate inside..

but i think cameraview block this.. the image stay in top left on the screen..and i can move

im try to use this lib ..
https://github.com/Mun0n/TurboImageProject

like u do with drawing

can u help me ?

`
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<com.otaliastudios.cameraview.CameraView
    android:id="@+id/camera"
    android:keepScreenOn="true"
    app:cameraAudio="off"
    android:layout_width="0dp"
    android:layout_height="0dp"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_drawOnPreview="true"
        app:layout_drawOnPictureSnapshot="true"
        app:layout_drawOnVideoSnapshot="true"
        >

        <com.munon.turboimageview.TurboImageView
            android:id="@+id/turboImageView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"

            />

    </RelativeLayout>
</com.otaliastudios.cameraview.CameraView>

<com.google.android.material.floatingactionbutton.FloatingActionButton
    android:id="@+id/fab_video"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:fabSize="normal"
    android:src="@drawable/ic_videocam_black_24dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    android:layout_marginBottom="16dp"
    android:layout_marginEnd="16dp"
    />

<com.google.android.material.floatingactionbutton.FloatingActionButton
    android:id="@+id/fab_picture"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:fabSize="mini"
    android:src="@drawable/ic_camera_alt_black_24dp"
    app:layout_constraintBottom_toBottomOf="@id/fab_video"
    app:layout_constraintTop_toTopOf="@id/fab_video"
    app:layout_constraintEnd_toStartOf="@id/fab_video"
    android:layout_marginEnd="16dp"
    />

<com.google.android.material.floatingactionbutton.FloatingActionButton
    android:id="@+id/fab_front"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:fabSize="mini"
    android:src="@drawable/ic_camera_front_black_24dp"
    app:layout_constraintBottom_toBottomOf="@id/fab_video"
    app:layout_constraintTop_toTopOf="@id/fab_video"
    app:layout_constraintEnd_toStartOf="@id/fab_picture"
    android:layout_marginEnd="16dp"
    />

</androidx.constraintlayout.widget.ConstraintLayout>`

aa

Rotate Camera

Can you set the camera preview picture/video do landscape? there is an additional setting?

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.