| Bsoft 2.0.5 Bernard's software package

Functions | Variables
balign.cpp File Reference

Aligns two images. More...

`#include "rwimg.h"`
`#include "ps_marker.h"`
`#include "linked_list.h"`
`#include "options.h"`
`#include "utilities.h"`
`#include "timer.h"`

Go to the source code of this file.

## Functions
Transform | img_align (Bimage *p1, Bimage *p2, Vector3< long > tile_size, double res_lo, double res_hi, double max_shift, int filter_flag, int refine_flag)
| Aligns the second image to the first. More...
int | main (int argc, char *argv[])

## Variables
int | verbose
const char * | use []

## Detailed Description

Aligns two images.

Author
  Bernard Heymann

Date
  Created: 20021111
  Modified: 20160603

Definition in file balign.cpp.

## Function Documentation

## ◆ img_align()

Transform img_align | ( | Bimage * | p1,
|  | Bimage * | p2,
|  | Vector3< long > | tile_size,
|  | double | res_lo,
|  | double | res_hi,
|  | double | max_shift,
|  | int | filter_flag,
|  | int | refine_flag
| ) |  |

Aligns the second image to the first.

Parameters

  *p1 | first image.
  *p2 | second image (transformed)
  tile_size | 3-valued vector for the size of sub-images.
  res_lo | low resolution limit for cross-correlation.
  res_hi | high resolution limit for cross-correlation.
  max_shift | maximum shift allowed (default 1/4 of tile).
  filter_flag | flag to filter micrograph extremes.
  refine_flag | flag to turn on refinement of shift.

Returns
  Transform structure with shift, scale, rotation angle, and R factor.

      The second image is transformed to fit on the first image.

Definition at line 145 of file balign.cpp.

## ◆ main()

int main | ( | int | argc,
|  | char * | argv[]
| ) |  |

Definition at line 45 of file balign.cpp.

## Variable Documentation

## ◆ use

const char* use[]

Initial value:
= {
" ",
"Usage: balign [options] input1.img input2.img output.img",
"--------------------------------------------------------",
"The second input image is aligned to the first, transformed and output.",
"(Note: This program is intended to align very large micrograph images).",
" ",
"Actions:",
"-add Add input images after transforming the second.",
"-filterextremes Filter micrograph extremes before aligning.",
" ",
"Parameters:",
"-verbose 7 Verbosity of output.",
"-datatype u Force writing of a new data type.",
"-sampling 1.5,1.5,1.5 Sampling (A/pixel; a single value can be given).",
"-tile 1024,1024,5 Size of tiles for correlation (default 512,512,1).",
"-resolution 30,500 High and low resolution limits for cross-correlation (default 0.1,1000).",
"-maxshift 55 Maximum allowed shift (default 1/4 of tile).",
" ",
NULL
}

Definition at line 23 of file balign.cpp.

## ◆ verbose

int verbose