JoergVogel Posted December 3, 2022 Share Posted December 3, 2022 We were told that a new camera won’t work with an outdated and no more supported system. We get a new camera working. First our new camera works as a custom device. We put a C Sharp (C#) pylon dll library by copy into \bin directory of ace program directory. This library comes from a Pylon Viewer Suite 6 out of Development directory. We added a Custom Device from Vision into Explorer tree. It is a C# script calling GrabImage method within. GrabImage is capable to return an 8bit pixel size grayscale or a 32bit pixel size color bitmap. Our camera default output file image data is Bayer RG8, which has got 24bit pixel size. We begin our project by watching Basler webinars for Pylon Development suite for Python integration and C++. We get to know that there are libraries for .Net or C#, C++ and C. And most interesting there are program examples for those languages. “Grab” is a simple program to acquire images from first camera device in Pylon Viewer and it shows in a MS Windows window the grabbed image. We copied some of the source code into the C# script GrabImage section and returned a buffer variable. Variable “buffer” contains byte array data. A pixel size of 8bit is applied by a file image setup of Mono8 Pylon Viewer Camera property setting. But we were not able to set a 32bit file image format directly in our camera. First we enhanced variable “buffer” after every 3rd byte with another byte to get a 32bit pixel size. Later we found a convert method to do the same in the namespace of basler.pylon. Certainly there are still some errors in the source code, because we aren’t educated programmers nor doing a lot of coding on a level of deploying source code. But we are gladly that we can still use a bought camera in an outdated system configuration for our Roboter. This custom camera device can we connect to a virtual camera device to do image recognition within Sight of ACE. We are interested in any hints developing our approach further on. Thanks for reading and any suggestions. Regards Joerg CS_ACE_Custom_Vision_Device_BaslerPylon-Camera-converting.txt Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.