Issue:
- Image buffer not discarded when the machine was stop.
- When the machine restart, the camera shows the previously grabbed image when running.
Solution:
- Check the camera condition when restart the machine, if camera is open, close and release all the image buffer.
if (hDev.IsValid)
{
/* ... Close and release the pylon device. */
if (Pylon.DeviceIsOpen(hDev))
{
Pylon.DeviceClose(hDev);
}
Pylon.DestroyDevice(hDev);
}