From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

optical flow

Hello,everyone:

     I want to use the optical flow(KLP) in real-time.But,there is an problem "MAQ Vision:  Incompatible image size." Can anyone give me some advises?

Change the world
0 Kudos
Message 1 of 5
(4,610 Views)

Hello,

 

try using IMAQ SetImageSize in the initialization stage for your "previous_image" reference.

Set the size according to the camera resolution.

 

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 5
(4,604 Views)

Klemen,

       Thank you very much. I  have added the IMAQ SETIMAGESIZE.vi before the"pervious_image",but the same problem is still happen.This time I put my vi on the web,can you help me ?

Change the world
0 Kudos
Message 3 of 5
(4,592 Views)

Klemen,

       Thank you very much. I  have added the IMAQ SETIMAGESIZE.vi before the"pervious_image",but the same problem is still happen.This time I put my vi on the web,can you help me ?

Change the world
Download All
0 Kudos
Message 4 of 5
(4,591 Views)

Hello,

 

in the initialization of the "previous_image", you have incorrectly wired the width and height of the image (it is 480x640, instead of 640x480, which I assume your camera outputs).

 

In order to make the program immune to camera resolution changes, I advise you to use the width and height camera property and wire this to the setImageSize. Put a property node after the camera initialization and read the W/H attributes of the camera.

 

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 5 of 5
(4,564 Views)