You are here: Start » PyAVL » Image Acquisition

Image Acquisition

PyAVL includes built-in support for image acquisition from industrial cameras via GigE Vision and GenICam. No third-party camera SDK is required.

  • GigE Vision —enumerate and connect to GigE Vision cameras on the network using AVL.GigEVision_FindDevices and AVL.GigEVision_OpenDevice.
  • GenICam parameters —read and write camera parameters (exposure, gain, gamma, etc.) through the GenICam interface via dev.GetParamExists, dev.SetFloatParam, and related methods.
  • Streaming —start continuous acquisition with dev.StartAcquisition and grab frames directly into AVL.Image objects with dev.ReceiveImage.

PyAVL Example —GigE Vision Streaming

Enumerate GigE Vision devices, connect, and capture frames in a loop:

import AVL

# Find all GigE Vision cameras on the network (2 second timeout)
devices = AVL.GigEVision_FindDevices(2000)
if not devices:
    raise RuntimeError("No GigE Vision devices found")

# Open the first available device
dev = AVL.GigEVision_OpenDevice(devices[0].IpAddress)

# Acquire and process frames
dev.StartAcquisition(dev.GetPixelFormats()[0])
frame = AVL.Image()

try:
    while True:
        dev.ReceiveImage(frame)
        # process frame here ...
finally:
    dev.StopAcquisition()
    dev.Close()

See Also

Previous: Interoperability with Other Libraries Next: Troubleshooting