private void openToolStripMenuItem1_Click(object sender, EventArgs e) { using (OpenFileDialog dlg = new OpenFileDialog()) { dlg.Title = "Open Image"; dlg.Filter = "jpg files (*.fits)|*.fits"; if (dlg.ShowDialog() == DialogResult.OK) { this.objemgucv = new EmguCv(dlg.FileName); this.iplImage = this.objemgucv.ImageJPG; imageBox1.Image = this.iplImage; imageType = new SRSLib.ImageLib.ImageType(); SRSLib.ImageLib.OpenAnyImageType(dlg.FileName, ref imageType); //file fit path MatchLib.SetCatalogLocation(catalogpath); centerRa2000GuessRads = new MatchLib.PlateListType() { Px = imageType.N1, Py = imageType.N2, XSize = (double)imageType.N1 * 1 / 206264.806, YSize = (double)imageType.N2 * 1 / 206264.806, HaveStartingCoords = false }; MatchLib.ExtractStars(ref imageType, ref centerRa2000GuessRads); MatchLib.PlateMatch(ref centerRa2000GuessRads); button1.Enabled = true; //MatchLib.PlateMatch(ref centerRa2000GuessRads); //MatchLib.PlateMatchImage(ref imageType, ref centerRa2000GuessRads); // Create a new Bitmap object from the picture file on disk, // and assign that to the PictureBox.Image property } } }
public void Plantwave(Cv imageprocessing) { if (!String.IsNullOrEmpty(catalogpath)) { imageType = new SRSLib.ImageLib.ImageType(); SRSLib.ImageLib.OpenAnyImageType(this.path, ref imageType); //file fit path MatchLib.SetCatalogLocation(catalogpath); centerRa2000GuessRads = new MatchLib.PlateListType() { Px = imageType.N1, Py = imageType.N2, XSize = (double)imageType.N1 * 1 / 206264.806, YSize = (double)imageType.N2 * 1 / 206264.806, HaveStartingCoords = false }; MatchLib.ExtractStars(ref imageType, ref centerRa2000GuessRads); MatchLib.PlateMatch(ref centerRa2000GuessRads); } }