deepLocalPatchMatch: locally constrained deep feature patch matching

View source: R/patchMatch.R

deepLocalPatchMatchR Documentation

locally constrained deep feature patch matching

Description

High-level function for deep patch matching constrained to be local.

Usage

deepLocalPatchMatch(
  movingImage,
  fixedImage,
  movingImageMask,
  fixedImageMask,
  patchSize = 32,
  knn = 1,
  localSearchRadius = 5,
  nSamples,
  block_name = "block2_conv2",
  kPackage = "RcppHNSW",
  verbose = FALSE
)

Arguments

movingImage

input image from which we extract patches that are transformed to the space of the fixed image

fixedImage

input image that provides the fixed reference domain.

movingImageMask

defines the object of interest in the movingImage

fixedImageMask

defines the object of interest in the fixedImage

patchSize

integer greater than or equal to 32.

knn

k-nearest neighbors ( should be >= 1 )

localSearchRadius

radius value passed to makePointsImage

nSamples

number of local samples (optional), can speed things up at the cost of some accuracy

block_name

name of vgg feature block, either block2_conv2 or integer. use the former for smaller patch sizes.

kPackage

name of package to use for knn

verbose

boolean

Value

correspondence data

Author(s)

Avants BB

Examples


library( keras )
library( ANTsR )
nP1 = 5
nP2 = 20
psz = 32
img <- ri( 1 ) %>% iMath( "Normalize" )
img2 <- ri( 2 ) %>% iMath( "Normalize" )
mask = randomMask( getMask( img ), nP1 )
mask2 = randomMask( getMask( img2 ), nP2 )
match = deepLocalPatchMatch( img2, img, mask, mask2 )


stnava/patchMatchR documentation built on March 23, 2022, 6:47 a.m.