Thijs Lenssen Posted November 1, 2022 Report Share Posted November 1, 2022 Currently I am trying to build an interface between OpenCV C++ and LabVIEW, which I call through the call library function node. To start of I have installed the provided labview OpenCV utilities package, which includes c++ development tools for type conversion/wrapper for NIImage/cv::Mat. See my code bellow: A single image (NIImage) is constructed from an "NIImageHandle" and an array in constructed from an "NIArrayHandle". In my test case I am sending the same image control as an "NIImageHandle" and contained in an array which is passed using the "NIArrayHandle". See my labview bd: When running the vi the code has no problem constructing an "NIImage" from a single "NIImageHandle", but when constructing an "NIImage" from an image contained in an array which is passed as an "NIArrayHandle" I cannot seem to get a valid image. Some data is written to a text file to try and clarify what is happening inside the code: I don't know if the Lava or labview forum is the right place to look for help, but that's my best guess. Is there a way I can get the image handle of images in LabVIEW, are there better solutions or is there even a solution? In case of the provided LabVIEW OpenCV C++ development tools the "NIImageHandle" is a private member variable of the "NIImage" class, but I made it public to see what is happening. So maybe the image handle of an imaq image is also private in LabVIEW. Quote Link to comment
Gribo Posted November 2, 2022 Report Share Posted November 2, 2022 Your image source is U8 grayscale, your destination is floating point double. Are you sure this is correct? Also, try using a different image other than one from the stack - pass another NIIMAGE to calibrate_response. I think you are overwriting the 1st image in the stack. 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.