Machine Vision

cancel
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 70
(6,951 Views)

HI dadreamer,

Using the vi: LV_Image_To_Halcon_LV2014.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 70
(6,885 Views)

This is for 3-channel RGB image.

0 Kudos
Message 53 of 70
(6,876 Views)

Nice,just very  thankyou for you help!

0 Kudos
Message 54 of 70
(6,869 Views)

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 70
(6,640 Views)

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

0 Kudos
Message 56 of 70
(6,632 Views)

Where will the release function report an error

1631673785(1).png

0 Kudos
Message 57 of 70
(6,628 Views)

1631673723(1).pngThis change is good

 

0 Kudos
Message 58 of 70
(6,626 Views)

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.

2021-09-15_13-30-23.jpg

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

0 Kudos
Message 59 of 70
(6,615 Views)

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

0 Kudos
Message 60 of 70
(6,611 Views)