Esempio n. 1
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult dr = OFD.ShowDialog();

            if (dr == System.Windows.Forms.DialogResult.OK)
            {
                String fileNom = OFD.FileName;
                imgList = new List <Image>();

                if (File.Exists(fileNom))
                {
                    meta    = new Dictionary <string, string>();
                    imgList = MPOUtils.GetJPEGImages(fileNom);

                    for (int i = 0; i < imgList.Count; i++)
                    {
                        //String fnom = Path.GetFileNameWithoutExtension(fileNom) + i + ".jpg";
                        Bitmap b = new Bitmap(imgList[i]);

                        imgList[i] = b;

                        //imgList[i].Save(fnom, System.Drawing.Imaging.ImageFormat.Jpeg);
                        // Console.WriteLine("Saving " + fnom);
                    }

                    pictureBox2.Image = imgList[0];
                    pictureBox3.Image = imgList[1];

                    Bitmap anna = ImgProc.MultiplyStereo(imgList[0], imgList[1]);

                    pictureBox1.Image = anna;

                    //  anna.Save("anaglyph.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);

                    DataTable dt = new DataTable();

                    dt.Columns.Add(new DataColumn("Attribute"));
                    dt.Columns.Add(new DataColumn("Value"));


                    /* Dictionary<string, string>.KeyCollection.Enumerator anouma = meta.Keys.GetEnumerator();
                     *
                     * for (int i = 0; i < meta.Keys.Count; i++)
                     * {
                     *   String val;
                     *
                     *   String key = anouma.Current;
                     *   anouma.MoveNext();
                     *   meta.TryGetValue(key, out val);
                     *   dt.Rows.Add(new object[] { key, val   });
                     * }
                     *
                     * dataGridView1.DataSource = dt; */
                }
            }
        }
Esempio n. 2
0
 private void RightColorButton_Click(object sender, EventArgs e)
 {
     rightColorChooser.ShowDialog();
     rightColor = rightColorChooser.Color;
     if (pictureBox1.Image != null)
     {
         pictureBox1.Image = ImgProc.MultiplyStereo(imgList[0], imgList[1]);
     }
     RightColorButton.BackColor = rightColor;
 }