If I understand your message right, this example should more or less suit your needs: https://forums.ni.com/t5/Machine-Vision/LabVIEW-and-Halcon/m-p/4005482#M52741
Well, then maybe you could study some materials on HALCON-LabVIEW interaction, that MVTec sent me years ago. They are based on LabVIEW 2012 and HALCON 12.0, hence some information (as to the available operators, their names/prototypes or their behaviour) is likely outdated. Some useful pieces are there anyway, so check it out.
Uploading a program example here is very complicated by encapsulating function calls through Halcon. I want to call hdev script directly through LabVIEW, which will be simpler. Please take a look at this routine and give me some suggestions
I only know, how to call HALCON procedures (*.hdvp). Not sure, whether it's even possible to call *.hdev scripts outside of HDevelop, as some operators are often tied to its internal objects like the graphics window, so the counterparts should be used instead (if any). I would suggest to rewrite your script as a procedure to be called from LabVIEW or you could stick with traditional way of calling the operators with .NET nodes from the diagram (as done in your samples above). Of course, you can always reach MVTec or the local distributors to get assistance for your tasks (a valid license is required).
Hi dadreamer,
i know, this thread is some month old but i have to include some HALCON functions to my LabVIEW code now and so i´m trying to check out the combination of LV and HALCON. So I came to this really helpful thread.
Thank You for that!
Based on Your VI "LV_Image_To_Halcon_LV2014" I tried to convert this LV code to be able to work with 32 bit TrueColour-Arrays. I also used the VI "LV_Image_To_Halcon_LV2014_fixed_RGB", that works really fine. Unfortunately my Data ara not 3 × U8 arrays of R, G and . So i tried to use the function GenImageInterleaved. But it does not work. Do You have the time to figure out what the problem is with my VI.
Many thanks in advance!
And sorry for this ENGLISH 🙂 ...
Greetings, Marko
@Trinitatis wrote:
So i tried to use the function GenImageInterleaved. But it does not work.
Hi!
It works fine, if:
- colorFormat of GenImageInterleaved is set to 'bgrx';
- DispColor is used to display the image;
- GetImagePointer3 is used to retrieve the final image.
You may also zero imageWidth and imageHeight as per the documentation, if you don't need rescaling.