Code Record

2017-05-10

[DOI: 10.21982/M8JS3F ] MCC
Emery, William
MCC Software Package Jianfei Liu (jfliu@whu.edu.cn) and W.J. Emery (emery@colorado.edu) 1. MCC Motion Algorithm The Maximum Cross-correlation (MCC) method cross-correlates a template sub-window in an initial image with all possible sub-windows of the same size that fall within a larger search window of a second image. The location of the sub-window in the second image that produces the highest cross-correlation with the sub-window in the first image indicates the displacement of that feature. The velocity vector is then calculated by dividing the displacement vector by the time separation between the two images. More details are in the following paper. Reference: Emery, W.J., A.C. Thomas, M.J. Collins, W.R. Crawford and D.L. Mackas, 1986: An objective procedure to compute advection from sequential infrared satellite images. J. Geophys. Res., 91 (color issue), 12,865-12,879. 2. About the Software Package Before running this MCC Package, you need to have a good understanding of the MCC method. The input images need to be calibrated and gridded to the same geolocation. Here we use brightness temperature (BT) imagery derived from AVHRR as a test. You also can try other imagery according to your interests. But remember to make sure the imagery is well calibrated and geolocated. This package includes .sh, .csh and C/C++ codes. The main code of the MCC is motion.c. These codes successfully run under the Linux system (Red Hat Enterprise Linux Workstation). The vector generating software consists of the following software pieces: 1) motion.c: this reads a parameter file and two image files and generates an ascii vector file. The motion is driven by automotion_West (csh file). To compile do: cc motion.c -o motion -lm 2) mp--- The parameter file used by motion...this is described in more detail below. 3) runfiles--- The name of the first image and second image, time interval between them and the output name of the vectors 4) filt_nnvel.cxx: A program which reads a parameter file and filters the vector file to eliminate spurious vectors. The filt_nnvel is driven by postproc (csh file). To compile do: g++ filt_nnvel.cxx -o filt_nnvel 5) filt.in: The parameter file for filt_nnvel To generate motion vector files from ocean color or sea surface temperature images perform the following: 1) EDIT THE mp FILE EXAMPLE mp file with the parameters that we usually use: 1024,1024 , (image size) 22,22 , (template window) 22 (search window) 0, 0 , 0, 0 , 11 2400, 3200 , (cloud filter) 12.5