Machine Vision

Showing results for 
Search instead for 
Did you mean: 

LabVIEW and Halcon

Sorry for the late reply, i figured it out by myself in the end. I found out that the pointers were the problem.

What I do now is during the initialisation I create a HWindowControl (HSmartWindowControl is NOT working properly, in my case at least), define all the settings (Handle, implementation in HDevEngine,...) and then I send the WindowID as an input of the procedure I call (which I created myself for other data manipulation and contains "visualize_object_model_3d" at some point). As a result I get the display window directly in the front panel of my VI.

No doubt your solution works as well but this is way is a bit different so I thought I would share it if that can help someone. I have been struggling with this for a long time.

Thanks for your time anyway.

0 Kudos
Message 51 of 67

HI dadreamer,

Using the vi: ‏31 KB ,Ican conver a gray image to halcon image;

But,now the image is a RGB  format , I  don't kown hao to do. Can u help me?

0 Kudos
Message 52 of 67

This is for 3-channel RGB image.

0 Kudos
Message 53 of 67

Nice,just very  thankyou for you help!

0 Kudos
Message 54 of 67

Test under this program LV TO HALCON image running time is long will be out of memory and then an error please help below the answer thank you   LV2014    HALOCN12.0

0 Kudos
Message 55 of 67

You repeatedly allocate the memory with DSNewPClr and nowhere you free that memory with DSDisposePtr. That is the issue.

0 Kudos
Message 56 of 67

Where will the release function report an error


0 Kudos
Message 57 of 67

1631673723(1).pngThis change is good


0 Kudos
Message 58 of 67

You should dispose of the memory right after you have generated a HImage object with GenImage1 or GenImage3 method. This is from the sample that I posted earlier.


Please, don't use CIN method because it's unreliable in some cases.

0 Kudos
Message 59 of 67

It feels good to try. Does LV call Halcon have many bugs

0 Kudos
Message 60 of 67