RingLight

class RingLight(self)

Bases: pybind11_object

Ring light management under unix.

Warning

This class works only at Irisa with the Edixia’s ring light system.

Here is an example showing how to synchronise the framegrabbing with the lighting system.

#include <visp3/core/vpImage.h>
#include <visp3/robot/vpRingLight.h>
#include <visp3/sensor/vp1394TwoGrabber.h>

#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif

int main()
{
#if defined(VISP_HAVE_PARPORT) && defined(VISP_HAVE_DC1394)
  vp1394TwoGrabber g; // Firewire framegrabber based on libdc1394-2.x third party lib
  vpImage<unsigned char> I;

  vpRingLight light; // Open the device to access to the ring light.

  for (int i=0; i < 10; i++) {
    light.pulse(); // Send a pulse to the lighting system
    g.acquire(I); // Acquire an image
  }
#endif
}

Here is an example showing how to turn on the lighting during 10 seconds.

#include <visp3/core/vpTime.h>
#include <visp3/robot/vpRingLight.h>

#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif

int main()
{
#ifdef VISP_HAVE_PARPORT
  vpRingLight light;         // Open the device to access to the ring light.

  int nsec = 10;             // Time to wait in seconds
  light.on();                // Turn the ring light on
  vpTime::wait(nsec * 1000); // Wait 10 s
  light.off();               // and then turn the ring light off
#endif
}

Constructor to access to the ring light device connected to the parallel port.

Open and initialise the default parallel port device “/dev/parport0” to communicate with the ring light.

Turn the ring light off.

Methods

__init__

Constructor to access to the ring light device connected to the parallel port.

off

Turn the ring light off.

on

Turn the ring light on.

pulse

Overloaded function.

Inherited Methods

Operators

__doc__

__init__

Constructor to access to the ring light device connected to the parallel port.

__module__

Attributes

__annotations__

__init__(self)

Constructor to access to the ring light device connected to the parallel port.

Open and initialise the default parallel port device “/dev/parport0” to communicate with the ring light.

Turn the ring light off.

off(self) None

Turn the ring light off.

To turn the ring light on, see on() .

on(self) None

Turn the ring light on.

To turn the ring light off, see off() .

pulse(*args, **kwargs)

Overloaded function.

  1. pulse(self: visp._visp.robot.RingLight) -> None

Activates the ring light by sending a pulse throw the parallel port.

The pulse width is 500 us. This pulse activates a NE555 which turns on on the light during 10ms.

  1. pulse(self: visp._visp.robot.RingLight, time: float) -> None

Activates the ring light by sending a pulse throw the parallel port during a specified duration.

Parameters:
time

Duration in milli-second (ms) during while the light is turned on.