Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

ISIS Documentation

center

Compute the center of mass of a single-band cube

This program computes the sample and line of the center of mass (weighted by pixel value) of a single-band cube. The sample and line of the centroid, as well as the offset from the image center, are output in PVL. In addition if the TO parameter is specified this program will ouput a single-band cube of the same size with the center of mass of the input cube at the center of the image frame. The primary purpose of this program is to align multiple images of an object for a movie, such as images taken on approach. This program is best used with objects against a dark background.

Categories


Related Objects and Documents

Applications


History

Kris Becker2014-12-25 Original version
Jeffrey Covington2015-02-19 Added more documentation and restricted center to single-band cubes.

Parameters

Files

Use this parameter to select the filename. Only one band is allowed in the input cube.
Type cube
File Mode input
Filter *.cub

If specified this file will contain the results of the centered cube.
Type cube
File Mode output
Internal Default None
Inclusions
  • INTERP
Filter *.cub

This will be the interpolation type used to get the output file in either the translate or warp application. Defaults to CUBICCONVOLUTION.
Type string
Default CUBICCONVOLUTION
Option List:
Option Brief Description
NEARESTNEIGHBOR Nearest Neighbor Interpolation Nearest Neighbor Interpolation will be used in the transformation to create the output file.
BILINEAR Bilinear Interpolation Bilinear Interpolation will be used in the transformation to create the output file.
CUBICCONVOLUTION Cubic Convolution Interpolation Cubic Convolution Interpolation will be used in the tranformation to create the output file.

Minimum DN in the image to consider for computation of the center of mass. This can be helpful to eliminate background data.
Type double
Internal Default ValidMin
Less Than MAXIMUM

Maximum DN to consider in computation of center of mass. This can be used to eliminate high saturation that would otherwise bias the centroid calculation.
Type double
Internal Default ValidMax

Example 1

Centering object against dark background.

This example shows centering a body against a dark background.

Command Line

Center the input image about the center of mass using the default interpolation.
center center from=EN0131836960M_iof.cub to=centered.cub

GUI Screenshot

Mirror Gui

Example Gui

Mirror Gui

Screenshot of GUI with parameters filled in to perform a center operation on the input image.

Input Image

Input image

Input image for center

Input image

Parameter Name: FROM

This is the 512 by 512 input image for the center example.

Output Image

Output image showing results of the center application.

Output image for mirror

Output image showing results of the center application.

Parameter Name: TO

This is the 512 by 512 output image that results.