estimate_memory_usage#

estimate_memory_usage(shape1, shape2, matching_method, ncores, analyzer_method=None, backend=None, float_nbytes=4, complex_nbytes=8, integer_nbytes=4)[source]#

Estimate the memory usage for a given template matching operation.

Parameters:
shape1tuple

Shape of the target array.

shape2tuple

Shape of the template array.

matching_methodstr

Matching method to estimate memory usage for.

analyzer_methodstr, optional

The method used for score analysis.

backendstr, optional

Backend used for computation.

ncoresint

The number of CPU cores used for the operation.

float_nbytesint

Number of bytes of the used float, defaults to 4 (float32).

complex_nbytesint

Number of bytes of the used complex, defaults to 8 (complex64).

integer_nbytesint

Number of bytes of the used integer, defaults to 4 (int32).

Returns:
int

The estimated memory usage for the operation in bytes.

Raises:
ValueError

If an unsupported matching_method is provided.