private void VITBtn_Click(object sender, EventArgs e) { VITModel model = new VITModel(param.R, param.L1, param.L2, param.S1, param.S2, param.K, 0,0,0, param.Size, bgAndObj.GetH); vitImg = model.AppVIT(bgAndObj, OptSysCheckBox.Checked, H0CheckBox.Checked, HkCheckBox.Checked, NoiseCheckBox.Checked, param.Sigma, param.X0); pictureBox2.Image = vitImg.CImageToBitmap(); vitImg.CImageToBitmap().Save("vit.bmp"); }
private void BackgroundBtn_Click(object sender, EventArgs e) { background = Background.GetBackground(param.IMGSize, param.IMGSize, param.Alfa, param.Df, param.Mf); pictureBox1.Image = background.CImageToBitmap(); background.CImageToBitmap().Save("bg.bmp"); }
private void ObjBtn_Click(object sender, EventArgs e) { ObjList.Items.Clear(); List<ImageProcessing.Point> obj_big = (Objects.GetObjects(background, out bgAndObj_big, param.IMGSize/256* param.Radius, param.Q, param.Xmin, param.Xmax, !checkBox1.Checked)).OrderBy(x=>x.x).ThenBy(y=>y.y).ToList(); bgAndObj_big.CImageToBitmap().Save("img.bmp"); bgAndObj = new CImage<double>(256, 256); int k = param.IMGSize/256; for (int i = 0; i < 256; i++) { for (int j = 0; j < 256; j++) { bgAndObj[i, j] = bgAndObj_big[i * k, j * k]; } } //pictureBox2.Image = bgAndObj.CImageToBitmap(); obj = new List<ImageProcessing.Point>(); foreach (ImageProcessing.Point p in obj_big) { obj.Add(new ImageProcessing.Point(p.x/k, p.y/k)); } foreach (ImageProcessing.Point p in obj) { ObjList.Items.Add(p); } pictureBox1.Image = bgAndObj.CImageToBitmap(); }