-
Notifications
You must be signed in to change notification settings - Fork 13
Write code to convert binary image files to full resolution geoTIFF + jpg preview #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't have much experience here but I found this Quora page which suggests using an ImageJ plugin - here's a list of cameras the plugin supports (Find "Supported Cameras"). Perhaps a place to start if there isn't already a solution at hand. |
The code we have used for converting images in RAW format from our system is here: https://github.com/danforthcenter/PhenoFront/tree/master/src/main/java/src/ddpsc/results. The Bayer2Rgb.java is probably the most relevant for example. |
Currently I am using JSON-input parser MATLAB toolbox to parse the meta-data files to find the format. Then simply you can open the file and save it in specific filetype. |
From what I know in general: Commercial software https://www.safe.com/ provides conversion support for a lot of file formats, esp. GIS data. |
One command that used to convert some of the raw data is:
|
@robkooper thanks. That looks like a good first step, additional steps for this issue include:
Would it be worth it to start with a non-georeferenced png (or TIFF) + thumbnail jpg? And / or have separate extractors for 1) converting binary file 2) generating thumbnail and 3) creating georeferenced geoTIFF? |
yes clowder uses imagemagick to do this. One option which makes it easier is to make an extractor that will look at the metadata for octet-stream files and convert them to an image that is attaches as preview to the file. |
@LTBen says 'Tino finished a range of Octave scripts on the control PC such that operators on site can view raw data (Vis, FLIR, PS2, Sensors) and make simple analyses and visualizations.' Could you please either send these to me or place them in the repository (you can copy and paste them individually here)? |
@dlebauer OK it is in gantry_data/Lemnatec/OctaveScripts DO not laugh, just very simple loading procedures knitted with hot needle |
@dlebauer forgot to mention that Solmaz contributed to by providing the Demosaic algorithm, which is not implemented in Octave |
@pless @abby621 I want to test a bit more, but initial version is here:
Basically, you can run this extractor pointing at rabbitMQ, create a dataset and upload left/right/metadata to that dataset in Clowder pointing at same rabbitMQ, and extractor will add two demosaic'ed JPGs to the dataset. I might clean this up slightly, but we could have a little phonecall to walk through the code if that would be helpful. fortunately it's fairly simple I think. |
Hi, I am working on fix the GeoTIFF creation, because there is something un-regular with these GeoTIFF creations. I am trying to view images in a google map using tile coordinate. When I finish this, I will start working on a Clowder extrator. |
@max-zilla Hi, I am trying to get my Clowder test environment setup. Here are some problems:
I think I might made a mistake in uploading files to dataset. Could you give me some additional examples to show me how could I provide inputs in Clowder. |
@ZongyangLi yes, if you were able to access localhost:9000 you have things set up correctly. That error I believe is due to the version of PyClowder you are using. Currently the pyclowder master branch does not support extractors that operate on datasets (such as the demosaic extractor). Instead you must install my branch: Easiest way to do this is probably to:
So you pull down PyClowder, switch to my branch that supports datasets, install that version. Then try running demosaic and see if bug is fixed. Soon my pyclowder branch should become part of main so this won't be necessary, but for now it is. Let me know if that helps! |
@max-zilla Thank you! That's really helpful. Clowder starts to process when left/right/metadata are ready. But it choose an incorrect file as an input dataset. I got these output information in the terminal: So how could I get the file path from "parameters" in "process_dataset" function? |
@max-zilla I am still working on this problem. Could you please give me more examples that how to access all datasets since I can not run the demosaic extractor successfully. |
This discussion has moved to #133 and the code is written. closing. |
This issue was moved to terraref/extractors-stereo-rgb#1 |
The field scanner sensors are exporting binary files (with .bin extension) along with .json files that with a field "Output Data format" that describes how the binary file was written, e.g. the FLIR camera files are
"Output data format": "Bayer GR8 3296x2472", stereo cameras are
"Output data format": "Bayer GR8 3296x2472",`Here are the datasets: https://uofi.box.com/s/c9ngkwi3xvtfr0ei5zfzgf4jya0dmrlc
The Feb 9 folder has one sample from each of the sensors. The feb 12 folder has many images from the sensors (FLIR thermal IR, Stereo Vis, and Fluorescence).
Is there a general way to parse the meta-data files to find the format, and then convert the .bin files to something that can be read by computer programs? Are there existing BrownDog converters that we can use for these files?
Update
The text was updated successfully, but these errors were encountered: