Skip to content

Use (from the README) #8

@Atcold

Description

@Atcold

Just typing what is written in the main README file gives me the following

t7> require 'camera'
t7> camera.testme()
--------------------------------------------------
grabbing frames from your camera for about 10secs
initializing camera
camera initialized
Cleaned up camera.
stopping camera 
done: create your own frame grabber with image.Camera() 
--------------------------------------------------
t7> cam = image.Camera()
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
image.Camera

> usage:
image.Camera{
    [idx = number]                      -- camera index  [default = 0]
    [width = number]                    -- frame width  [default = 640]
    [height = number]                   -- frame height  [default = 480]
}

image.Camera{width=number, idx=number}
image.Camera(number, ...)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++:
{}
/usr/local/share/lua/5.1/xlua/init.lua:311: error
stack traceback:
        [C]: in function 'error'
        /usr/local/share/lua/5.1/xlua/init.lua:311: in function 'error'
        /usr/local/share/lua/5.1/xlua/init.lua:519: in function 'unpack'
        /usr/local/share/lua/5.1/camopencv/init.lua:17: in function '__init'
        /usr/local/share/lua/5.1/torch/init.lua:45: in function </usr/local/share/lua/5.1/torch/init.lua:41>
        [C]: in function 'Camera'
        [string "cam = image.Camera()"]:1: in main chunk
        [C]: at 0x010fb43d80

The 10 seconds test does work (even if the aspect ration is wrong), the frame grabber doesn't

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions