Code Monkey home page Code Monkey logo

Comments (13)

earlthesquirrel avatar earlthesquirrel commented on May 24, 2024

I have python 3.8.5 installed
And it's Ubuntu 20.04.2 LTS

Currently when I run I get the following errors:

I will use the bridge at 172.16.230.253
[ WARN:0] global /home/ubuntu/opencv/modules/videoio/src/cap_gstreamer.cpp (597) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
[ WARN:0] global /home/ubuntu/opencv/modules/videoio/src/cap_v4l.cpp (890) open VIDEOIO(V4L2:/dev/video0): can't open camera by index
Press return to stopException in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "./harmonize.py", line 237, in averageimage
coords[0] = ((coords[0])+1) * w//2 #Translates x value and resizes to video aspect ratio
NameError: name 'w' is not defined
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "./harmonize.py", line 320, in buffer_to_light
for i in rgb_bytes:
NameError: name 'rgb_bytes' is not defined

from harmonizeproject.

bradleydworak avatar bradleydworak commented on May 24, 2024

Hello,

Thanks for your comments, and my apologies for the late reply. It appears from your most recent post that the error lies not necessarily with improper installation, but rather the detection and/or ability to open a stream on dev/video0. This can happen for a number of reasons, most often not having a proper video signal present or something else running and already using the /dev/video0 designation. I've encountered such issues on my own despite having everything properly installed. One thing I want to update with the code is giving proper feedback when a video stream cannot be opened for whatever reason. Will look into this. Brad

from harmonizeproject.

earlthesquirrel avatar earlthesquirrel commented on May 24, 2024

Ok, so in your instructions could this possibly be because I tried Ubuntu on a Raspberry Pi vs. Raspbian? I was going to try loading Raspbian and following the instructions from there... Not sure if that might generate more info.

from harmonizeproject.

bradleydworak avatar bradleydworak commented on May 24, 2024

I've only worked with Ubuntu running on the R Pi 4, so not sure if Raspbian OS will shed any more light on the matter. First is to do a sanity check by running ls -ltrh /dev/video* and see if /dev/video0 is on the list. I plan to update the code to give feedback that /dev/video0 is actually available as opposed to just crashing.

from harmonizeproject.

earlthesquirrel avatar earlthesquirrel commented on May 24, 2024

Ok, so I’m in a position to restart. Have you tested from scratch recently? And can you point me towards the right SD card image to start with?

from harmonizeproject.

bradleydworak avatar bradleydworak commented on May 24, 2024

I tested it with Ubuntu Desktop 64-bit 20.04.2 in January of 2021. Since then, the Raspberri Pi installer only lists a Ubuntu Desktop option for the latest 64-bit OS version, currently, 21.04. That said, there is a decision to be made on which Ubuntu version OS to best support (ex. LTS vs latest desktop version). For now, I think a reasonable strategy is to stick to latest Ubuntu Desktop version if that is the only default option given with the installer. I've noticed some issues not recognizing /dev/video0 when the user is not logged into the console with a desktop open.

from harmonizeproject.

bradleydworak avatar bradleydworak commented on May 24, 2024

By the way ls -ltrh /dev/video* will provide a result that includes /dev/video0 when the OS properly detects a connected USB video card adapter.

from harmonizeproject.

earlthesquirrel avatar earlthesquirrel commented on May 24, 2024

Ok, will install Ubuntu Desktop tomorrow at latest. I have exact same HW as you listed, so I suspect it should work close to identically.

from harmonizeproject.

earlthesquirrel avatar earlthesquirrel commented on May 24, 2024

BTW I had tried 21.04 with first go around. From that installer.

from harmonizeproject.

bradleydworak avatar bradleydworak commented on May 24, 2024

Hi @earlthesquirrel , were you able to compile properly? I was going to close this issue if everything is ok now. Thanks, Brad

from harmonizeproject.

bradleydworak avatar bradleydworak commented on May 24, 2024

Will close this issue since the program has been tested and re-built on Ubuntu 22.04. If there is a build issue currently please open a new issue. Thanks!

from harmonizeproject.

earlthesquirrel avatar earlthesquirrel commented on May 24, 2024

Just FYI — the build never worked for me. I had identical hw as you listed, and prebuilt things never worked either. I finally found a reasonably price Hue Sync hub which solved things.

from harmonizeproject.

bradleydworak avatar bradleydworak commented on May 24, 2024

from harmonizeproject.

Related Issues (20)

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.