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;
            }
  • 相关阅读:
    帮人“解封微信”犯法?全国首例!判刑!
    热乎的校招面经试题解析——百度篇
    字节跳动入局在线教育:烧钱、亏钱
    TF-IDF 算法介绍
    Django ORM 常见查询条件
    Django中render和render_to_response的区别
    Python异步操作MongoDB --Motor的使用
    Java 如何抛出异常、自定义异常
    java项目中的classpath到底是什么
    maven里的modelVersion
  • 原文地址:https://www.cnblogs.com/qq1151219115/p/6961812.html
Copyright © 2011-2022 走看看