Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbound Local Error #3

Open
sunnymiss opened this issue Mar 26, 2017 · 8 comments
Open

Unbound Local Error #3

sunnymiss opened this issue Mar 26, 2017 · 8 comments

Comments

@sunnymiss
Copy link

Tried the 0.2 version of the script and seem to be getting further than before -- however, now I'm getting this:

(cv) pi@raspberrypi:~ $ python2.7 rpotter.py
Initializing point tracking
START switch_pin ON for pre-video test
finding...
START incendio_pin ON and set switch off if video is running
Tracking Error: <type 'exceptions.UnboundLocalError'>
Tracking Error: <type 'exceptions.UnboundLocalError'>
Tracking Error: <type 'exceptions.UnboundLocalError'>
Tracking Error: <type 'exceptions.UnboundLocalError'>
Tracking Error: <type 'exceptions.UnboundLocalError'>

This will repeat until CTRL+C.

@pseddon
Copy link

pseddon commented Mar 26, 2017

Hi I have exactly the same issue using ver 0.2 of rpotter.py.

I also get amongst the Tracking errors:
libv4l2 error dequeuing buf: Resource temporarily unavailable

Hope someone can help,

Peter

@sunnymiss
Copy link
Author

I did also get the dequeueing error above ... once. I don't get it every time.

Thanks,
Sunny

@pseddon
Copy link

pseddon commented Mar 29, 2017

I traced the problem to line 235 in rpotter.py
print "Tracking Error: %s" % e

and have commented the line out. I still get dequeuing errors but the system does seem to work when an IR source is moved in front of the camera as it is tracked and leftrightupdown gestures detected.

Peter

@sunnymiss
Copy link
Author

sunnymiss commented Mar 31, 2017 via email

@sunnymiss
Copy link
Author

sunnymiss commented Mar 31, 2017 via email

@pseddon
Copy link

pseddon commented Apr 1, 2017

Can't understand why you are seeing the cat! Have you put a piece of exposed film negative or similar in front of the camera to filter out visible light?

I am having trouble using reflected IR light but direct IR from the LED works and the system picks it up and tracks it encircling the IR spot with a red circle. I have just borrowed an HP wand so will see if it works with reflected ir light. Can't help you with the photon as I am not using one.

Peter

@sunnymiss
Copy link
Author

sunnymiss commented Apr 1, 2017 via email

@pseddon
Copy link

pseddon commented Apr 2, 2017

The IR LED's are very directional (about 10deg beam width) so I am now looking at an array of LEDS (or IR Illuminator as used on security cameras) to get better illumination over a wider area and brighter. The HP wand does reflect IR but with only a single LED illuminating the orientation is very critical and the brightness quite low.

I am just using the output from the Pi to drive other circuitry.

Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants