08-10-2011 08:48 AM
This question is actually about Matlab, but the thing is I don't really use Matlab; Matlab is simply a labor for LabVIEW in the code.
In Matlab, there is a function called c=contourc(im,[.8 .8]). This function is supposed to return a single contour at level 0.8. The return is a 2X387 matrix in this case. Can someone tell me what this matrix is? It does not look like a collection of pixle positions.
Is there an efficient Matlab forum like this NI forum somewhere?
Solved! Go to Solution.
08-11-2011 10:32 AM
Perhaps this Mathworks forum is what you're looking for: http://www.mathworks.com/matlabcentral/answers/
James McNicol
Applications Engineer
National Instruments
08-12-2011 11:50 AM
James,
Is there similar function in LabVIEW? I am trying to convert a m code into LV. Thanks.
08-15-2011 04:46 PM
Hi Meng Hui,
I'm not sure of the exact purpose of that Matlab function, but is this close to what you're looking to do?
http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/imaq_extract_contour/
James McNicol
Applications Engineer
National Instruments
08-16-2011 08:21 AM
Thanks, James.
That matlab function is used to return a contour, but I guess the difference is that the matlab contour function uses interpolation and therefore returns a DOUBLE contour line instead of Integer coordinates.
08-16-2011 07:11 PM
A function much closer to the Matlab one is included in LabVIEW 2011: Contour Line which is under the Mathematics/Geometry/Computational Geometry palette. This works on 2D DBL arrays.
08-17-2011 08:24 AM
Greg,
Thanks for the update. That's good to know.
What is the input 'Height' for? Contour line is in a 2-D image.
08-17-2011 06:28 PM
Height specifies the value at which you want a contour. Think of your 2D array as Z-values at a range of X-Y locations - then Height is the value of Z for contouring. This is a polymorphic VI, so you can also provide an array of heights, or ask for a certain number of contours, and the heights will be automatically selected. If you use those options, then the height of a given contour is returned in the Contour Line cluster as shown.