clementfarabet / lua---camera Goto Github PK
View Code? Open in Web Editor NEWA very simple camera interface (frame grabber) for Torch7.
A very simple camera interface (frame grabber) for Torch7.
DEPENDENCIES: MacOS: Install OpenCV 2.X: http://opencv.willowgarage.com/ Linux: None All: Torch7 (follow instructions here: www.torch.ch) INSTALL: $ luarocks install camera STATE: MacOS: working on all MacOS builds, using OpenCV (wrapper from Jordan Bates) Linux: working all right, using raw video4linux2 (wrapper from Clement Farabet) USE: $ torch > require 'camera' > camera.testme() -- a simple grabber+display > cam = image.Camera() -- create the camera grabber > frame = cam:forward() -- return the next frame available > cam:stop() -- release the camera > image.display(frame) -- display frame
This package does not compile anymore on Sierra as Apple has removed QTKit (see this issue from OpenCV for more info). OpenCV solved this by porting their code to use AVFoundation instead, but I have no experience with this so I'm just reporting this without a PR (sorry!).
I try to do luarocks install camera in mac os, I get this error in 75%:
Scanning dependencies of target camopencv
[ 25%] Building C object opencv/CMakeFiles/camopencv.dir/opencv.c.o
[ 50%] Linking CXX shared module libcamopencv.so
[ 50%] Built target camopencv
Scanning dependencies of target cammacos
[ 75%] Building C object macos/CMakeFiles/cammacos.dir/camera.m.o
In file included from /tmp/luarocks_camera-1.1-0-3034/lua---camera/macos/camera.m:25:
/tmp/luarocks_camera-1.1-0-3034/lua---camera/macos/camera.h:6:9: fatal error:
'QTKit/QTKit.h' file not found
#import <QTKit/QTKit.h>
^
1 error generated.
make[2]: *** [macos/CMakeFiles/cammacos.dir/camera.m.o] Error 1
make[1]: *** [macos/CMakeFiles/cammacos.dir/all] Error 2
make: *** [all] Error 2Error: Build error: Failed building.]
I have opencv 2.4.13.1 installed.
Do someone know how to solve this problem?
Thank you.
Pierre
my step is below:
$ qula
> require 'camera'
> camera.testme()
-------------------------------------------------
grabbing frames from your camera for about 10secs
Initializing device: /dev/video0
FPS wanted 1
Using 1 buffers
camera[0] started : 1
stopping camera
done: create your own frame grabber with image.Camera()
--------------------------------------------------
> cam=image.Camera()
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ImageSource
> usage:
ImageSource{
[idx = number] -- camera index [default = 0]
[width = number] -- width [default = 640]
[height = number] -- height [default = 480]
[buffers = number] -- number of buffers (v4l2 only) [default = 1]
[fps = number] -- optional frame rate (v4l2 only) [default = 1]
}
ImageSource{width=number, idx=number}
ImageSource(number, ...)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...ome/lab513/torch/install/share/lua/5.1/xlua/init.lua:321: error
stack traceback:
[C]: in function 'error'
...ome/lab513/torch/install/share/lua/5.1/xlua/init.lua:321: in function 'error'
...ome/lab513/torch/install/share/lua/5.1/xlua/init.lua:544: in function 'unpack'
...home/lab513/torch/install/share/lua/5.1/v4l/init.lua:17: in function '__init'
...me/lab513/torch/install/share/lua/5.1/torch/init.lua:91: in function <...me/lab513/torch/install/share/lua/5.1/torch/init.lua:87>
[C]: in function 'Camera'
[string "cam=image.Camera()"]:1: in main chunk
[C]: ?
I can grab frames from my camera for about 10secs. But when I use "cam=image.Camera()", I got some error. Did someone get the same error? Thanks.
@clementfarabet Would you please hlep me? Thank you very much.
[100%] Building CXX object macos/CMakeFiles/cammacos.dir/camera.m.o
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:120:0,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:75:24: error: expected identifier or '(' before '^' token
/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:78:1: error: expected identifier before 'end'
In file included from /System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:9:0,
from /System/Library/Frameworks/AppKit.framework/Headers/NSView.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/NSText.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:10,
from /System/Library/Frameworks/AppKit.framework/Headers/NSActionCell.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:15,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:403:178: error: expected ')' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:403:180: error: expected ')' before '(' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:17:0,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20:34: error: expected ')' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20:36: error: expected ')' before '(' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20:99: error: expected ')' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20:101: error: expected ')' before '(' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:54:0,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/AppKit.framework/Headers/NSDraggingItem.h:52:15: error: expected identifier or '(' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSDraggingItem.h:53:5: error: expected ';' before 'NSInteger'
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:73:0,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:168:247: error: expected ')' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:168:249: error: expected ')' before '(' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:194:0,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119:116: error: expected ')' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119:118: error: expected ')' before '(' token
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function '-[ImageSnap snapshot]':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:168:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:174:18: error: '-fobjc-exceptions' is required to enable Objective-C exception syntax
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function '-[ImageSnap stopSession]':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:201:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:205:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:207:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:209:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:212:7: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:215:7: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function '-[ImageSnap startSession:withWidth:withHeight:]':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:237:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:240:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:254:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:260:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:262:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:272:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:274:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:285:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:295:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:308:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:315:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:318:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function '-[ImageSnap captureOutput:didOutputVideoFrame:withSampleBuffer:fromConnection:]':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:331:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:333:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function 'initCameras':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:423:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:427:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function 'grabFrames':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:446:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:448:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function 'luaopen_libcammacos':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:506:3: warning: implicit declaration of function 'luaL_openlib' [-Wimplicit-function-declaration]
make[2]: *** [macos/CMakeFiles/cammacos.dir/camera.m.o] Error 1
make[1]: *** [macos/CMakeFiles/cammacos.dir/all] Error 2
make: *** [all] Error 2
[ 33%] Built documentation
[ 33%] Built target documentation-dok
[ 66%] Built target camopencv
[100%] Building CXX object macos/CMakeFiles/cammacos.dir/camera.m.o
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:120:0,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:75:24: error: expected identifier or '(' before '^' token
/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:78:1: error: expected identifier before 'end'
In file included from /System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:9:0,
from /System/Library/Frameworks/AppKit.framework/Headers/NSView.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/NSText.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:10,
from /System/Library/Frameworks/AppKit.framework/Headers/NSActionCell.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:15,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:403:178: error: expected ')' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:403:180: error: expected ')' before '(' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:17:0,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20:34: error: expected ')' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20:36: error: expected ')' before '(' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20:99: error: expected ')' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20:101: error: expected ')' before '(' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:54:0,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/AppKit.framework/Headers/NSDraggingItem.h:52:15: error: expected identifier or '(' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSDraggingItem.h:53:5: error: expected ';' before 'NSInteger'
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:73:0,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:168:247: error: expected ')' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:168:249: error: expected ')' before '(' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:194:0,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.h:5,
from /Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:25:
/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119:116: error: expected ')' before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119:118: error: expected ')' before '(' token
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function '-[ImageSnap snapshot]':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:168:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:174:18: error: '-fobjc-exceptions' is required to enable Objective-C exception syntax
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function '-[ImageSnap stopSession]':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:201:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:205:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:207:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:209:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:212:7: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:215:7: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function '-[ImageSnap startSession:withWidth:withHeight:]':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:237:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:240:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:254:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:260:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:262:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:272:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:274:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:285:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:295:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:308:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:315:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:318:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function '-[ImageSnap captureOutput:didOutputVideoFrame:withSampleBuffer:fromConnection:]':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:331:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:333:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function 'initCameras':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:423:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:427:3: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function 'grabFrames':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:446:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:448:5: warning: value computed is not used [-Wunused-value]
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m: In function 'luaopen_libcammacos':
/Users/eugenioculurciello/.torch/torch-pkg/camera/macos/camera.m:506:3: warning: implicit declaration of function 'luaL_openlib' [-Wimplicit-function-declaration]
make[2]: *** [macos/CMakeFiles/cammacos.dir/camera.m.o] Error 1
make[1]: *** [macos/CMakeFiles/cammacos.dir/all] Error 2
make: *** [all] Error 2
I tried to install camera with luarocks install camera on ubuntu 15.10 but got the following error
karan@karan-ThinkPad-L412:~$ luarocks install camera
Installing https://raw.githubusercontent.com/torch/rocks/master/camera-1.1-0.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/camera-1.1-0.rockspec... switching to 'build' mode
Cloning into 'lua---camera'...
remote: Counting objects: 29, done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 29 (delta 3), reused 14 (delta 0), pack-reused 0
Receiving objects: 100% (29/29), 18.57 KiB | 0 bytes/s, done.
Resolving deltas: 100% (3/3), done.
Checking connectivity... done.
cmake -E make_directory build;
cd build;
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/karan/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/karan/torch/install/lib/luarocks/rocks/camera/1.1-0";
make
-- The C compiler identification is GNU 5.2.1
-- The CXX compiler identification is GNU 5.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /home/karan/torch/install
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- OpenMP Found with compiler flag : -fopenmp
CMake Warning at video4linux/CMakeLists.txt:13 (FIND_PACKAGE):
By not providing "FindARM.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "ARM", but
CMake did not find one.
Could not find a package configuration file provided by "ARM" with any of
the following names:
ARMConfig.cmake
arm-config.cmake
Add the installation prefix of "ARM" to CMAKE_PREFIX_PATH or set "ARM_DIR"
to a directory containing one of the above files. If "ARM" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_camera-1.1-0-1500/lua---camera/build
Scanning dependencies of target camopencv
[ 25%] Building C object opencv/CMakeFiles/camopencv.dir/opencv.c.o
/tmp/luarocks_camera-1.1-0-1500/lua---camera/opencv/opencv.c:29:16: fatal error: cv.h: No such file or directory
compilation terminated.
opencv/CMakeFiles/camopencv.dir/build.make:54: recipe for target 'opencv/CMakeFiles/camopencv.dir/opencv.c.o' failed
make[2]: *** [opencv/CMakeFiles/camopencv.dir/opencv.c.o] Error 1
CMakeFiles/Makefile2:77: recipe for target 'opencv/CMakeFiles/camopencv.dir/all' failed
make[1]: *** [opencv/CMakeFiles/camopencv.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
Error: Build error: Failed building.
fixed with:
PROBLEM: Oct 2012: camera package does not install with compiler: /usr/local/gfortran/bin/gcc
Solution: remove links to gfortran:
export CC=
export CXX=
echo $CCX should return nothing
then you can install fine
I am trying to use lua---camera with a Minoru 3D webcam. On Linux (Ubuntu 12.04) no problem; on Mac I get
failed OpenCV test capture: Operation timed out
when I try to access to the second cam.
What about releasing a new tag, since the recent bug fixes and enhancements?
camera.testme()
runs 1-2 frames, then crashes
I came across this issue
camera/opencv/opencv.c:135:30: error: array type has incomplete element type ‘struct luaL_reg’
which is recommended to modify as the subject by:
http://stackoverflow.com/questions/9458042/array-element-has-incomplete-type
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
I get the following error when running luarocks install camera
:
[100%] Building C object video4linux/CMakeFiles/v4l.dir/v4l.c.o
/tmp/luarocks_camera-1.1-0-8939/lua---camera/video4linux/v4l.c:644:30: error: array type has incomplete element type
static const struct luaL_reg v4l [] = {
^
make[2]: *** [video4linux/CMakeFiles/v4l.dir/v4l.c.o] Error 1
With a quick look it seems that this problem is due to Lua 5.2 missing luaL_reg
.
Torch 7.0 Copyright (C) 2001-2011 Idiap, NEC Labs, NYU
Lua 5.1 Copyright (C) 1994-2008 Lua.org, PUC-Rio
t7> require 'libcamopencv'
t7> =libcamopencv.initCam(0, 640, 480)
initializing camera
camera initialized
0
t7> ima = torch.Tensor()
t7> libcamopencv.grabFrame(0, ima)
CRASH!!!!!
I was tring to run require 'camera'
to test it, only to find camopencv
has not been installed. Is there any problem of my operation or where should I get this package?
Here's the details:
th> require 'camera'
/Users/Meirtz/torch/install/share/lua/5.1/trepl/init.lua:384: ...s/Meirtz/torch/install/share/lua/5.1/luarocks/loader.lua:154: Invalid data in manifest file for module camopencv (invalid data for camera 1.1-0)
warning: <camopencv> could not be loaded (is it installed?)
/Users/Meirtz/torch/install/share/lua/5.1/trepl/init.lua:384: /Users/Meirtz/torch/install/share/lua/5.1/xlua/init.lua:321: failed to load camopencv wrapper: verify that camopencv is installed
stack traceback:
[C]: in function 'error'
/Users/Meirtz/torch/install/share/lua/5.1/trepl/init.lua:384: in function 'require'
[string "_RESULT={require 'camera'}"]:1: in main chunk
[C]: in function 'xpcall'
/Users/Meirtz/torch/install/share/lua/5.1/trepl/init.lua:651: in function 'repl'
...irtz/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
[C]: at 0x0106258bd0
[0.0096s]
Any reply I will appreciate it
Anytime I try to do luarocks install camera
, I get this following error:
Scanning dependencies of target camopencv
[ 25%] Building C object opencv/CMakeFiles/camopencv.dir/opencv.c.o
/tmp/luarocks_camera-1.1-0-18/lua---camera/opencv/opencv.c:29:16: fatal error: cv.h: No such file or directory
#include <cv.h>
^
compilation terminated.
make[2]: *** [opencv/CMakeFiles/camopencv.dir/opencv.c.o] Error 1
make[1]: *** [opencv/CMakeFiles/camopencv.dir/all] Error 2
make: *** [all] Error 2
Error: Build error: Failed building.
I also have opencv 3.0.0 installed on Ubuntu 14.04 LTS.
Encountered below message during installation. Please help!!!
CMake Warning at video4linux/CMakeLists.txt:13 (FIND_PACKAGE):
By not providing "FindARM.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "ARM", but
CMake did not find one.
Could not find a package configuration file provided by "ARM" with any of
the following names:
ARMConfig.cmake
arm-config.cmake
Add the installation prefix of "ARM" to CMAKE_PREFIX_PATH or set "ARM_DIR"
to a directory containing one of the above files. If "ARM" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_camera-1.1-0-2868/lua---camera/build
Scanning dependencies of target camopencv
[ 50%] Building C object opencv/CMakeFiles/camopencv.dir/opencv.c.o
/tmp/luarocks_camera-1.1-0-2868/lua---camera/opencv/opencv.c:29:16: fatal error: cv.h: No such file or directory
#include <cv.h>
^
compilation terminated.
make[2]: *** [opencv/CMakeFiles/camopencv.dir/opencv.c.o] Error 1
make[1]: *** [opencv/CMakeFiles/camopencv.dir/all] Error 2
make: *** [all] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.