noproj
Removes camera distortions in a raw level 1 cube creating an ideal version of the cube.
Noproj reprojects a level1 cube to correct for camera distortion. The result is a level1 cube of the undistorted image in "Ideal" camera space.
Both cubes (FROM and MATCH) must see the same target. Each requires SPICE data and should be processed with spiceinit prior to running noproj.
The Ideal camera geometry is derived from the MATCH cube. If the coordinate (lat/long) at each pixel in the MATCH cube maps to a lat/long coordinate in the FROM cube, then the pixel value at the mapped coordinate in the FROM cube is projected into the TO cube, with some interpolation due to the distortion correction. The default behavior is that any offbody pixels in the MATCH and the FROM cube are set to null in the TO cube. See OFFBODY and OFFBODYTRIM for alternative options for mapping offbody data. Also see cam2cam as noproj parameters are passed to cam2cam.
This program will modify the cube labels for the Ideal camera. The original Instrument group is renamed OriginalInstrument and a new instrument group is created for the Ideal Camera. The cube data is modified when this program runs cam2cam, creating the noproj'ed output cube with camera distortions removed.
Note that noproj will not propagate AlphaCube groups from the MATCH cube into the TO cube since noproj is resampling the image.
Categories
Related Applications to Previous Versions of ISIS
This program replaces the following application existing in previous versions of ISIS:- noproj
Related Objects and Documents
Applications
History
| Debbie A. Cook | 2006-11-14 | Original version |
| Debbie A. Cook | 2007-02-13 | Corrected for case where original instrument has negative affine coefficients |
| Debbie A. Cook | 2007-04-24 | Added INTERP option, fixed SPECS parameter to allow user to override the default and enter a file, and updated the documentation |
| Debbie A. Cook | 2007-05-21 | Changed category to Cameras |
| Debbie A. Cook | 2007-06-12 | Corrected order of SetInputCube calls to set the MATCH cube first if is entered so that the labels on the cube to match are propagated from it and not the from cube |
| Debbie A. Cook | 2007-08-31 | Turned off propagation of the polygon blobs because the file name contains "/" from the serial number and unix does not allow "/". Also added a remove of the match file OriginalInstrument group written by cam2cam before writing the input OriginalInstrument. hijitreg reads the input CcdId from this group. |
| Steven Lambright | 2008-05-13 | Removed references to CubeInfo |
| Debbie A. Cook | 2009-01-26 | Completed applying summing mode to ideal camera by applying it to the sample/line translations. |
| Debbie A. Cook | 2009-03-25 | Fixed setting of et to correspond to first line of parent (Alpha cube) |
| Debbie A. Cook | 2012-07-06 | Updated Spice members to be more compliant with Isis coding standards. References #972. |
| Steven Lambright | 2012-09-10 | This program will now modify the NaifKeywords object, if it exists, instead of the instrument group with the following keywords: TransX (becomes IDEAL_TRANSX), TransY (becomes IDEAL_TRANSY), TransS0 (becomes IDEAL_TRANSS), TransL0 (becomes IDEAL_TRANSL), PixelPitch (becomes IDEAL_PIXEL_PITCH), and FocalLength (becomes IDEAL_FOCAL_LENGTH). Fixes #1094. |
| Ian Humphrey | 2017-08-19 | No longer propagates AlphaCube group to output cube. Fixes #4907. |
| Kris Becker | 2019-01-28 | Add OFFBODY option to also project off-body pixels. Added the OFFBODYTRIM option to not propagate target intersections in the FROM image into the projection when they don't intersect into the MATCH view. Added use of unique temporary name creation for the match file template to avoid file name collisions (e.g., when run in parallel in same directory) |
| Kaitlyn Lee | 2021-03-31 | Refactored app to be callable and converted its tests to GTests. |
| Kris Becker | 2021-05-06 | Added checks for ray tracing options in UofA OSIRIS-REx ISIS code base. The keywords needed for Bullet to operate properly are RayTraceEngine, BulletParts, and Tolerance. These parameters must be included in the output label in order for cam2cam to run and subsequent use is consistent. |
| Kris Becker | 2021-09-22 | Rework how temporary external files are identified in UofA OSIRIS-REx ISIS code base after use by cam2cam and ensure they are all deleted. Fixes #4813. |
| Ken Edmundson | 2023-12-14 | Incorporated Kris Becker's 2021-05-06 bug fix above into USGS code base. |
| Ken Edmundson | 2024-01-09 | Incorporated Kris Becker's 2021-09-22 bug fix above into USGS code base. |
| Ken Edmundson | 2024-08-07 | Additional bug fix to address persistent temporary lbl file after running noproj. Fixes #5577. |
| Sarah Sutton | 2025-04-30 | Incorporated Kris Becker's keyword additions OFFBODY and OFFBODYTRIM of 1/16/2019 and 1/28/2019 from UofA codebase to Astrogeology. Added examples and updated documentation. Addresses #3602. |
Parameters
Files
| Type | cube |
|---|---|
| File Mode | input |
| Filter | *.cub |
| Type | cube |
|---|---|
| File Mode | input |
| Internal Default | Match cube |
| Filter | *.cub |
| Type | filename |
|---|---|
| File Mode | input |
| Default Path | $ISISROOT/appdata/templates/noproj/ |
| Internal Default | SystemDefault |
| Filter | *.pvl |
| Type | cube |
|---|---|
| File Mode | output |
Output Summing Mode
| Type | string | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Default | FROMMATCH | ||||||||||||
| Option List: |
|
| Type | double |
|---|---|
| Minimum | 1.0 (inclusive) |
Options
| Type | string | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Default | CUBICCONVOLUTION | ||||||||||||
| Option List: |
|
| Type | double |
|---|---|
| Default | 0.0 |
| Type | double |
|---|---|
| Default | 0.0 |
| Type | boolean |
|---|---|
| Default | FALSE |
| Type | boolean |
|---|---|
| Default | TRUE |
Example 1
Demonstrate the effects of the OFFBODY and OFFBODYTRIM parameters
Input images
Command Line for running noproj on long exposure image
Here, OFFBODY=TRUE and OFFBODYTRIM=FALSE to preserve the pixels in the space around Bennu, including the ejected particles. Note that the same cube is used for both FROM and MATCH parameters.
Command Line for running noproj on short exposure image
Here, OFFBODY and OFFBODYTRIM are FALSE. OFFBODY is set to FALSE to set all pixels off the target body to null. The noproj'ed long exposure output is used as the MATCH cube. The specifications file (specs.pvl) is required because the MATCH cube has been run through noproj and is now identified as an "Ideal" camera in the label. The specifications file contains the undistorted (Ideal camera) detector dimensions. In this case:
Object = IdealInstrumentsSpecifications
Group = "IdealSpacecraft/IdealCamera"
DetectorSamples = 3050
DetectorLines = 2404
End_Group
End_Object
End
Output images
Null pixels are shown in yellow to illustrate the undistorted image outline.
Mosaic the noproj'ed long and short exposures
To see the ejected particles and the surface of Bennu in the same scene, we mosaicked the short exposure cube on top of the long exposure cube using handmos. In the image shown, both noproj'ed cubes have been contrast-stretched, but only at a rudimentary level. This example does not reproduce the full processing required to generate the figure in the article referenced above, but it does illustrate a case where it is necessary to preserve off-body pixels.
Particle ejection observations mosaic
OSIRIS-REx NavCam image 20190106T205611S433_ncm_L0 combined with 20190106T205618S792_ncm_L0.
To Reproduce This Example
Download the shell script, the ray tracer preference file, and the Ideal camera specifications file linked here. The ray trace preference file sets the ray trace library to Bullet rather than NAIF DSK (default for shape models with a ".bds" file extension) as Bullet will detect occlusions. The specifications file defines the size of the distortion-corrected NavCam image, which after running noproj is identified as the "Ideal" camera model. Before running the script, place the preference and specification files in $ISISROOT. The script will download and move the OSIRIS-REx DSK (shapemodel) kernel into $ISISDATA. See the ISIS documentation for instructions on downloading $ISISDATA for a specific mission.

