LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pixel pointer

What is the point of the Sequence block?  The error wires produce the same execution sequence.

0 Kudos
Message 11 of 17
(2,144 Views)

Hi, Iskander,

 

As far as I can understand, you need to transfer one image to another image by pointer.

Lets say, you have pointer to source image (can be IMAQ image, or foreign image delivered from USB cam or something like that) and your destination is LV IMAQ Image.

 

There are two possible ways how to do this.

 

The first method with IMAQ MemPeek - so it don't required any DLL, but relative slow due to triple conversions (byte string->1D array->2D Array->IMAQ Image):

 

Method 1.png

 

The second method actually based on NI Example. You need your own DLL where you should transfer the image:

 

Method 2.png

 

The source code of the CopyImage_ptr is pretty simple and straight forward:

 

DLL Source.png

 

Notes:

 

1. You should clear understand how IMAQ Image organized in memory:

 

IMAQ Image in Memory.png

 

2. Calling GetImagePixelPtr with UnmapPixelPointer is not necessary.

Refer to this thread: IMAQ GetImagePixelPtr Unmap Pixel Pointer - do I really need this?

 

Any further questions?

 

with best regards,

 

Andrey.

Message Edited by Andrey Dmitriev on 10-08-2009 11:47 AM
0 Kudos
Message 12 of 17
(2,131 Views)

Hi all.

Thanks very much fo the help.

Andrey , do You speak Russian?

Best regards

Iskander.

 

0 Kudos
Message 13 of 17
(2,066 Views)

Iskander wrote:

 

Andrey , do You speak Russian?

 

 


Да, я немного говорю по-русски 😉

 

AndyDm@GMail.com

 

Андрей.

0 Kudos
Message 14 of 17
(2,055 Views)

Thanks all for the help.

All work

Best regards

Iskander.

 

0 Kudos
Message 15 of 17
(2,003 Views)

Hello Andrey Dmitriev, I also want to pass my image to a dll and do some processing with the image. I tried the example files that you supported (I just recompiled the dll code because my labview is 64 bit) but encountered with such a result:

berkay123_1-1620648303579.png

Also, I did not see any image path or source etc. How can I do that with an image that I supply? Any help appreciated.

Regards.

 

0 Kudos
Message 16 of 17
(1,327 Views)

Its happened because pointers on x64 are 64 bit wide. They just truncated.

Just change the type here for both src and dst:

Screenshot 2021-05-10 22.39.25.png

Then it should work again.

Andrey.

0 Kudos
Message 17 of 17
(1,303 Views)