Coder Social home page Coder Social logo

echostorm / cvcamview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rferrazz/cvcamview

2.0 1.0 0.0 2.24 MB

QML plugin that displays a camera capture, it allow us to access every frame as an IplImage

Home Page: http://f24h.altervista.org

License: GNU Lesser General Public License v3.0

cvcamview's Introduction

CvCamView

A library to use opencv capture methods in QML applications, it emits a signal every time a new frame is queryed from the camera and it provides the frame as a native IplImage*

Features

You can change camera and resolution at runtime. The widget can be easily resized or expanded independently of the resolution You can access every frame as an IplImage* or as a QImage You can change camera state to one of the following: UnloadedState, LoadedState, ActiveState

UseCase

Here is an example of CvCamView in action (note that consumer is not provided):

import opencv.components 1.0

CvCamView {
    id: camView
    width: 800
    height: 600
    camera: 0
    cameraState: CvCamView.ActiveState //unneeded because this is the default state
    resolution: CvCamResolution {
                    width: 800
                    height: 600
                }
    onNewFrame: {
        console.log("new frame recived");
        consumer.detectSomething(iplWidth, iplHeight, iplData);
    }

the consumer can use the image in this way:

void consumer::detectSomething(int width, int height, QByteArray data){
    IplImage *image = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, 3);
    cvSetData(image, data.data(), width*3);
    ...
}

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.