public void Init(FPFImage img, Metadata mt) { this.irImage = img; this.metadata = mt; this.refArea = 1; }
public void ProcessThermalImage(string thermalName, string metadataName) { _processed = false; hotSpots.Clear(); fusionName = null; irName = thermalName; mtName = metadataName; if (mtName != null) { if (RTDPSettings.doGeolocation || RTDPSettings.doImageFusion) { try { // Load TELEMETRY metadata.ReadXML(mtName); } catch (Exception ex) { _processed = true; return; } float elevation = 0; metadata.SetHeights(RTDPSettings.terrainModelSettings.localGeoidHeight, elevation); } } if (irName != null) { if (RTDPSettings.geolocationSettings.geolocateIRimage || RTDPSettings.doSegmentation || RTDPSettings.doImageFusion) { // Load IR IMAGE try { irImage = new FPFImage(irName); } catch (Exception ex) { Console.WriteLine(ex.ToString()); _processed = true; return; } if (RTDPSettings.doSegmentation) { // SEGMENTATION segmentation.Init(irImage, metadata); hotSpots = segmentation.Solve(); } if (mtName != null) { if (RTDPSettings.geolocationSettings.geolocateIRimage || (RTDPSettings.geolocationSettings.geolocateHotspots && hotSpots.Count > 0)) { // GEOLOCATION irGeolocation.Init(metadata.uavTelemetry); if (RTDPSettings.geolocationSettings.geolocateHotspots && hotSpots.Count > 0) { foreach (HotSpot hs in hotSpots) { hs.Geolocation = irGeolocation.GetPixelGeolocation(hs.M, hs.N); } } if (RTDPSettings.geolocationSettings.geolocateIRimage) { irImage.GeorefInfo = irGeolocation.GetImageGeolocation(); } } } if (RTDPSettings.geolocationSettings.geolocateVIimage || (RTDPSettings.doImageFusion && NumHotSpots > 0)) { //TODO: Load VISUAL IMAGE //On error -> _processed = true; this.ProcessVisualImage(); viImage = new ViImage(viName); } if (NumHotSpots == 0) { _processed = true; } } } }
public void Init(FPFImage ir_img, ViImage vi_img, Metadata mt) { this.irImage = ir_img; this.viImage = vi_img; map.Init(mt); }
public void ProcessThermalImage(string thermalName, string metadataName) { _processed = false; hotSpots.Clear(); fusionName = null; irName = thermalName; mtName = metadataName; if (mtName != null) { if (RTDPSettings.doGeolocation || RTDPSettings.doImageFusion) { try { // Load TELEMETRY metadata.ReadXML(mtName); } catch (Exception ex) { _processed = true; return; } float elevation = 0; metadata.SetHeights(RTDPSettings.terrainModelSettings.localGeoidHeight, elevation); } } if (irName != null) { if (RTDPSettings.geolocationSettings.geolocateIRimage || RTDPSettings.doSegmentation || RTDPSettings.doImageFusion) { // Load IR IMAGE try { irImage = new FPFImage(irName); } catch (Exception ex) { Console.WriteLine(ex.ToString()); _processed = true; return; } if (RTDPSettings.doSegmentation) { // SEGMENTATION segmentation.Init(irImage, metadata); hotSpots = segmentation.Solve(); } if (mtName != null) { if (RTDPSettings.geolocationSettings.geolocateIRimage || (RTDPSettings.geolocationSettings.geolocateHotspots && hotSpots.Count > 0)) { // GEOLOCATION irGeolocation.Init(metadata.uavTelemetry); if (RTDPSettings.geolocationSettings.geolocateHotspots && hotSpots.Count > 0) { foreach (HotSpot hs in hotSpots) { hs.Geolocation = irGeolocation.GetPixelGeolocation(hs.M, hs.N); } } if (RTDPSettings.geolocationSettings.geolocateIRimage) { irImage.GeorefInfo = irGeolocation.GetImageGeolocation(); } } } if (RTDPSettings.geolocationSettings.geolocateVIimage || (RTDPSettings.doImageFusion && NumHotSpots > 0)) { //TODO: Load VISUAL IMAGE //On error -> _processed = true; this.ProcessVisualImage(); viImage = new ViImage(viName); } if (NumHotSpots == 0) _processed = true; } } }