10-01-2009 04:31 PM
Hi all.
I Have image grayscale Image2.
And then I wanted to receive PixelPointer and then from PixelPointer receive Image3.
But the Image3 is empty.
Why?
Best regards
Iskander
10-01-2009 05:17 PM
Using the TypeCast invalidates the internals of Image3. I can't take from your block diagram if Image3 was created correctly, but in any case I would recommend to use "IMAQ Copy" to copy Image2 to Image3.
Regards, Guenter
10-02-2009 10:42 AM
Hello Iskander,
I believe the reason you do not see anything in Image3 is because you are trying to cast a pointer to a pixel of Image2 into an image. This operation is probably resulting in a null value for the image pointer. The pixel pointer is primarily used in cases where you want to share the data with external code, and need to use a reference that is meaningful to that code. As Guenter pointed out, if you are sharing image data within LabVIEW, IMAQ Copy is a good function to use. Would that function work in your application?
10-02-2009 10:50 AM
Hi Guenter .
Thanks
My task is to pass the image through Pixel Pointer.
Regards
Iskander
10-02-2009 12:50 PM
Hi Chris_G.
Thanks for answer
Regards
Iskander
10-02-2009 02:20 PM
Hi Iskander,
I do not understand your demand to not use "IMAQ Copy". You could code your custom version of IMAQ Copy like this:
(1) Use "IMAQ GetImageSize" and "IMAQ SetImageSize" to have both images the same size.
(2) Map the Pixel Pointers for both Images.
(3) Call e.g. memcpy using a Call Library Function Node (with the appropriate number of bytes to copy).
(4) Unmap both Pixel Pointers.
I haven't tried it out (because I will continue to use IMAQ Copy in this case) but it should be close to a working solution.
Hope this helps, Guenter
10-02-2009 02:22 PM
Hi Chris_G.
I want to receive the image from DLL (C++) into LabVIEW.
For the begining I would like to do it in the LabVIEW, without DLL.
Regards
Iskander
10-02-2009 02:54 PM
10-06-2009 04:32 PM
Hi all
Thanks very much for the help.
I did new VI and used Yours answers.
But when I was running VI , it was closed.
The error is in DLL.
When I disable the DLL, the VI is working.
The DLL I used from examples NI.
Where is my error.
Best regards
Iskander
10-07-2009 12:58 PM
Hi Iskander,
It is pretty much impossible to tell where anerror is that is generated inside of a DLL. Debugging a custom DLL falls more to the creator of the DLL. It is impossible to tell what the erro could be by just looking at only the Call Library Function node.