Neko Posted April 6, 2021 Report Share Posted April 6, 2021 I'd like to grab images from a USB 3 camera without using IMAQdx. Has anyone tried talking to a camera through the manufacturer's SDK. Basler has their Pylon SDK; FLIR has Spinnaker; Omron has their own SDK; etc. Doing this would require creating wrappers for the dll's in the SDK, and I wonder if anyone has done something similar. Quote Link to comment
Gribo Posted April 9, 2021 Report Share Posted April 9, 2021 OpenCV has very good support for various camera standards. Quote Link to comment
Zyga Posted April 9, 2021 Report Share Posted April 9, 2021 We did such a thing for dalsa camera. It indeed require to write wrapping functions, but there is a help which describes how IMAQ image is stored in the memory so you should be able to cast vendor image format to LV IMAQ. If you do not need any suphisticated camera and acquisition control this library is pretty basic and I have used it with success. I might be missing something but I do not think that OpenCV has a good cam acquisition support. Quote Link to comment
Yair Posted April 14, 2021 Report Share Posted April 14, 2021 I have wrapped the needed parts of the Pylon .NET SDK, which was reasonably easy. The one thing which might help you with that specific one is that after you grab an image (either with a grab method or with a callback event), you can get the pixel data by getting the PixelData property from the grab result, calling .NET Object to Variant.vi on it and then converting the variant to a 1D U8 array. Note this could be an array with 3 bytes per pixel, which matches the LV picture control flattened format, or 1 byte per pixel, in which case you need to create a grayscale color table. Quote Link to comment
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.