Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with GetBoundingRectangle in NI VIsion .NET class library

I am having trouble getting the GetBoundingRectangle function to work in the NI VIsion .NET class library.

 

In the CWIMAQ-version, I could type if I wanted to get the bounding rectangle of the second ROI in the collection:

Dim reg1 As New CWIMAQRectangle

CWIMAQViewer1.Regions.Item(2).GetBoundingRectangle(reg1)

How do I do the equivalent using the NI VIsion .NET class library?

 

Thanks!

0 Kudos
Message 1 of 3
(3,301 Views)
I will look into this and post on this thread again.
Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 2 of 3
(3,274 Views)

Here is the syntax and explanation given in the help for the equivalent method in Vision .NET. (Roi.GetBoundingRectangle Method)

 

Returns the bounding rectangle for the region of interest (ROI). The bounding rectangle is the smallest rectangle that contains all of the contours that comprise the ROI.

[Visual Basic]
Public Function GetBoundingRectangle() As RectangleContour
[C#]
public RectangleContour GetBoundingRectangle();
Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 3 of 3
(3,266 Views)