Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

GetImagePixelPtr returns the same "pointer out" in real-time processing.

Hello.

 

I'm trying to calculate 'the Center of mass' on each frame by using the dlls.

The DLL includes the algorithm of Center of mass.

So I'm using the Imaq GetImagePixelPtr to get image's pointer.

When I applied to "Lena gray scale Image", it returned an accurate result.

However, in real-time processing, it returns "the first frame's pointer out" repeatedly on all frames.

 

How can I get the image's pointer on each frame separately in real-time processing?

 

 

Thanks in advance

0 Kudos
Message 1 of 3
(4,261 Views)

Hello,

 

attach the .vi and the .dll, so that we can take a look.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 2 of 3
(4,216 Views)

You are passing the same single image every time to Grab, so of course it will have the same pointer every time (unless the image is resized or re-allocated for some reason). What you are seeing is expected.

0 Kudos
Message 3 of 3
(4,207 Views)