private void FrmSetting_FormClosing(object sender, FormClosingEventArgs e) { if (rbHodor.Checked) { config.ProductType = "Hodor"; } else { config.ProductType = "Bran"; } string FileName = @".\productType.txt"; if (!File.Exists(FileName)) { FileStream stream = File.Create(FileName); stream.Close(); } using (StreamWriter sw = new StreamWriter(FileName, false)) { sw.WriteLine(config.ProductType.ToString()); sw.Flush(); sw.Close(); } dut = (DUTclass.DUT)Activator.CreateInstance(Type.GetType("DUTclass." + config.ProductType)); config.WriteProfile(); }
public void Analysis(ref TestItem item, DUTclass.DUT dut) { int points = 9; if (dut is DUTclass.Hodor) { points = 13; } else if (dut is DUTclass.Bran) { points = 9; } if (m_bitmap != null) { double[, ,] rgb = m_pipeline.bmp2rgb(m_bitmap); double[, ,] XYZ = m_pipeline.rgb2xyz(rgb); double[] xyY = m_pipeline.getxyY(XYZ); item.TestNodes[3].Value = Math.Round(xyY[0], 5); item.TestNodes[4].Value = Math.Round(xyY[1], 5); item.TestNodes[0].Value = item.TestNodes[5].Value = Math.Round(xyY[2], 3); if (m_bitmapDisp != m_bitmap) { rgb = m_pipeline.bmp2rgb(m_bitmapDisp); XYZ = m_pipeline.rgb2xyz(rgb); //xyY = m_pipeline.getxyY(XYZ); } //item.TestNodes[5].Value = item.TestNodes[0].Value = Math.Round(m_pipeline.getlv(XYZ), 3); item.TestNodes[1].Value = Math.Round(m_pipeline.getuniformity(XYZ, points), 3); item.TestNodes[2].Value = Math.Round(m_pipeline.getmura(XYZ), 0); item.TestNodes[0].Value = item.TestNodes[5].Value = Math.Round(m_pipeline.lvValue.Max(), 3); } }
public ColorCalibration(DUTclass.DUT dut, Ca310Pipe pipe, Fixture fixture, Colorimeter colorimeter) { this.dut = dut; this.ca310Pipe = pipe; this.fixture = fixture; this.camera = colorimeter; this.rgbList = new List <int[]>(); FULLNAME = this.filepath + @"\RGB.txt"; PATH = this.filepath + @"\ColorCalibration\"; }
public FlexCalibration(DUTclass.DUT dut, Colorimeter colorimeter, imagingpipeline pipe) { this.ReadProfile(); this.dut = dut; this.pipe = pipe; this.camera = colorimeter; FULLNAME = this.filepath + @"\RGB.txt"; this.PATH = this.filepath + @"\FlexCalibration\"; Directory.CreateDirectory(PATH); this.rgbList = new List <int[]>(); this.ReadRGBConfig(); }
public ColorCalibration(DUTclass.DUT dut, KonicaCa310 pipe, Fixture fixture, Colorimeter colorimeter) { this.dut = dut; this.ca310Pipe = pipe; this.fixture = fixture; this.camera = colorimeter; this.rgbList = new List <int[]>(); FULLNAME = this.filepath + @"\RGB.txt"; PATH = this.filepath + @"\ColorCalibration\"; Directory.CreateDirectory(PATH); this.ReadProfile(); }