Giter Club home page Giter Club logo

smartgaze's Introduction

SmartGaze

A work in progress open source gaze tracking implementation, initially target at being a more robust and flexible tracking driver for the Eye Tribe Tracker. Based on my efforts in reverse engineering the Eye Tribe tracker.

##Building

CMake is required to build SmartGaze. You will also need the libuvc library for camera feed capture and OpenCV and Halide installed for image processing.

###OSX or Linux with Make

# do things in the build directory so that we don't clog up the main directory
mkdir build
cd build
cmake ../
make
./bin/eyeLike # the executable file

###On OSX with XCode

# Install dependencies
brew install libuvc
# I use brew install libuvc --HEAD but that shouldn't be necessary

brew tap homebrew/science
brew install homebrew/science/opencv

brew tap halide/homebrew-halide
brew install halide/halide/halide

mkdir build
./cmakeBuild.sh

then open the XCode project in the build folder and run from there.

###On Windows There is some way to use CMake on Windows but I am not familiar with it.

License

This software is licensed under the GPLv2 (see the LICENSE file). The reason I didn't choose a permissive license is that I wrote this software specifically because I was dissapointed by the inflexibility and poor performance of closed source eye tracking software. Supposing that I succeed in making a higher quality eye tracking implementation than proprietary software, I don't want any eye tracking companies to be able to use this software without also making any modifications to it open source.

SmartGaze is also a program not a library so I gain no adoption benefits by allowing linking to proprietary code.

The first couple commits of camera capture code before I wrote any computer vision were released under the MIT licence though.

smartgaze's People

Contributors

trishume avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

smartgaze's Issues

Problem building SmartGaze.

Hello,

I installed everything and I did not have any issue until I tried to build SmartGaze. The error is the following:

image

Does this problem come from Halide (SmartGaze cannot find Halide) or it is a simple syntax error?

Thank you so much in advance.

Problems compiling (OSX, latest Halide release)

I've tried to build the SmartGaze on OS-X after having installed halide with brew.

I get compile errors as follows:

.../src/SmartGaze/src/halideFuncs.cpp:81:15: error: cannot refer to class template 'Buffer' without a template argument list
inParam.set(Buffer(UInt(m.elemSize()*8), m.cols, m.rows, 0, 0, m.ptr()));
^
/usr/local/include/Halide.h:1594:48: note: template is declared here
template<typename T2, int D2> friend class Buffer;
^
/Users/pgba/src/SmartGaze/src/halideFuncs.cpp:84:37: error: expected parameter declarator
Image<uint8_t> output(Buffer(UInt(8), out.cols, out.rows, 0, 0, out.ptr()));
...

Looks like the Buffer type change into a template instead in the latest release of Halide?

Any recommendations as to the quickest path forwards?

problem with image dimensions

hi, i'm studing your code and if i use an image with different dimension (part of original image) i have problem Output buffer f2 is accessed at -11, which is before the min (0) in dimension 0
what is the problem? i think that is a problem of halide. it is possible to solve it?

problem build

i have a project smartgaze at https://github.com/trishume/SmartGaze and i have installed all libs.
i have used this command for install halide
cd llvm3.7
mkdir build
cd build
cmake -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_TARGETS_TO_BUILD="X86;ARM;NVPTX;AArch64;Mips;PowerPC" -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release ..
make

in halide dir:
export LLVM_CONFIG=../llvm3.7/build/bin/llvm-config
export CLANG=../llvm3.7//build/bin/clang

mkdir cmake_build
cd cmake_build
export LLVM_ROOT=/path/to/llvm3.7/build
cmake -DLLVM_BIN=${LLVM_ROOT}/bin -DLLVM_INCLUDE="${LLVM_ROOT}/../include;${LLVM_ROOT}/include" -DLLVM_LIB=${LLVM_ROOT}/lib -DLLVM_VERSION=37 ..
make

and for build smartgaze project in it's folder:
mkdir build
cd build
cmake ../

but i have cmake error:
the following variable are used in this project, but they are set to NOTFOUND LIBHALIDE_INCLUDE_DIR used as include directory in directory /home/osboxes/SmartGaze-master/src
LIBHALIDE_LiBRARY linked by target "SmartGaze" in directory /home/osboxes/SmartGaze-master/src

the build of halide is ok and it is in separate folder of llvm3.7. i have osboxes/Halide, osboxes/llvm3.7 osboxes/SmartGaze-master, is it wrong?
help me please

i have builded the simplest version of smartgaze on virtualBox kubuntu but the the program print uvc_open: access denied why?

SmartGaze fails to control the eyetribe on OS X

I am using OS X 10.11 on a 15" Macbook Pro late 2013. I have compiled eyetribe using the instructions in README.md:

OSX or Linux with Make

The executable is bin/SmartGaze, not bib/eyeLike

I have connected the eyetribe to the USB3 port, then run bin/SmartGaze:

wifi-staff-172-24-60-96:bin abc$ ./SmartGaze
UVC initialized
Device found
Device opened
DEVICE CONFIGURATION (29ab:00fb/0000000001) ---
Status: idle
VideoControl:
bcdUVC: 0x0100
VideoStreaming(1):
bEndpointAddress: 131
Formats:
UncompressedFormat(1)
bits per pixel: 16
GUID: 5955593200001000800000aa00389b71
default frame: 1
aspect ration: 16x9
interlace flags: 00
copy protect: 00
FrameDescriptor(1)
capabilities: 03
size: 1152x1536
bit rate: 35389440-35389440
max frame size: 7077888
default interval: 1/27
interval[0]: 1/27
FrameDescriptor(2)
capabilities: 03
size: 1036x1536
bit rate: 95477760-95477760
max frame size: 3182592
default interval: 1/30
interval[0]: 1/30
FrameDescriptor(3)
capabilities: 03
size: 768x1024
bit rate: 94371840-94371840
max frame size: 1572864
default interval: 1/60
interval[0]: 1/60
FrameDescriptor(4)
capabilities: 03
size: 768x1536
bit rate: 99090432-99090432
max frame size: 2359296
default interval: 1/42
interval[0]: 1/42
FrameDescriptor(5)
capabilities: 03
size: 2304x1536
bit rate: 191102976-191102976
max frame size: 7077888
default interval: 1/42
interval[0]: 1/27
FrameDescriptor(6)
capabilities: 03
size: 2072x1536
bit rate: 190955520-190955520
max frame size: 6365184
default interval: 1/27
interval[0]: 1/30
FrameDescriptor(7)
capabilities: 03
size: 1536x1024
bit rate: 188743680-188743680
max frame size: 3145728
default interval: 1/30
interval[0]: 1/60
FrameDescriptor(8)
capabilities: 03
size: 1536x1536
bit rate: 198180864-198180864
max frame size: 4718592
default interval: 1/60
interval[0]: 1/42
END DEVICE CONFIGURATION
bmHint: 0000
bFormatIndex: 1
bFrameIndex: 7
dwFrameInterval: 166666
wKeyFrameRate: 0
wPFrameRate: 0
wCompQuality: 0
wCompWindowSize: 0
wDelay: 0
dwMaxVideoFrameSize: 10077696
dwMaxPayloadTransferSize: 49152
bInterfaceNumber: 1
Streaming...

However, the software fails to turn on the LEDs on the eyeTribe, and how can I see the camera output, or gaze prediction coordinates?

I am pretty sure that the OS sees the EyeTribe, as the EyeTribe is reported:

$ ioreg -p IOUSB -w0 -l
........
|
+-o TheEyeTribe@14500000 <class AppleUSBDevice, id 0x1000699f2, registered, matched, active, busy 0 (43 ms), retain 19>
{
"sessionID" = 2785672002857998
"iManufacturer" = 1
"bNumConfigurations" = 1
"idProduct" = 251
"bcdDevice" = 0
"Bus Power Available" = 900
"USB Address" = 9
"bMaxPacketSize0" = 9
"iProduct" = 2
"iSerialNumber" = 3
"bDeviceClass" = 239
"Built-In" = No
"locationID" = 340787200
"bDeviceSubClass" = 2
"bcdUSB" = 768
"USB Product Name" = "TheEyeTribe"
"PortNum" = 5
"non-removable" = "no"
"IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
"bDeviceProtocol" = 1
"IOUserClientClass" = "IOUSBDeviceUserClientV2"
"IOPowerManagement" = {"DevicePowerState"=0,"CurrentPowerState"=3,"CapabilityFlags"=65536,"MaxPowerState"=4,"DriverPowerState"=3}
"Device Speed" = 3
"USB Vendor Name" = "Leopard Imaging"
"idVendor" = 10667
"IOGeneralInterest" = "IOCommand is not serializable"
"USB Serial Number" = "0000000001"
"IOClassNameOverride" = "IOUSBDevice"
}

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.