Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW and Halcon

Thank you very much for the programming development of LV adjustable visionpro. Please give me your guidance

0 Kudos
Message 61 of 70
(3,349 Views)

LabVIEW calls hdev program. Is there any routine in this regard? Please give guidance. Thank you

0 Kudos
Message 62 of 70
(2,832 Views)

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

0 Kudos
Message 63 of 70
(2,821 Views)

This routine is not very clear. Is there a more clear routine for LabVIEW calling hdev script

0 Kudos
Message 64 of 70
(2,815 Views)

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.

0 Kudos
Message 65 of 70
(2,808 Views)
 

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

0 Kudos
Message 66 of 70
(2,801 Views)

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).

0 Kudos
Message 67 of 70
(2,765 Views)

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

0 Kudos
Message 68 of 70
(1,603 Views)

@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.

2022-11-28_20-24-30.jpg

2022-11-28_20-23-48.jpg

You may also zero imageWidth and imageHeight as per the documentation, if you don't need rescaling.

0 Kudos
Message 69 of 70
(1,581 Views)

Hi,

 

I´m trying to do this tomorrow at the office.

 

Marko

Message 70 of 70
(1,542 Views)