Exemplo n.º 1
0
 //rgb kep kiolvasasa a fajlbol
 public void readVisibleImage()
 {
     try
     {
         fileName         = Path.GetFileName(filePath.Text).Split('.')[0];
         fileExtension    = Path.GetFileName(filePath.Text).Split('.')[1];
         readerVisible    = new Image_Fusion_Application.IrbFileReader(filePath.Text, fileExtension, "visible");
         imgStreamVisible = new Image_Fusion_Application.IrbImg(readerVisible, "visible", imgStream.Palette);
         ShowNextVisibleFrame();
     }
     catch (Exception e) {
         MessageBox.Show("Error while reading RGB image!\n" + e.Message + "\n" + readerVisible.GetTextInfo());
     }
 }
Exemplo n.º 2
0
 //hokep kiolvasa a fajlbol
 public void readInfraredImage()
 {
     //irb fajl nevenek kiszedese
     try
     {
         fileName      = Path.GetFileName(filePath.Text).Split('.')[0];
         fileExtension = Path.GetFileName(filePath.Text).Split('.')[1];
         reader        = new Image_Fusion_Application.IrbFileReader(filePath.Text, fileExtension, "infrared");
         imgStream     = new Image_Fusion_Application.IrbImg(reader, "infrared");
         //hoertekek alapjan a hokeprol az objektum kiszedese
         getMask(imgStream.EnvironmentalTemp, imgStream.tempMatrix, imgStream.GetWidth(), imgStream.GetHeight());
         ShowNextFrame();
         var value     = thresholdScroll.Value / 100.0;
         var textValue = Math.Round((temperatures[0] + ((temperatures[1] - temperatures[0]) * value)) - 273, 1);
         thresholdText.Text = textValue.ToString();
     }
     catch (Exception e) {
         MessageBox.Show("Error while reading thermal image!\n" + e.Message);
     }
 }