LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.net invoke method output missing

Hi.

I'm trying to call a .net method with the following signature:

 

public static bool SolvePnP(MCvPoint3D32f[] objectPoints, PointF[] imagePoints, IInputArray intrinsicMatrix, IInputArray distortionCoeffs, IOutputArray rotationVector, IOutputArray translationVector, bool useExtrinsicGuess = false, SolvePnpMethod method = SolvePnpMethod.Iterative);

Mat is defined as follows:

 

 [Serializable]
public class Mat : MatDataAllocator, IImage, IDisposable, ICloneable, IInputOutputArray, IOutputArray, IInputArrayOfArrays, IInputArray, IEquatable<Mat>, ISerializable

I assume the red dot next to those inputs are red because they are cast from Mat to IInputArray or IOutputArray ?

 

In the image below there are 4 inputs that don't have handles to use the output.

Why is that ?

 

Thanks!

 

 

emgumethodoutputmissing.png

0 Kudos
Message 1 of 3
(2,862 Views)

LabVIEW treats arrays ([]) specially and allows you to "pass the wire through" as an output. It isn't really an output though, just a convenience. You can tell that from the method signature you posted - there are no out or ref parameters so LabVIEW has to assume they are just "inputs".

 

The wire itself is a reference and LabVIEW is data flow - so for the "missing" ones you can just pick up the reference wire from before. Don't forget to enforce data flow so that you don't use those ref wires until the method is called.

 

And yes, the red dots are indicating class coercions since you can't instantiate an interface (which is what I presume theose are).

0 Kudos
Message 2 of 3
(2,825 Views)

Hi,

Ok we worked around it by using the same reference after the method executed (With an extra box thingy, I'm not the one using the labview part)

Would be a lot more convenient if there was an output, since objects can actually be changed by a method without the out or ref keywords.

Its only value types that should work the way you mention.

 

Thanks

0 Kudos
Message 3 of 3
(2,796 Views)