Pylon emulated camera doesn't recognise custom image

40 views Asked by At

I have been using the pylon Camera Software Suite to emulate a camera. I'm wanting to display custom test images and have used the pylon documentation provided:

camera.TestImageSelector.SetValue(TestImageSelector_Off);
camera.ImageFileMode.SetValue(ImageFileMode_On);
camera.ImageFilename.SetValue("c:\\images\\image1.png");

I'm using ROS on Linux OS to run the code and when I run catkin_make, I receive the following error: error: 'class Pylon::CInstantCamera' has no member named 'TestImageSelector'

I changed the code to this which enabled me to successfully build my workspace:

GenApi::CEnumerationPtr TestImageSelector = nodemap.GetNode("TestImageSelector");
GenApi::CEnumerationPtr ImageFileMode = nodemap.GetNode("ImageFileMode");
GenApi::CEnumerationPtr ImageFilename = nodemap.GetNode("ImageFilename");

TestImageSelector->FromString("Off"); // disable test images
ImageFileMode->FromString("On"); // enable custom images
ImageFilename->FromString("/path/to/image/file.png"); // this is replaced by my path

However, when I run my ROS node I get the following message: 'NULL pointer dereferenced'

I used IsWritable() to test my image file and it isn't writable so I think the issue is that pylon doesn't recognise my image, but I don't know why or how to fix it.

Any help would be much appreciated.

0

There are 0 answers