Comments (9)
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.
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.
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.
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.
Also, what camera are are you using? got a model?
from contrastech_python_api_for_linux_and_windows.
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.
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.
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.
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)
- General questions about project HOT 6
- Principals around camera commands HOT 1
- How to capture the Live feed from mars2000 150u area scan cams in WINDOWS. HOT 3
- Windows - software trigger fails HOT 1
- Windows_error HOT 2
- Contrastech Mars2000_150u camera getting weird images/frames HOT 1
- Multiple camera connection Failed HOT 13
- General questions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contrastech_python_api_for_linux_and_windows.