Giter Site home page Giter Site logo

Comments (9)

IamSierraCharlie avatar IamSierraCharlie commented on July 28, 2024

Hi Joe,
Sorry for my delay in responding - that time of year I guess.
I made some inquiries into that very question with Contrastech. The short answer in no, it wont work with a Raspberry Pi. However, the Leo variant camera will - see here -> http://www.contrastech.com/en/productview/1122.html as an example. The great irony in all of this is that spec wise, these cameras look almost identical to the Mars variant, but the software / driver for the Mars variant only works with Linux - no ARM support; and I'd suggest that this decision is a financial one, but I can't be certain.

When I originally started with USB3Vision cameras, I couldn't find anything that worked in Python so I used a 3rd party driver from A&B Software. Here is the link - http://www.ab-soft.com/activeusb.php . Their ActiveUSB driver works on any camera that supports the USB3Vision standard. Here is a list of cameras it supports - http://www.ab-soft.com/usblist.php. You used to be able to trial for 30 days (I think) before it stopped working. It is a great piece of software, but is not cheap if you are working on your own with limited funds. Alas, I did buy it for a project and can attest that if you do not want to spend time with getting your camera to work with your own apps, this is a good way around that. I no longer use that software. I've moved into Linux full time for all of my USB3Vision projects. That said, you could use this API in Windows with some changes to its configuration although Windows was never the target of the API because I had a 3rd party driver for it.

Regards
Steve

from contrastech_python_api_for_linux_and_windows.

thejoemarsh avatar thejoemarsh commented on July 28, 2024

No worries - and thanks for the reply! Looks like sticking with Linux will be the best option for now out least.

A couple follow up questions after I went through the whole rigmarole of accidentally trying to use Ubuntu 20.04 and having to reinstall 16.04. Their support confirmed that 16.04 is the best version of Ubuntu to use with the camera, and they'll be updating to support kernel 5.11.0 in mid-March.

I'm running into a couple issues running the demo script in this repo. Here is the error log when I trace it back:

SystemExit         Traceback (most recent call last)
<ipython-input-6-a52621dfeb37> in <module>
----> 1 camera = linuxCamsApi.Camera(img_width, img_height, channels, debug=False)

~/Contrastech_Python_API_for_Linux/linuxCamsApi.py in __init__(self, img_width, img_height, img_channels, debug)
     32                 self.connectCallBackFuncEx = connectCallBackEx(self.device_link_notify)
     33                 self.frameCallbackFunc = callbackFunc(self.on_get_frame)
---> 34                 self.create_camera_instance()  # instantiated upon calling the camera Class
     35                 # offset_x, offset_y = self.check_image_dimension_validity(sensor_width, sensor_height, img_width, img_height)
     36 

~/Contrastech_Python_API_for_Linux/linuxCamsApi.py in create_camera_instance(self)
    316                                 self.dprint("Unable to connect to the camera - is it in use by another program?")
    317                                 self.dprint("PROGRAM WILL EXIT")
--> 318                                 sys.exit(-1)
    319                         else:
    320                                 with zipfile.ZipFile(zippedfilename, 'r') as zip_ref:

SystemExit: -1

And I get this warning when importing cv2:
WARNING: CPU random generator seem to be failing, disabling hardware random number generation WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff

I think the RDRND error is due to this issue (I have the same motherboard noted in the article) - but I'm unsure if this is actually causing an issue with the script. Regardless, I'm going to try it out on a different machine to see if it's causing an problem.

I also get these errors in the console when accessing the camera:
/proc/modules u3v_drv not exist
ioctl error(-1)

I can still access the camera in the iCentral GUI and grab pics/ vids there, but I can't seem to call it through the API.

Any help you might have is greatly appreciated!

from contrastech_python_api_for_linux_and_windows.

IamSierraCharlie avatar IamSierraCharlie commented on July 28, 2024

I use 20.04 in my current setup - all is fine; although I did run into some issues that I needed to address in order to get this working properly. I haven't updated this repo yet with fixes. Cant say I thought many if any looked at it :-)

Regarding the ioctl error and the u3v_drv not exist. That is normal and I see it as well - I've seen it many times and am of the impression its not an issue
Regarding the CPU random generator error you mention. I've not seen that before, but I use an Intel CPU. There some instruction sets I have that Intel has an AMD doesn't which allows speed-ups for some things I run. In actually fact I don't know if there is any truth in that statement for certain - its what I've read and as a result, I've stuck with Intel.....

Onto the most pressing issue. I'll take a look at it and report back. Watch this space...

from contrastech_python_api_for_linux_and_windows.

IamSierraCharlie avatar IamSierraCharlie commented on July 28, 2024

Okay - so the reason for the issue is that the driver files I'm referencing are old. The new version of iCentral has newer version so I changed the program to reference the newer ones found at /opt/iCentral/iCentral/lib/ (at least in my case) - should be line 18 in MVSDK.py.

I'll push the change through now - let me know if this addresses your issue

from contrastech_python_api_for_linux_and_windows.

IamSierraCharlie avatar IamSierraCharlie commented on July 28, 2024

Also, what camera are are you using? got a model?

from contrastech_python_api_for_linux_and_windows.

IamSierraCharlie avatar IamSierraCharlie commented on July 28, 2024

Also, this error:

~/Contrastech_Python_API_for_Linux/linuxCamsApi.py in create_camera_instance(self)
    316                                 self.dprint("Unable to connect to the camera - is it in use by another program?")
    317                                 self.dprint("PROGRAM WILL EXIT")
--> 318                                 sys.exit(-1)

this may be different from what I mention above. If you cannot get an instance of the camera, its typically because its in use. Check the light on the back of the camera. If its flashing, I'd unplug, replug and try again. I still recommend pulling the latest changes as I can confirm that all works with the latest changes where as it didnt prior due to the aforementioned reason.

from contrastech_python_api_for_linux_and_windows.

thejoemarsh avatar thejoemarsh commented on July 28, 2024

Oh sweet! I'll give the patch a try tonight and let you know how it goes. I'll pay attention if the camera is actually in use - if I recall it was sitting on the solid blue light (not in use).

On 20.04 - are you using the most up-to-date kernel? Or an older one? I know 5.0.0 is the highest version Contrastech acknowledges that they support.

And I'm using a Marsh 1300-210uc - the same one you were using ha.

Thanks again!

from contrastech_python_api_for_linux_and_windows.

IamSierraCharlie avatar IamSierraCharlie commented on July 28, 2024

This is from my machine:

uname -r
5.13.0-27-generic
cat /proc/version
Linux version 5.13.0-27-generic (buildd@lgw01-amd64-045) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022

If you have the same camera as I do, then rest assured we'll get it working ;-)

from contrastech_python_api_for_linux_and_windows.

IamSierraCharlie avatar IamSierraCharlie commented on July 28, 2024

Hi Joe,
Did you manage to get this working?
If so, I'll close this issue out
Steve

from contrastech_python_api_for_linux_and_windows.

Related Issues (9)

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.