Skip to content

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

License

Notifications You must be signed in to change notification settings

echostorm/CvCamView

This branch is up to date with rferrazz/CvCamView:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Riccardo Ferrazzo
Jul 31, 2012
53983b5 · Jul 31, 2012

History

22 Commits
Mar 27, 2012
Mar 28, 2012
Mar 27, 2012
Apr 12, 2012
Jun 5, 2012
May 11, 2012
Apr 12, 2012
Apr 13, 2012
Mar 27, 2012
Jul 31, 2012
May 11, 2012
Mar 26, 2012

Repository files navigation

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);
    ...
}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published