zoukankan      html  css  js  c++  java
  • NI Vision ClampRake修改

            也可以直接在C盘模板中直接修改,模板路径: C:Program Files (x86)National InstrumentsVision AssistantCGVisual Studio ProjectCS
    修改后,以后可以不用修改

    public static PointContour IVA_FindExtremeEdge(RakeReport report, bool findClosestEdge)
            {
                Double extremeDistance;
                Double tempDistance;
                PointContour edge = new PointContour(0,0);

                // Determine if the function should process the first edges or the last edges array
                if (findClosestEdge)
                {
                    if (report.FirstEdges.Count > 0 )
                    {
                        extremeDistance = report.FirstEdges[0].Distance;
                        edge = report.FirstEdges[0].Position;

                        // Then find the edge that is closest to the boundary of the search area
                        for (int i = 1 ; i < report.FirstEdges.Count ; i++)
                        {
                            tempDistance = report.FirstEdges[i].Distance;
                            if (tempDistance < extremeDistance)
                            {
                                extremeDistance = tempDistance;
                                edge = report.FirstEdges[i].Position;
                            }
                        }
                    }
                }
                else
                {
                    if( report.LastEdges.Count > 0 )
                    {
                        // First, intialize the value with the first edge in the array
                        extremeDistance = report.LastEdges[0].Distance;
                        edge = report.LastEdges[0].Position;

                        // Then find the edge that are closest to the boundary of the search area
                        for (int i = 1 ; i < report.LastEdges.Count ; i++ )
                        {
                            tempDistance = report.LastEdges[i].Distance;
                            if (tempDistance > extremeDistance)
                            {
                                extremeDistance = tempDistance;
                                edge = report.LastEdges[i].Position;
                            }
                        }
                    }
                }
                
                return edge;
            }
  • 相关阅读:
    第十三周课程总结
    第十二周
    第十一周课程总结
    第十周课程总结
    第九周课程总结&实验报告(七)
    第八周课程总结&实验报告(六)
    第七周课程总结&实验报告(五)
    第六周&java实验报告四
    期末课程总结与个人总结
    第十四周课程总结
  • 原文地址:https://www.cnblogs.com/qq1151219115/p/6961812.html
Copyright © 2011-2022 走看看