{ "info": { "author": "Peter Johnson", "author_email": "robotpy@googlegroups.com", "bugtrack_url": null, "classifiers": [], "description": "********************************************\n Python Wrappers for NI Vision (nivision)\n********************************************\n\n:Author: Peter Johnson, FRC Team 294\n:Copyright: Copyright |copy| 2012 Peter Johnson\n\nAbout\n=======\n\n`NI Vision`_ is a `National Instruments`_ image/vision processing library.\nIt is available for multiple platforms including Windows and the\nCompactRIO. This project makes the functionality of NI Vision available\nin the `Python`_ programming language.\n\n.. _NI Vision: http://www.ni.com/vision/\n.. _National Instruments: http://www.ni.com/\n.. _Python: http://www.python.org/\n\nFeatures\n==========\n\n* Full wrapping of all structures, enumerations, and functions.\n* All functions raise a ``nivision.ImaqError`` exception if an error occurs,\n rather than relying on nonzero or NULL return values.\n* Output parameters are returned as a tuple (in parameter order). If the\n function additionally returns a value, this is returned as the first\n element of the tuple, followed by the output parameters.\n* Count/size/length parameters that specify the length of an array are\n handled implicitly by using Python's ``len()`` function. This includes\n return values (which are returned as a sized array).\n* Additional Pythonic helper functions (see Documentation_).\n* Automatic memory management of Image and other data types (see\n Documentation_).\n\nUsage\n=======\n\nRead a JPEG file and print its dimensions (width and height)::\n\n import nivision\n img = nivision.imaqCreateImage(nivision.IMAQ_IMAGE_RGB)\n nivision.Priv_ReadJPEGString(img, open('example.jpg', 'rb').read())\n print(nivision.imaqGetImageSize(img))\n\nRequirements\n==============\n\nAn installed and licensed version of `NI Vision`_. Only the 2011 version has\nbeen tested.\n\nThe wrappers currently require ctypes, so this library is currently not usable\non platforms that don't have ctypes. Unfortunately this includes `RobotPy`_ as\nof this writing, but this is being worked on.\n\n.. _RobotPy: https://github.com/robotpy/robotpy\n\nThe wrappers have only been tested on Python 3.x.\n\nInstallation\n==============\n\nOn the robot, this will be installed automatically as of RobotPy 2015.0.1. Otherwise,\nyou can install it via pip:\n\n pip install pynivision\n\nRun ``install.bat`` or ``python setup.py install``.\n\nDocumentation\n===============\n\nThe \"NI Vision for LabWindows/CVI Function Reference\" help file\n(NIVisionCVI.chm) is currently the best \"complete\" reference. However, the\nPython wrappers deviate from the C library in several important ways (see\nFeatures_).\n\nA few helper functions are provided due to the use of in/out parameters.\n\n* ``imaqGetCores()``: Returns the number of cores available to NI Vision.\n* ``imaqSetCores(customNumCores)``: Sets the number of cores available to NI\n Vision.\n* ``imaqUseMaxAvailableCores()``: Configures NI Vision to use the maximum\n number of available processor cores.\n\n``imaqDispose()`` is automatically called when the corresponding Python object\nis garbage collected for ``Image`` and all other structures/arrays returned\nby imaq functions. It is still ok to explicitly call ``imaqDispose()`` on\nthese objects (but be careful, as the underlying object will be immediately\nfreed even though the Python object is still accessible).\n\nImplementation\n================\n\nMost of the wrapper code is generated by the ``gen_wrap.py`` script.\nHand-written Python code in ``ctypes_core_prefix.py`` and\n``ctypes_core_suffix.py`` complements the automatically generated code. The\n``gen_wrap.py`` script creates ``nivision/core.py`` which includes the contents\nof the prefix and suffix Python files.\n\nThe ``gen_wrap.py`` script reads an ``.ini`` file for Pythonic customizations\nto the wrappers such as automatic disposal and handling of sized values as\narrays. The .ini file used is automatically determined by the nivision\nversion in use (or can alternatively be specified on the command line).\n\nAs ``Priv_ReadJPEGString_C`` is not exported on current Windows distributions of\n``nivissvc.dll``, a custom implementation that uses GDI+ has been written in\n``nivision/private.py`` and ``nivision/gdiplus.py``.\n\nLicense\n=========\n\nCopyright |copy| 2012 Peter Johnson.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n.. |copy| unicode:: 0xA9 .. copyright sign\n\n.. vim: tw=80 et ts=3 sw=3 ft=rst fenc=utf-8", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/robotpy/pynivision", "keywords": "frc first robotics wpilib nivision imaqdx vision imaq", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "pynivision", "package_url": "https://pypi.org/project/pynivision/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pynivision/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/robotpy/pynivision" }, "release_url": "https://pypi.org/project/pynivision/2015.0.0/", "requires_dist": null, "requires_python": null, "summary": "Python Wrappers for NI Vision and IMAQdx", "version": "2015.0.0" }, "last_serial": 5815897, "releases": { "2015.0.0": [ { "comment_text": "", "digests": { "md5": "1a78422a50bee47c03c1eb67088ee54e", "sha256": "820669867928a315724d909b0a3bfb8b09561360d025f362f10947b1b9affed9" }, "downloads": -1, "filename": "pynivision-2015.0.0.tar.gz", "has_sig": false, "md5_digest": "1a78422a50bee47c03c1eb67088ee54e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57953, "upload_time": "2015-01-06T15:44:13", "url": "https://files.pythonhosted.org/packages/bb/89/71daf4eccf2ede465c3ee0aa2a8bd558e3e1f36a097a47a354c06df34ab7/pynivision-2015.0.0.tar.gz" } ], "master": [] }, "urls": [ { "comment_text": "", "digests": { "md5": "1a78422a50bee47c03c1eb67088ee54e", "sha256": "820669867928a315724d909b0a3bfb8b09561360d025f362f10947b1b9affed9" }, "downloads": -1, "filename": "pynivision-2015.0.0.tar.gz", "has_sig": false, "md5_digest": "1a78422a50bee47c03c1eb67088ee54e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57953, "upload_time": "2015-01-06T15:44:13", "url": "https://files.pythonhosted.org/packages/bb/89/71daf4eccf2ede465c3ee0aa2a8bd558e3e1f36a097a47a354c06df34ab7/pynivision-2015.0.0.tar.gz" } ] }