Skip to main content

ids_peak_ipl - A library for image manipulation

Project description

ids_peak_ipl provides python bindings for the IDS peak IPL. It exposes all the functionality of the peak IPL.

Benefit from many Python advantages, for example the interactive programming of your IDS camera. Write and test small code snippets without the complex setup of a programming IDE including a toolchain. This package is ideal for prototyping IDS camera applications for all supported peak IPL platforms (Windows, Linux, Linux Embedded).

Installation

$ pip install ids_peak_ipl

Quickstart

Creating a peak IPL image from width and height:

width = 16
height = 16
image_from_size = ids_peak_ipl.Image.CreateFromSize(
    ids_peak_ipl.PixelFormatName_Mono8, width, height)

Creating a peak IPL image from a IDS peak genericAPI buffer manually:

NOTE: Using the BufferToImage function provided by the peak IPL extension in the IDS peak genericAPI package is strongly recommended. To ensure correct functionality when using auto features, BufferToImage must be utilized.

image_from_size_and_buffer = ids_peak_ipl.Image.CreateFromSizeAndBuffer(
    buffer.PixelFormat(),
    buffer.BasePtr(),
    buffer.Size(),
    buffer.Width(),
    buffer.Height()
)

Creating a peak IPL image from a numpy array:

import numpy as np

numpy_array = np.array([[10, 20, 30]], dtype=np.uint8)
image_from_size_and_python_buffer = ids_peak_ipl.Image.CreateFromSizeAndPythonBuffer(
    img.PixelFormatName_RGB8, numpy_array, width, height)

Creating a peak IPL image from a python bytearray:

byte_array = bytearray([255, 10, 128])
image_from_size_and_python_buffer = ids_peak_ipl.Image.CreateFromSizeAndPythonBuffer(
    img.PixelFormatName_RGB8, byte_array, width, height)

Documentation

Documentation is available here

Troubleshoot

Windows Runtime DLL Conflict (PyQt / MSVCP140.dll)

Problem

On Windows, PyQt ships with its own copies of Microsoft runtime libraries, such as:

msvcp140.dll
vcruntime140.dll

These DLLs are usually older than the ones installed by the official Microsoft Visual C++ Redistributable (2015–2022).

IDS peak IPL is compiled with a newer MSVC toolset, Windows may load the outdated DLLs from the PyQt package first. This can cause runtime errors such as:

OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed

Workaround in Python

To ensure IDS peak IPL uses the newer system runtime instead of PyQt’s local DLLs, you can import IDS peak IPL before PyQt.

from ids_peak_ipl import ids_peak_ipl
from PyQt5 import QtCore  # or PyQt6 / etc.

## Continue with the rest of your program

This ensures that your extension module links against the newer runtime DLLs from C:\Windows\System32, before PyQt’s versions are loaded.


Workaround in PyQt Installation

If you can modify the PyQt installation, you can safely rename or remove the bundled runtime DLLs in the PyQt package:

<python>\Lib\site-packages\PyQt<version>\Qt\bin\msvcp140.dll
<python>\Lib\site-packages\PyQt<version>\Qt\bin\vcruntime140.dll

Rename them to:

msvcp140.dll.old
vcruntime140.dll.old

Windows will then automatically use the system-wide (and up-to-date) runtime libraries from the Visual C++ Redistributable.

License

LICENSE TERMS

IDS SOFTWARE SUITE AND IDS peak

Preamble

IDS Imaging Development Systems GmbH ("Licensor")
has developed an additional Software Suite ("Software")
for the purpose of operating and programming
of all purchaseable cameras of the Licensor ("IDS cameras")
and integrating it in other products which use IDS
cameras, from which the customer ("Licensee", Licensor
and Licensee hereafter also referred to as a "Party" or
the "Parties") intends to acquire certain rights of use. For
this purpose, the Parties agree on the following License
Terms.

1. Licensed Software

1.1. Licensor will license the Software as described on
the Licensor's website at www.ids.imaging.com, its
subdomains and at www.ids-imaging.us. The Software contains,
inter alia, executable programs, libraries and header file(s),
example source code for using the libraries,
and the respective documentation.

1.2. The Software contains Open Source components,
meaning components which are licensed under terms
that fulfil the criteria of the Open Source Definition of
the Open Source Initiative as of 2007 (the definition
is available at https://opensource.org/osd). A list of
such Open Source components and the respective
applicable licenses is part of the Software and can
be reviewed after the installation.

1.3. Software is not offered to consumers within the meaning
of section 13 of the German Civil Code (BGB).

2. Rights of Use

2.1. As of the Effective Date as defined in clause 5 Licensor
grants to Licensee a non-exclusive, non-transferable
worldwide right to use, distribute, duplicate or
reproduce and integrate part or all of the Software
in his own products only if they operate with IDS cameras
and to distribute the Software in connection
with such products Moreover Licensee shall have
the right to

2.1.1. Integrate or cause to be integrated the Software
into Licensee's products only if they operate with
IDS cameras and to duplicate or reproduce (or
make duplicates or reproductions) and distribute
these products to end users or third parties (in-
cluding retailers, e-tailers, wholesalers or Original
Equipment Manufacturers, etc.). For the avoidance of doubt,
Licensee shall not be entitled to sublicense the Software
unless otherwise agreed in the following clause 2.1.2.

2.1.2. Licensee shall be entitled to sublicense the rights
granted herein only to his subcontractors solely for
work directly related to Licensee's products and
updates. Other than that, Licensee shall not be
entitled to sublicense the Software.

2.2. The Parties agree that notwithstanding the above
grant of rights of use, Licensor will continue to hold
any and all intellectual property rights in the Software.

2.3. Licensee is not entitled to

2.3.1. sell, rent or lend die Software as a stand-alone to others,

2.3.2. to edit, arrange, translate or decompile the Software,

2.3.3. to use the Software with or integrate the Software
into a camera that was or is not offered by the Licensor
or that is self-produced by the Licensee,

2.3.4. to use Software or parts thereof to create an own
comparable control software or to integrate the
Software or parts thereof into own comparable
control software,

2.3.5. to assign his rights and obligations resulting from
these License terms to third parties without the
prior written consent of Licensor, unless any of the
above is explicitly allowed by statutory law.

2.4. Any software, apart from the python interface and Open Source
software, is offered in object code only. Licensee is not entitled
to access the source code.

3. Warranty

3.1. Licensor accepts warranty for the Software only as
explicitly described in this clause 3. Any further warranty is excluded.

3.2. Licensor is not aware of any patent infringements
related to the Software and undertakes to inform
Licensee without undue delay, should he be made
aware of any such patent infringement, and in such
case, to undertake reasonable measures to remedy
such infringement. Other than that, Licensor does
not assume any warranty with regard to third party
patent rights.

3.3. Licensor warrants that the Software are free from
defects which cause the Software not to operate in
accordance with the functionality as described on
the product website at the Effective Date of these
License Terms. Licensee undertakes to report any
defects discovered to Licensor without undue delay.

4. Download

4.1. The Software will be delivered by Licensor to the Licensee
via download from the Licensor's website.

4.2. Additionally the python interface can be obtained by the Licensee
from the public Python Package Index (PyPI; https://pypi.org/)

5. Effective Date, Term	and	Termination

5.1. These License Terms come into force upon successful download of
the Software not later than the commencement of use by the Licensee.

5.2. These License Terms are not limited in the term.

5.3. The Licensor may, at its choice and without prejudice to
any other legal right or remedy that it might otherwise have,
terminate these License Terms for cause with immediate effect
by written notice to the Licensee upon the happening of any one
of the following events:

5.3.1. any failure by the Licensee to perform one or more
of its obligations hereunder or any other breach
hereof which shall not have been cured within sixty (60) days
after receipt of written notice specifying the nature
of such failure or breach;

5.3.2. the Licensee makes a general assignment for the
benefit of creditors or becomes insolvent or enters
into liquidation or files bankruptcy;

5.3.3. a receiver, trustee in bankruptcy or similar officer
of all or substantially all of the property of the Licensee
is appointed and not removed within ninety (90) days.

5.4. Termination shall not excuse the parties from any
obligations incurred hereunder prior to the date of termination.

5.5. Termination of the License Terms for any reason will
not affect the rights of any end user to use the Software
under any license granted in accordance with this License Terms.

5.6. Furthermore, in the event of termination, products
already manufactured or in the distribution chan-
nels may still be distributed and sold. This is not applicable
for Licensee's products offered to its customers via download
or any other non-physical form. Such products must not be distributed
and sold after the termination of these License Terms. For the
avoidance of doubt: Apart from the regulations in
this clause 5.5, no new products containing the Software may be produced
and the Software may not be used anymore by the Licensee.

5.7. Within ten (10) business days from the termination
of these License Terms, Licensee will delete or destroy
all versions of the Software. Upon Licensor's request,
Licensee must attest in writing that Software
has been deleted or destroyed.

6. Liability

6.1. Licensor's liability for intent, gross negligence and in
the event of personal injury, bodily harm or damage
to death, and if a claim according to the law on
product liability ("Produkthaftungsgesetz") is affected
is subject to the respective applicable legal regulations.

6.2. Other than that, Licensor's liability and that of his
agents, employees and bodies shall be excluded.

6.3. The Licensor is not liable for the loss of data and software.

6.4. The restrictions of liability in this clause 6 shall apply
to Licensor himself and his agents, employees and bodies.

7. Miscellaneous

7.1. These License Terms constitute the complete understanding
between the parties regarding the subject matter.
No oral or subsidiary agreements have been concluded
or entered into. All previous agreements between the Parties
with regard to the subject matter are replaced by these License Terms.
Amendments, supplements and notices of termination of these
License Terms must be made in writing.
The rescission of these License Terms or an alteration of
the requirement of the written form must also
be made in writing. This requirement also applies to
any changes of this provision.

7.2. If individual provisions of these License Terms are
ineffective, then this shall not affect the effectiveness
of the remaining terms. However, the ineffective provision
shall be deemed to be replaced by an effective provision,
which is as close as possible to the commercially desired purpose
of the ineffective provision; the same shall apply in the case of a gap.

7.3. These License Terms are presented in two languages
(German and English). In case of discrepancies
or doubt with regard to their interpretation, the German version
shall prevail.

7.4. The legal relations between the parties regarding
the subject matter shall be governed and construed
by the laws of the Federal Republic of Germany excluding
the UN law on the sale of goods (CISG) and
German Private International Law.

7.5. In the event of any dispute or controversy arising
out of these License Terms or any breach thereof, Licensor and Licensee
shall make a good faith effort to settle the dispute through negotiation.
If the dispute or controversy cannot be solved amicably,
place of jurisdiction for all disputes arising from or in connection
with the subject matter is Berlin. In addition,
Licensor can bring an action against Licensee at the
general place of jurisdiction of Licensee.

Last revised: June 21, 2023

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ids_peak_ipl-1.17.2.0.7-cp311-abi3-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.11+Windows x86-64

ids_peak_ipl-1.17.2.0.7-cp311-abi3-manylinux_2_27_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.27+ x86-64

ids_peak_ipl-1.17.2.0.7-cp311-abi3-manylinux_2_27_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.27+ ARM64

ids_peak_ipl-1.17.2.0.7-cp310-cp310-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.10Windows x86-64

ids_peak_ipl-1.17.2.0.7-cp310-cp310-manylinux_2_27_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

ids_peak_ipl-1.17.2.0.7-cp310-cp310-manylinux_2_27_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ ARM64

File details

Details for the file ids_peak_ipl-1.17.2.0.7-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for ids_peak_ipl-1.17.2.0.7-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2360eda9dc910818922a072f7e40f7656d026b5d827177ec2f597cc6451970b3
MD5 c342a01e7016e327dcbf04df106d96a0
BLAKE2b-256 94a8fa8b76dc918950751636b35b33fa62bcf9e145434699c005b66bcda59074

See more details on using hashes here.

File details

Details for the file ids_peak_ipl-1.17.2.0.7-cp311-abi3-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for ids_peak_ipl-1.17.2.0.7-cp311-abi3-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 b9609a7c0d32bab3abfe8a692609d66904635158561954ec0a2b7f30750c0674
MD5 636412fc51f84b19417a6ee049f2fbb4
BLAKE2b-256 1d7b7747907e2d379d4cfe3f4e14a9680aedad981dad8c05b9510cd9ca9b84a7

See more details on using hashes here.

File details

Details for the file ids_peak_ipl-1.17.2.0.7-cp311-abi3-manylinux_2_27_aarch64.whl.

File metadata

File hashes

Hashes for ids_peak_ipl-1.17.2.0.7-cp311-abi3-manylinux_2_27_aarch64.whl
Algorithm Hash digest
SHA256 905955684fceed6a90a74905d05d14222174b07ce293849e84f96d6b74b56474
MD5 2d4fcd94762283e4c5760cd248a716bc
BLAKE2b-256 cbb392c9bccb027e1bb97462205d41bf1a573e0540e7b8b632dda8241662fbf5

See more details on using hashes here.

File details

Details for the file ids_peak_ipl-1.17.2.0.7-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for ids_peak_ipl-1.17.2.0.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1c7e3abc7fa126aa6cd88f05f1fb0ea27b74851b4cc820e1968058dbf4c6722e
MD5 6f90520e8fb6f447f63998dda3073dfe
BLAKE2b-256 721a696a676662fab30eda6d6f423e169b049e23ee6e14caf98b5bf80cf7354b

See more details on using hashes here.

File details

Details for the file ids_peak_ipl-1.17.2.0.7-cp310-cp310-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for ids_peak_ipl-1.17.2.0.7-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 b2bd1ebf3d96a3bc6cdbf0802066a523be2727f53cf1288a6248406383493454
MD5 ae69f872f6a889defd0c5eadeb114700
BLAKE2b-256 5b69047ae5b1e7c3512182ab940bc1cbcd2ffc4d9cf655f00b16b75b7fe50044

See more details on using hashes here.

File details

Details for the file ids_peak_ipl-1.17.2.0.7-cp310-cp310-manylinux_2_27_aarch64.whl.

File metadata

File hashes

Hashes for ids_peak_ipl-1.17.2.0.7-cp310-cp310-manylinux_2_27_aarch64.whl
Algorithm Hash digest
SHA256 4dc9a5cf31c02ec19333419c7a1bbb41979f92ed5f85f7f9b0821dc0f2cd5192
MD5 beacb11a78cb05bd155c7cb02c6e83f8
BLAKE2b-256 0476041927368457751d487fbfeb98ebd7c6901af8e9ba0782060182e0670801

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page