ryanbales / FLIRImageProcessor

Apache License 2.0
14 stars 4 forks source link

Doesn't compile #1

Open quade1664 opened 6 years ago

quade1664 commented 6 years ago

I downloaded the project, after trying to run for first time i get a couple of issues in visual studio:

The command ""C:\Users\MYPC\Desktop\FLIRImageProcessor-master\src\lib\FLIR\x86\FLIR.Atlas.x86.bat" "C:\Users\MYPC\Desktop\FLIRImageProcessor-master\src\App\bin\x86\Debug\"" exited with code 4. App

The command ""C:\Users\MYPC\Desktop\FLIRImageProcessor-master\src\lib\FLIR\x86\FLIR.Atlas.x86.bat" "C:\Users\MYPC\Desktop\FLIRImageProcessor-master\src\DataExtractor\bin\x86\Debug\"" exited with code 4. DataExtractor

If i copy these files into the directory, it gets past that error, then i get the following:

Flir.Atlas.Image.ThermalException HResult=0x80131500 Message=Cannot create internal object. Source=Flir.Atlas.Image StackTrace: at Flir.Atlas.Image.ThermalImageFile..ctor() at Flir.Atlas.Image.ThermalImageFile..ctor(String path) at FLIRImageProcessor.DataExtractor.ImageProcessor..ctor(String imageFilePath) in C:\Users\MYPC\Desktop\FLIRImageProcessor-master\src\DataExtractor\ImageProcessor.cs:line 40 at FLIRImageProcessor.App.Program.Main(String[] args) in C:\Users\MYPC\Desktop\FLIRImageProcessor-master\src\App\Program.cs:line 67

Inner Exception 1: BadImageFormatException: Could not load file or assembly 'Flir.FormatPlugin.IRSDK, Version=2.0.14266.1000, Culture=neutral, PublicKeyToken=caa391fd8e07c76b' or one of its dependencies. An attempt was made to load a program with an incorrect format.

its on ImageProccessor.cs on line 40 FlirImageFile = new ThermalImageFile(imageFilePath);

quade1664 commented 6 years ago

Made some progress, putting this line before line 40

var x = ThermalImageFile.IsThermalImage(imageFilePath);

Returns false, so for some reason my JPG file returned from an A310 Flir Cam is not a thermal image! Perhaps you can put that check in ....haven't got pull requests mastered yet sorry

ryanbales commented 6 years ago

@quade1664 Thanks for your feedback. Do you have a couple example images that I can use for debugging?

quade1664 commented 6 years ago

Got it working, I needed to follow this guide http://cdn.cloud.flir.se/update/flir%20atlas/3.1.16014.2001/help/html/690f202b-9854-43e3-a5f5-f88c2dcd09c3.htm

Specifically the project needed to have the post compile line ... after that it started working

quade1664 commented 6 years ago

I just tried to recreate the issue again by copying the project to a new location and renaming projects i get the error again, but cant seem to fix

to fix it i had to create a new solution using the above link, and copy all the files over

quade1664 commented 6 years ago

Hi Ryan If you simply copy the folder to a new local, then open the new solution, then clean solution, then rebuild solution you will see the error i'm getting

Error
The command ""C:\Users\mypc\Desktop\FLIRImageProcessor-master\src\App\FLIR.Atlas.x86.bat" "C:\Users\mypc\Desktop\FLIRImageProcessor-master\src\App\bin\x86\Debug\"" exited with code 1.
in App

it appears to be something to do with FLIR.Atlas.x86.bat

The only way i can get it working is by manually copying FLIR.Atlas.x86.bat into the bin/x86/debug folder...which is just a pain..particularly in future when i might forget!

Any ideas?