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两种并发类型——计算密集型与IO密集型
    设置线程池的大小
    Java 四种线程池newCachedThreadPool,newFixedThreadPool,newScheduledThreadPool,newSingleThreadExecuto
    gitlab的简单操作
    GitHub vs GitLab:区别?
    前端小知识汇总
    花里胡哨的CSS集锦
    码云如何上传代码
    小程序自定义底部导航
    Vue实践过程中的几个问题
  • 原文地址:https://www.cnblogs.com/qq1151219115/p/6961812.html
Copyright © 2011-2022 走看看