Webcams displaying within Swift

36 views
Skip to first unread message

Juan-Carlos Idrobo

unread,
Mar 27, 2017, 11:11:54 AM3/27/17
to nion...@googlegroups.com
Hi All,

Quick open question. 
What python module is recommended to display the Webcams within Swift?
If there is also an example code, it will be greatly appreciated!

Thank you for your time and help.

Cheers,
Juan Carlos

--
======================================
Juan-Carlos Idrobo, Ph.D.

Staff Scientist at CNMS
http://cnms.ornl.gov

Mail address:
Oak Ridge National Laboratory
1 Bethel Valley Road
PO Box 2008
Oak Ridge, TN 37831-6030, USA

Telf: +1 (865) 574-5659 (office)
        +1 (312) 933-2350 (cell)
Fax: +1 (865) 574-6098 (office)
email: idro...@ornl.gov
======================================

Andreas Mittelberger

unread,
Mar 27, 2017, 12:00:41 PM3/27/17
to nion...@googlegroups.com

Hi Juan-Carlos,

I have a plugin published on github that should work with almost every webcam: https://github.com/Brow71189/SwiftCam

There is also some documentation in the repository which should explain how to install and use it. If you run into any problems I'll be happy to assist you.

Cheers,

Andreas

--
You received this message because you are subscribed to the Google Groups "Nion Swift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nionswift+...@googlegroups.com.
To post to this group, send email to nion...@googlegroups.com.
Visit this group at https://groups.google.com/group/nionswift.
For more options, visit https://groups.google.com/d/optout.

Juan-Carlos Idrobo

unread,
Mar 27, 2017, 2:19:03 PM3/27/17
to nion...@googlegroups.com
Thank you Andreas!

I downloaded the plugin, I changed the json file, copy the scripts in the respective location, downloaded the required modules (av & pillow).  I restarted Swift and I get the following errors.

Plug-in 'SwiftCam-master' NOT loaded.
Traceback (most recent call last):
  File "x64/Release3\nionswift\nion\swift\model\PlugInManager.py", line 44, in load_plug_in
  File "C:\NionApps\Miniconda43\envs\swift0.10\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "C:\Users\ASUser\AppData\Local\Nion\Swift\PlugIns\SwiftCam-master\__init__.py", line 31, in <module>
    from . import webcam
  File "C:\Users\ASUser\AppData\Local\Nion\Swift\PlugIns\SwiftCam-master\webcam.py", line 59, in <module>
    import_camera_supplies()
  File "C:\Users\ASUser\AppData\Local\Nion\Swift\PlugIns\SwiftCam-master\webcam.py", line 51, in import_camera_supplies
    mod = importlib.import_module('.' + camera_module, package='SwiftCam')
  File "C:\NionApps\Miniconda43\envs\swift0.10\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 973, in _gcd_import
  File "<frozen importlib._bootstrap>", line 923, in _sanity_check
SystemError: Parent module 'SwiftCam' not loaded, cannot perform relative import

 
Any help is appreciated! 

Cheers,
Juan Carlos

To unsubscribe from this group and stop receiving emails from it, send an email to nionswift+unsubscribe@googlegroups.com.

To post to this group, send email to nion...@googlegroups.com.
Visit this group at https://groups.google.com/group/nionswift.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Nion Swift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nionswift+unsubscribe@googlegroups.com.

To post to this group, send email to nion...@googlegroups.com.
Visit this group at https://groups.google.com/group/nionswift.
For more options, visit https://groups.google.com/d/optout.

Andreas Mittelberger

unread,
Mar 27, 2017, 2:51:07 PM3/27/17
to Juan-Carlos Idrobo, nion...@googlegroups.com

I think the problem is that your folder is called "SwiftCam-master". Can you try renaming it to "SwiftCam"?

To unsubscribe from this group and stop receiving emails from it, send an email to nionswift+...@googlegroups.com.

Juan-Carlos Idrobo

unread,
Mar 27, 2017, 3:05:18 PM3/27/17
to Andreas Mittelberger, nion...@googlegroups.com
That was the trick!

It works like a charm.

Thank you Andreas!

Cheers,
Juan Carlos


Andreas Mittelberger

unread,
Mar 27, 2017, 3:25:42 PM3/27/17
to Juan-Carlos Idrobo, nion...@googlegroups.com

Good to hear!

Reply all
Reply to author
Forward
0 new messages