Beispiel #1
0
        public static void ExportXmlInspect()
        {
            string outpath = @"D:\temp\test.xml";
            var    temp    = new InspctRecipe()
            {
                RhoLimit      = 0,
                IntenLowLimt  = 2500,
                IntenHighLimt = 14000,
                AreaLowLimt   = 900,
                AreaHighLimt  = 2,
                Tolerance     = 3,
                HChipNum      = 562,
                WChipNum      = 691,
                realLT        = new double[] { 13.5051227678571, 12.6714732142857 },
                realLB        = new double[] { 14926.9954464286, 10.3372544642857 },
                realRT        = new double[] { 13.8385825892857, 12142.3277678571 },
                realRB        = new double[] { 14928.3292857143, 12141.6608482143 },
                NeedEdgrCut   = false,
                EdgeLimit     = 0,
                XoffSet       = 0,
                YoffSet       = 0
            };

            WriteXmlClass(temp, Path.GetDirectoryName(outpath), Path.GetFileName(outpath));
        }
        public Maybe <List <ExResult> > StartWithData(Img img, string procpath, InspctRecipe inspectrecipe)
        {
            Func <Rectangle, double> boxsum = FnSumInsideBox(img.Data);                //여기서  avg로 할건지, 합으로 할껀지 정할 수 있다.
            var poseq       = EstedChipPosAndEq(inspectrecipe);
            var esetedindex = ToEstedIndex(poseq);

            var doproc = RunProcessing.Apply(img);

            var recp = File.ReadAllText(procpath);


            var resimg = Just(recp)
                         .Bind(RemoveHeadTail)
                         .Bind(ToFuncRecipeList)
                         .Bind(ToPreProcFuncs)
                         .Bind(Preprocess.Apply(img));

            if (!resimg.isJust)
            {
                return(None);
            }


            var resisp1 = ToBoxList(inspectrecipe, resimg.Value);
            // 컨투어 찾고, 소팅후 박스로 (끝)


            var resGenerator = ToExResult(inspectrecipe, boxsum, poseq, resisp1.Value);
            // 박스 리스트에 대해 대응되는 인덱싱 리스트 (끝) 여기까지 체크 완료.

            var exresults = ResultInitializer(inspectrecipe)             // 인덱싱 초기화만 되있음.
                            .Map(resGenerator)
                            .Flatten()
                            .ToList();                                     // 끝 여기서 모든 결과를 만들었다. (끝)\

            //var counter = exresults.Where(x => x.OKNG == "OK").Count();

            return(Just(exresults));
        }
Beispiel #3
0
 public static ExResult[][] ResultInitializer(InspctRecipe src) => NgResultInitializer(src.HChipNum, src.WChipNum);