IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Mars Raw Image Processing
Kevin Gill
post May 20 2022, 04:15 PM
Post #1


Member
***

Group: Members
Posts: 137
Joined: 22-July 14
Member No.: 7220



I wanted to let you know of a project that I've been poking at for the past year. In an effort to streamline my own processing of raw MSL/Perseverance/InSight imaging, I created Mars Raw Utils (boring name, I know...). It has utilities for batch downloading images from the raw image websites and ILT/RAD/etc calibration. Calibration includes decompanding/LUT, debayer, flat fielding, blemish repair/inpainting, color correction, and hot pixel correction. I also made utilities for creating dust devil gifs, Photoshop/GIMP-like levels adjustments, cropping, focus merging, inpainting, and determining current mission date/time/sol. Calibration files are included in the installation and easily modified and/or replaced.

This is all done with the acknowledgment that the raw images are compressed and otherwise modified from the full mission data products so calibration is only a 'best effort' process and full PDS-quality output is not expected. The output is formatted with the expectation that you'll want to do additional processing in Gimp, Photoshop, etc.

It's all command-line driven, multi-platform, open source, and written in Rust.

Here's the project homepage on GitHub: https://github.com/kmgill/mars-raw-utils

And an overview/quickstart: https://github.com/kmgill/mars-raw-utils/wiki

I'm implementing new calibration steps as I get to them, though my latest efforts have been on implementing full support for CAHV/OR/E camera models and compositing.
Go to the top of the page
 
+Quote Post
Kevin Gill
post May 24 2022, 12:46 AM
Post #2


Member
***

Group: Members
Posts: 137
Joined: 22-July 14
Member No.: 7220



Since I posted that, in the master branch I've rolled all the commands into subcommands of a single binary 'mru' (in a manner similar to the 'git' command). This'll let me consolidate a bunch of stuff to remove duplicate code and makes the whole thing a little more consistent. I've updated the MSL, M20, InSight, and Dust Devil example scripts to reflect this change. I've also put in an anaglyph function for red/blue stereo pairs. The composite command autostitches mosaics. Both of these commands require a metadata file containing the CAHVOR camera components (automatically generated when downloading via 'mru msl-fetch ...' and 'mru m20-fetch ...'. Once I've done enough testing, I'll cut a release and upload new installers for Linux (deb, rpm), MacOS (Homebrew), and Windows.

-- Kevin


Test Anaglyph - MSL Sol 3476 Navcam
Go to the top of the page
 
+Quote Post
Sean
post May 26 2022, 09:06 PM
Post #3


Member
***

Group: Members
Posts: 923
Joined: 10-November 15
Member No.: 7837



Amazing work Kevin!


--------------------
Go to the top of the page
 
+Quote Post
Kevin Gill
post Jul 29 2022, 08:54 PM
Post #4


Member
***

Group: Members
Posts: 137
Joined: 22-July 14
Member No.: 7220



Pushed out release v0.5.2 of Mars Raw Utils yesterday. You can install from source or use the provided binaries for Linux (Ubuntu, Debian, Fedora), Windows, and MacOS (via Homebrew).

Project Website: https://github.com/kmgill/mars-raw-utils

Major changes for this release:
* Bug fixes
* Added 'info' subcommand:
CODE
$ mru info -i SI3_0511_0712329673_656ECM_N0261222SRLC08036_0000LMJ01.png
Image: "SI3_0511_0712329673_656ECM_N0261222SRLC08036_0000LMJ01.png"
Sol:                         511
Instrument:                  SHERLOC_WATSON
Image Id:                    SI3_0511_0712329673_656ECM_N0261222SRLC08036_0000LMJ
Date Taken (UTC):            2022-07-29T01:29:40.983
SCLK:                        712329733.872
Data Taken (Mars):           Sol-00511M19:24:15.080
Subframe Rectangle:          [33.0, 17.0, 1584.0, 1184.0]
Camera Model Type:           CAHVOR
Site:                        26
Drive:                       1222
Scale Factor:                1
Filter Name:                 OPEN
Mast Azimuth:                211.377
Mast Elevation:              -86.6125
Date Received:               2022-07-29T05:37:04Z
Sample Type:                 Full
Dimension:                   [1584.0, 1184.0]
Decompanded:                 No
Debayered:                   No
Flatfielded:                 No
Radiometric Correction:      No
Inpainted:                   No
Cropped:                     No
Credit:                      NASA/JPL-Caltech

* Added alpha/masking in compositing
* Added MER Opportunity and Spirit as mer-date subcommand
CODE
$ mru mer-date
MER-A / Spirit:
Mars Sol Date:          52816.3795700982
Coordinated Mars Time:  09:06:34.856
Mission Sol:            6600
Mission Time:           09:06:34.856 LMST
Local True Solar Time:  08:47:50.088 LTST
Solar Longitude:        275.40041567986765
-----------------------------------------------
MER-B / Opportunity:
Mars Sol Date:          52816.3795701195
Coordinated Mars Time:  09:06:34.858
Mission Sol:            6581
Mission Time:           08:05:28.820 LMST
Local True Solar Time:  07:46:44.052 LTST
Solar Longitude:        275.40041569355265

* Focus merge can create depth map using -d
Go to the top of the page
 
+Quote Post
JohnVV
post Jul 31 2022, 02:30 PM
Post #5


Member
***

Group: Members
Posts: 890
Joined: 18-November 08
Member No.: 4489



QUOTE (Kevin Gill @ Jul 29 2022, 03:54 PM) *
Pushed out release v0.5.2 of Mars Raw Utils yesterday. You can install from source or use the provided binaries for Linux (Ubuntu, Debian, Fedora), Windows, and MacOS (via Homebrew).

Normally i use isis but i will have a look at your tools and let you know if the rpm will also run on OpenSUSE 15.3
Go to the top of the page
 
+Quote Post
Kevin Gill
post Jul 31 2022, 11:08 PM
Post #6


Member
***

Group: Members
Posts: 137
Joined: 22-July 14
Member No.: 7220



QUOTE (JohnVV @ Jul 31 2022, 09:30 AM) *
Normally i use isis but i will have a look at your tools and let you know if the rpm will also run on OpenSUSE 15.3


Thanks! If it doesn't install and you're not comfortable with installing from source I can probably set up a build within a Docker container (which is how I'm making the RPM now as I'm running Ubuntu at the moment).
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 19th March 2024 - 10:35 AM
RULES AND GUIDELINES
Please read the Forum Rules and Guidelines before posting.

IMAGE COPYRIGHT
Images posted on UnmannedSpaceflight.com may be copyrighted. Do not reproduce without permission. Read here for further information on space images and copyright.

OPINIONS AND MODERATION
Opinions expressed on UnmannedSpaceflight.com are those of the individual posters and do not necessarily reflect the opinions of UnmannedSpaceflight.com or The Planetary Society. The all-volunteer UnmannedSpaceflight.com moderation team is wholly independent of The Planetary Society. The Planetary Society has no influence over decisions made by the UnmannedSpaceflight.com moderators.
SUPPORT THE FORUM
Unmannedspaceflight.com is funded by the Planetary Society. Please consider supporting our work and many other projects by donating to the Society or becoming a member.