Automatic Movement Correction¶
Calculate Movement Correction¶
Click the to start the Automatic Movement Correction (AMC) function. AMC will start from the current frame, or the Selecting Video start frame if greater, up to the end of the video or up to the end of the Selecting Video if set.
If the original method is used, this could take about 1 second per frame, which would be 30 times the recording duration depending on cpu speed.
A text logfile is created in the same folder with the same mve filename plus .amclog.txt
.
AMC Reference Regions¶
Click the to edit or add AMC reference regions. Each region will use the image data from the current image only, using its current offset. Therefore video with large movements can be tracked by adding extra reference regions just before AMC tracking is lost.
- The process is:
draw one or more small regions around vessels to be tracked.
start AMC using
stop the AMC when tracking is lost.
scroll the video back to the last good correction.
add one or more regions as in step 1 and repeat steps 2 to 5.
Minimum region dimension is 64 pixels.
At the end of the AMC calculation, the reference image is saved in the same folder with the same filename plus -AMCbase.cs1
.
Manually Adjust Movement Correction¶
Movement correction for individual images can be adjusted by using the toolbar button and then drag the image whilst holding the LEFT mouse button. Hold down the SHIFT keyboard button when releasing the LEFT mouse button.
Releasing the LEFT mouse button without holding down the SHIFT key will apply the dragged correction to all following images up to the end of the video or up to the end of the Selecting Video if set.
When dragging, the square of differences is shown, and the rms error is displayed. Usually the minimum rms error would indicate the best movement correction.
Movement Correction Settings¶
Use menu Settings
, Auto Movement Correction...
Method¶
- Fast method use whole image
(default) Uses the reference window from the reference image and finds the minima by walking and moving though the current image pixel by pixel to find the best match.
- Fast method use AMC regions
same as above but only uses the AMC regions created using the Edit AMC toolbar button or menu
Tools
,Edit AMC regions
. If the movement correction is lost due to moving beyond the existing regions, stop and add more regions. See AMC Reference Regions
- Original method
Use the original method introduced in CapiScope in 2002. This calculates a least square fit over all pixels as defined in the Settings for Original method using full image below.
- Show progress with whole image (slower)
check this to show the progress as the movement correction offsets are calculated. This is slower, but allows the user to cancel (abort) the calculation. Offsets already calculated are retained. Uncheck for a quicker calculation but without any indication of progress nor any option to stop the calculation.
- Auto Threshold
Enable this to automatically calculate the rms error threshold from the correlation between the start image and the next image.
- Fast method rms error threshold.
Raise to allow a poorer fit before stopping correction. Not used when Auto Threshold enabled. Default = 15
- Restart at threshold failure
Enable this to retry AMC using the previous image as the reference image when the threshold is not reached.
- Fast method reference window size as % of image size.
Default = 50
Reference image¶
- Auto
Default. If the movement correction has moved beyond the reference window by exceeding the x or y limits, the current image is set as the new reference image. The x and y limits are calculated as 0.5*(image size - reference window size). The 0.5 factor can be adjusted in the ini file [movement] mclimit2=50
- Previous image
Always correct to the previous image
- Always first image
Always correct to the first image.
Settings for Original method using full image¶
- Reference window size (% of image size, centred in image). Larger will slow processing, but may include more features to correlate to.
Default = 50
- Step between pixels in resolution window. 1= use every pixel, 2 every other pixel etc. Increase this value to speed up processing.
Default = 8
Method¶
- Random points
points to correlate spaced randomly.
- Grid of points
Default. Points spaced out evenly.
- Grid of lines
use whole vertical and horizontal lines spaced evenly.
- Low pass filter window size. Filters image before correlating image. Use zero for no filtering.
Default = 5
- Range to check movement over (%of image size). Larger will slow processing, but will follow faster movements.
Default = 10
- Resolution (in pixels/lines). Coarser (larger value) will speed up processing but at expense of coarse movement correction.
Default = 1
- Limit (%of range). When movement exceeds this limit, the current image becomes the new reference image.
Default = 50
Note
CapiScope version 4.53