QTrk
|
Class with all CPU algorithm implementations. More...
#include <cpu_tracker.h>
Classes | |
class | FFT2D |
Class to facilitate 2D Fourier transforms. More... | |
struct | Gauss2DResult |
Structure to group results from the 2D Gaussian fit. More... | |
Public Types | |
enum | LUTProfileMaxComputeMode { LUTProfMaxQuadraticFit, LUTProfMaxSplineFit, LUTProfMaxSimpleInterp } |
Settings to compute the Z coordinate from the error curve. More... | |
Public Member Functions | |
float * | GetRadialZLUT (int index) |
Get the start of the ZLUT of a specific bead. More... | |
float & | GetPixel (int x, int y) |
Get the image pixel greyscale value at point (x,y). More... | |
int | GetWidth () |
Get the width of the image. More... | |
int | GetHeight () |
Get the height of the image. More... | |
CPUTracker (int w, int h, int xcorwindow=128, bool testRun=false) | |
Create an instance of CPUTracker. More... | |
~CPUTracker () | |
Destroy a CPUTracker instance. More... | |
bool | CheckBoundaries (vector2f center, float radius) |
Test to see if a circle extends outside of image boundaries. More... | |
vector2f | ComputeXCorInterpolated (vector2f initial, int iterations, int profileWidth, bool &boundaryHit) |
Compute the cross correlation offsets and resulting position. More... | |
vector2f | ComputeQI (vector2f initial, int iterations, int radialSteps, int angularStepsPerQuadrant, float angStepIterationFactor, float minRadius, float maxRadius, bool &boundaryHit, float *radialweights=0) |
Execute the quadrant interpolation algorithm. More... | |
Gauss2DResult | Compute2DGaussianMLE (vector2f initial, int iterations, float sigma) |
Calculate a 2D Gaussian fit on the image. More... | |
scalar_t | QI_ComputeOffset (complex_t *qi_profile, int nr, int axisForDebug) |
QI helper function to calculate the offset from concatenated profiles. More... | |
scalar_t | QuadrantAlign_ComputeOffset (complex_t *profile, complex_t *zlut_prof_fft, int nr, int axisForDebug) |
QA helper function to calculate the offset from concatenated profiles. More... | |
float | ComputeAsymmetry (vector2f center, int radialSteps, int angularSteps, float minRadius, float maxRadius, float *dstAngProf=0) |
Find a measure for the asymmetry of the ROI. More... | |
template<typename TPixel > | |
void | SetImage (TPixel *srcImage, uint srcpitch) |
Set the image on which to perform the tracking. More... | |
void | SetImage16Bit (ushort *srcImage, uint srcpitch) |
Set an image with 16 bit type. More... | |
void | SetImage8Bit (uchar *srcImage, uint srcpitch) |
Set an image with 8 bit type. More... | |
void | SetImageFloat (float *srcImage) |
Set an image with float type. More... | |
void | SaveImage (const char *filename) |
Save the tracker's image to a jpg file. More... | |
vector2f | ComputeMeanAndCOM (float bgcorrection=0.0f) |
Calculate the center of mass of the image. More... | |
void | ComputeRadialProfile (float *dst, int radialSteps, int angularSteps, float minradius, float maxradius, vector2f center, bool crp, bool *boundaryHit=0, bool normalize=true) |
Wrapper to compute a radial profile. More... | |
void | ComputeQuadrantProfile (scalar_t *dst, int radialSteps, int angularSteps, int quadrant, float minRadius, float maxRadius, vector2f center, float *radialWeights=0) |
Wrapper to compute a radial profile. More... | |
float | ComputeZ (vector2f center, int angularSteps, int zlutIndex, bool *boundaryHit=0, float *profile=0, float *cmpprof=0, bool normalizeProfile=true) |
Helper function to calculate the Z position. More... | |
void | FourierTransform2D () |
Calculate a 2D fourier transform of the tracker's image. More... | |
void | FourierRadialProfile (float *dst, int radialSteps, int angularSteps, float minradius, float maxradius) |
Calculate the radial profile based on the fourier transform. More... | |
void | Normalize (float *image=0) |
Normalize an image. More... | |
void | SetRadialZLUT (float *data, int planes, int res, int num_zluts, float minradius, float maxradius, bool copyMemory, bool useCorrelation) |
Tell the tracker where in memory the LUT is located. More... | |
void | SetRadialWeights (float *radweights) |
Set the radial weights to be used for profile comparisons. More... | |
void | CalculateErrorCurve (double *errorcurve_dest, float *profile, float *zlut_sel) |
Calculate the error curve from a specific profile and LUT. More... | |
void | CalculateInterpolatedZLUTProfile (float *profile_dest, float z, int zlutIndex) |
Calculates an intermediate ZLUT profile between two planes. More... | |
float | CalculateErrorFlag (double *prof1, double *prof2) |
WIP. Calculate the error flag between two profiles. More... | |
float | LUTProfileCompare (float *profile, int zlutIndex, float *cmpProf, LUTProfileMaxComputeMode maxPosMethod, float *fitcurve=0, int *maxPos=0, int frameNum=0) |
Compare a profile to a LUT and calculate the optimum Z value for it. More... | |
float | LUTProfileCompareAdjustedWeights (float *rprof, int zlutIndex, float z_estim) |
Compare a profile to a LUT and calculate the optimum Z value for it using an initial estimate. More... | |
float * | GetDebugImage () |
Get the debug image. More... | |
void | ApplyOffsetGain (float *offset, float *gain, float offsetFactor, float gainFactor) |
Scale the input image with the background calibration values. More... | |
void | AllocateQIFFTs (int nsteps) |
Initializes the fft handles. More... | |
vector3f | QuadrantAlign (vector3f initial, int beadIndex, int angularStepsPerQuadrant, bool &boundaryHit) |
Perform the quadrant align algorithm. More... | |
Public Attributes | |
int | width |
ROI width. More... | |
int | height |
ROI height. More... | |
int | xcorw |
Cross correlation profile length. More... | |
int | trackerID |
ID of this tracker (= ID of thread it runs in). More... | |
float * | srcImage |
Memory region that holds the image on which tracking is to be performed. More... | |
float * | debugImage |
Memory in which an intermediate image can optionally be place and retrieved. More... | |
float | mean |
Mean intensity of the ROI. Calculated in ComputeMeanAndCOM. More... | |
float | stdev |
Standard deviation of values in the ROI. Calculated in ComputeMeanAndCOM. More... | |
float * | zluts |
Pointer to the first data in the ZLUTs. More... | |
bool | zlut_memoryOwner |
Flag indicating if this instance is the owner of the zluts memory, or is it external. False in all normal operation. More... | |
int | zlut_planes |
Number of planes per ZLUT. More... | |
int | zlut_res |
ZLUT resolution = number of radial steps in a plane. More... | |
int | zlut_count |
Number of ZLUTs (= # beads) available. More... | |
float | zlut_minradius |
Minimum radius in pixels to start sampling for a ZLUT profile. More... | |
float | zlut_maxradius |
Maximum radius in pixels of the ZLUT profile sampling circle. More... | |
std::vector< float > | zlut_radialweights |
Vector with the radialweights used by the error curve calculation. More... | |
kissfft< scalar_t > * | qa_fft_forward |
Handle to forward FFT kissfft instance for quadrant align. More... | |
kissfft< scalar_t > * | qa_fft_backward |
Handle to backward FFT kissfft instance for quadrant align. More... | |
bool | testRun |
Flag to enable running a test run. More... | |
XCor1DBuffer * | xcorBuffer |
The handle from which to perform cross correlation calculations. More... | |
std::vector< vector2f > | quadrantDirs |
Vector with the sampling points for a single quadrant (cos & sin pairs). More... | |
int | qi_radialsteps |
Number of radialsteps in the QI calculations. More... | |
kissfft< scalar_t > * | qi_fft_forward |
Handle to forward FFT kissfft instance for QI. More... | |
kissfft< scalar_t > * | qi_fft_backward |
Handle to backward FFT kissfft instance for QI. More... | |
FFT2D * | fft2d |
Instance of FFT2D to perform 2D FFTs. More... | |
Class with all CPU algorithm implementations.
Has one ROI in its memory (srcImage) and the correct member functions are called from its parent's QueuedCPUTracker::ProcessJob. All functions work on the image in memory. Many of the settings that appear here come from QTrkComputedConfig and are further explained there.
Definition at line 38 of file cpu_tracker.h.
Settings to compute the Z coordinate from the error curve.
Enumerator | |
---|---|
LUTProfMaxQuadraticFit | Default. Use a 7-point quadratic fit around the error curve's maximum. |
LUTProfMaxSplineFit | Compute a spline fit. |
LUTProfMaxSimpleInterp | Unimplemented. |
Definition at line 378 of file cpu_tracker.h.
CPUTracker::CPUTracker | ( | int | w, |
int | h, | ||
int | xcorwindow = 128 , |
||
bool | testRun = false |
||
) |
Create an instance of CPUTracker.
[in] | w | Image width. |
[in] | h | Image height. |
[in] | xcorwindow | Cross correlation window size. |
[in] | testRun | Flag for test run. See QTrkSettings::testRun. |
Definition at line 39 of file cpu_tracker.cpp.
CPUTracker::~CPUTracker | ( | ) |
Destroy a CPUTracker instance.
Definition at line 64 of file cpu_tracker.cpp.
void CPUTracker::AllocateQIFFTs | ( | int | nsteps | ) |
Initializes the fft handles.
Readies qi_fft_forward and qi_fft_backward for use.
[in] | nsteps | The number of radial steps per profile. FFT length is 2 * nsteps. |
Definition at line 247 of file cpu_tracker.cpp.
void CPUTracker::ApplyOffsetGain | ( | float * | offset, |
float * | gain, | ||
float | offsetFactor, | ||
float | gainFactor | ||
) |
Scale the input image with the background calibration values.
See QueuedTracker::SetPixelCalibrationImages() for more information.
[in] | offset | Array with per-pixel offsets. |
[in] | gain | Array with per-pixel gains. |
[in] | offsetFactor | Factor by which to scale the offsets. |
[in] | gainFactor | Factor by which to scale the gains. |
Definition at line 95 of file cpu_tracker.cpp.
void CPUTracker::CalculateErrorCurve | ( | double * | errorcurve_dest, |
float * | profile, | ||
float * | zlut_sel | ||
) |
Calculate the error curve from a specific profile and LUT.
[out] | errorcurve_dest | Pre-allocated output array of size zlut_planes which will be filled with the error curve. |
[in] | profile | Array with the profile to compare against the LUT. |
[in] | zlut_sel | Pointer to the first element of the selected LUT. |
Definition at line 776 of file cpu_tracker.cpp.
float CPUTracker::CalculateErrorFlag | ( | double * | prof1, |
double * | prof2 | ||
) |
WIP. Calculate the error flag between two profiles.
[in] | prof1 | The first profile. Typically the measured profile. |
[in] | prof2 | The second profile. Typically a profile from the LUT. |
Definition at line 833 of file cpu_tracker.cpp.
void CPUTracker::CalculateInterpolatedZLUTProfile | ( | float * | profile_dest, |
float | z, | ||
int | zlutIndex | ||
) |
Calculates an intermediate ZLUT profile between two planes.
At each radial step, the value is linearly interpolated based on the two nearest saved profiles. Use to obtain estimated profiles at non-integer z values.
[out] | profile_dest | Pre-allocated output array of size zlut_res which will be filled with the error curve. |
[in] | z | The height at which to determine the expected profile. |
[in] | zlutIndex | The index of the zlut/bead. |
Definition at line 819 of file cpu_tracker.cpp.
bool CPUTracker::CheckBoundaries | ( | vector2f | center, |
float | radius | ||
) |
Test to see if a circle extends outside of image boundaries.
[in] | center | The center of the circle to test. |
[in] | radius | The radius of the circle. |
Definition at line 157 of file cpu_tracker.cpp.
CPUTracker::Gauss2DResult CPUTracker::Compute2DGaussianMLE | ( | vector2f | initial, |
int | iterations, | ||
float | sigma | ||
) |
Calculate a 2D Gaussian fit on the image.
[in] | initial | The initial position from which to start the algorithm. |
[in] | iterations | The number of iterations to perform. |
[in] | sigma | Expected standard deviation of the gaussian fit. |
Definition at line 497 of file cpu_tracker.cpp.
float CPUTracker::ComputeAsymmetry | ( | vector2f | center, |
int | radialSteps, | ||
int | angularSteps, | ||
float | minRadius, | ||
float | maxRadius, | ||
float * | dstAngProf = 0 |
||
) |
Find a measure for the asymmetry of the ROI.
The center of mass of each radial line (see further explanation of the QI algorithm) is calculated. The standard deviation of these COMs is returned as a measure of the asymmetry.
See QTrkComputedConfig for more information on the settings.
[in] | center | The center of the sampling area. |
[in] | radialSteps | The number of radial steps per spoke. |
[in] | angularSteps | The number of angular steps to take. |
[in] | minRadius | Minimum sampling radius in pixels. |
[in] | maxRadius | Maximum sampling radius in pixels. |
[in] | dstAngProf | Optional. Pre-allocated array to hold the calculated COMs. |
Definition at line 575 of file cpu_tracker.cpp.
vector2f CPUTracker::ComputeMeanAndCOM | ( | float | bgcorrection = 0.0f | ) |
Calculate the center of mass of the image.
Also calculates and saves the mean and standard deviation of the image. Always performed as first step in localization for a first guess.
The moments are calculated as absolute values around the mean. An optional background correction is possible by only taking into account outliers.
[in] | bgcorrection | Factor of standard deviation not to take into account for the center of mass calculation. Default is 0. |
Definition at line 661 of file cpu_tracker.cpp.
vector2f CPUTracker::ComputeQI | ( | vector2f | initial, |
int | iterations, | ||
int | radialSteps, | ||
int | angularStepsPerQuadrant, | ||
float | angStepIterationFactor, | ||
float | minRadius, | ||
float | maxRadius, | ||
bool & | boundaryHit, | ||
float * | radialweights = 0 |
||
) |
Execute the quadrant interpolation algorithm.
See [3] for algorithm details. See QTrkComputedConfig for more information on the settings.
[in] | initial | The initial position from which to start the algorithm. |
[in] | iterations | The number of iterations to perform. |
[in] | radialSteps | Amount of radial steps per quadrant profile. |
[in] | angularStepsPerQuadrant | Amount of angular sampling steps per profile. |
[in] | angStepIterationFactor | Angular step iteration factor, see QTrkSettings::qi_angstep_factor. |
[in] | minRadius | Minimum radius of the sampling area in pixels. |
[in] | maxRadius | Maximum radius of the sampling area in pixels. |
[in,out] | boundaryHit | Pre-allocated bool that will be set to true if the image boundaries have been exceeded during sampling. |
[in] | radialweights | Array of the radial weights to use. |
Definition at line 260 of file cpu_tracker.cpp.
void CPUTracker::ComputeQuadrantProfile | ( | scalar_t * | dst, |
int | radialSteps, | ||
int | angularSteps, | ||
int | quadrant, | ||
float | minRadius, | ||
float | maxRadius, | ||
vector2f | center, | ||
float * | radialWeights = 0 |
||
) |
Wrapper to compute a radial profile.
[in,out] | dst | Pre-allocated float array of size radialSteps to return the profile. |
[in] | radialSteps | Number of radial steps in the profile. |
[in] | angularSteps | Number of angular steps in the profile. |
[in] | quadrant | Quadrant number. 0-3, 1 is upper right, progresses in counterclockwise order. |
[in] | minRadius | Minimum sampling circle radius in pixels. |
[in] | maxRadius | Maximum sampling circle radius in pixels. |
[in] | center | The center around which to sample. |
[in] | radialWeights | Optional. Array of radial weights by which to weigh the profile. |
Definition at line 613 of file cpu_tracker.cpp.
void CPUTracker::ComputeRadialProfile | ( | float * | dst, |
int | radialSteps, | ||
int | angularSteps, | ||
float | minradius, | ||
float | maxradius, | ||
vector2f | center, | ||
bool | crp, | ||
bool * | boundaryHit = 0 , |
||
bool | normalize = true |
||
) |
Wrapper to compute a radial profile.
[in,out] | dst | Pre-allocated float array of size radialSteps to return the profile. |
[in] | radialSteps | Number of radial steps in the profile. |
[in] | angularSteps | Number of angular steps in the profile. |
[in] | minradius | Minimum sampling circle radius in pixels. |
[in] | maxradius | Maximum sampling circle radius in pixels. |
[in] | center | The center around which to sample. |
[in] | crp | No clue, good luck Josko! |
[in,out] | boundaryHit | Optional. Bool set to indicate whether the image boundary has been hit during sampling. |
[in] | normalize | Optional. Normalize the radial profile? |
Definition at line 727 of file cpu_tracker.cpp.
vector2f CPUTracker::ComputeXCorInterpolated | ( | vector2f | initial, |
int | iterations, | ||
int | profileWidth, | ||
bool & | boundaryHit | ||
) |
Compute the cross correlation offsets and resulting position.
See https://en.wikipedia.org/wiki/Cross-correlation for algorithm details.
[in] | initial | The initial position from which to start the algorithm. |
[in] | iterations | The number of iterations to perform. |
[in] | profileWidth | Width of the profiles to correlate. |
[in,out] | boundaryHit | Pre-allocated bool that will be set to true if the image boundaries have been exceeded during sampling. |
Definition at line 165 of file cpu_tracker.cpp.
|
inline |
Helper function to calculate the Z position.
Calculates the radial profile with CPUTracker::ComputeRadialProfile and calls CPUTracker::LUTProfileCompare to compare it to the LUT.
[in] | center | The center around which to sample. |
[in] | angularSteps | Number of angular steps in the profile. |
[in] | zlutIndex | Index of the ZLUT/bead number. |
[in,out] | boundaryHit | Optional. Bool set to indicate whether the image boundary has been hit during sampling. |
[in,out] | profile | Optional. Pre-allocated array to retrieve the profile if so desired. |
[in,out] | cmpprof | Optional. Pre-allocated array to retrieve the error curve if so desired.. |
[in] | normalizeProfile | Optional. Normalize the profile? Default is true. |
Definition at line 319 of file cpu_tracker.h.
void CPUTracker::FourierRadialProfile | ( | float * | dst, |
int | radialSteps, | ||
int | angularSteps, | ||
float | minradius, | ||
float | maxradius | ||
) |
Calculate the radial profile based on the fourier transform.
Setting is available, not ever really used.
[in,out] | dst | Pre-allocated float array of size radialSteps to return the profile. |
[in] | radialSteps | Number of radial steps in the profile. |
[in] | angularSteps | Number of angular steps in the profile. |
[in] | minradius | Minimum sampling circle radius in pixels. |
[in] | maxradius | Maximum sampling circle radius in pixels. |
Definition at line 1060 of file cpu_tracker.cpp.
void CPUTracker::FourierTransform2D | ( | ) |
Calculate a 2D fourier transform of the tracker's image.
See FFT2D for more information.
Definition at line 1016 of file cpu_tracker.cpp.
|
inline |
Get the debug image.
The debug image can be used to store intermediate results of image processing and retrieved using this function.
Definition at line 440 of file cpu_tracker.h.
|
inline |
Get the height of the image.
Definition at line 124 of file cpu_tracker.h.
|
inline |
Get the image pixel greyscale value at point (x,y).
Definition at line 122 of file cpu_tracker.h.
|
inline |
Get the start of the ZLUT of a specific bead.
[in] | index | The bead number for which to get the LUT. |
Definition at line 90 of file cpu_tracker.h.
|
inline |
Get the width of the image.
Definition at line 123 of file cpu_tracker.h.
float CPUTracker::LUTProfileCompare | ( | float * | profile, |
int | zlutIndex, | ||
float * | cmpProf, | ||
LUTProfileMaxComputeMode | maxPosMethod, | ||
float * | fitcurve = 0 , |
||
int * | maxPos = 0 , |
||
int | frameNum = 0 |
||
) |
Compare a profile to a LUT and calculate the optimum Z value for it.
[in] | profile | The profile to compare. |
[in] | zlutIndex | The number of the ZLUT to compare with. |
[in] | cmpProf | Pre-allocated array in which to return the error curve. Not used if null pointer is passed. |
[in] | maxPosMethod | Which method to use to determine the Z position from the error curve. See LUTProfileMaxComputeMode. |
[in] | fitcurve | Optional. Pre-allocated array in which to return the error curve fit. Not used if null pointer is passed. |
[in] | maxPos | Optional. Pre-allocated integer in which the position of the error curve's maximum will be put. |
[in] | frameNum | Optional. The number of the frame this track job belongs to. Only used in testRun. |
Definition at line 843 of file cpu_tracker.cpp.
float CPUTracker::LUTProfileCompareAdjustedWeights | ( | float * | rprof, |
int | zlutIndex, | ||
float | z_estim | ||
) |
Compare a profile to a LUT and calculate the optimum Z value for it using an initial estimate.
[in] | rprof | The profile to compare. |
[in] | zlutIndex | The number of the ZLUT to compare against. |
[in] | z_estim | An initial guess for the z position. |
Definition at line 979 of file cpu_tracker.cpp.
void CPUTracker::Normalize | ( | float * | image = 0 | ) |
Normalize an image.
See normalize.
[in] | image | Optional. The image to normalize. If a null pointer (default) is given, uses the source image. |
Definition at line 719 of file cpu_tracker.cpp.
QI helper function to calculate the offset from concatenated profiles.
[in] | qi_profile | The concatenated profiles' FFT from which to obtain the offset. |
[in] | nr | The number of radial steps per quadrant profile. |
[in] | axisForDebug | Axis number used to save intermediate data. |
Definition at line 351 of file cpu_tracker.cpp.
vector3f CPUTracker::QuadrantAlign | ( | vector3f | initial, |
int | beadIndex, | ||
int | angularStepsPerQuadrant, | ||
bool & | boundaryHit | ||
) |
Perform the quadrant align algorithm.
See LT_ZLUTAlign.
[in] | initial | The initial, 3 dimensional position. |
[in] | beadIndex | The index of the bead/zlut. |
[in] | angularStepsPerQuadrant | Number of angular steps per quadrant. |
[in] | boundaryHit | Pre-allocated bool to return whether the image boundary has been hit. |
Definition at line 435 of file cpu_tracker.cpp.
scalar_t CPUTracker::QuadrantAlign_ComputeOffset | ( | complex_t * | profile, |
complex_t * | zlut_prof_fft, | ||
int | nr, | ||
int | axisForDebug | ||
) |
QA helper function to calculate the offset from concatenated profiles.
[in] | profile | The concatenated profiles' FFT from which to obtain the offset. |
[in] | zlut_prof_fft | The ZLUT profiles' FFT from which to obtain the offset. |
[in] | nr | The number of radial steps per quadrant profile. |
[in] | axisForDebug | Axis number used to save intermediate data. |
Definition at line 393 of file cpu_tracker.cpp.
void CPUTracker::SaveImage | ( | const char * | filename | ) |
Save the tracker's image to a jpg file.
[in] | filename | Name of the file. Can also be full path. |
Definition at line 1011 of file cpu_tracker.cpp.
void CPUTracker::SetImage | ( | TPixel * | srcImage, |
uint | srcpitch | ||
) |
Set the image on which to perform the tracking.
[in] | srcImage | Array with the image data. |
[in] | srcpitch | Width of one row of data in bytes (typically size(dataType)*imageWidth). |
Definition at line 476 of file cpu_tracker.h.
Set an image with 16 bit type.
[in] | srcImage | Array with the image data. |
[in] | srcpitch | Width of one row of data in bytes (typically size(dataType)*imageWidth). |
Definition at line 247 of file cpu_tracker.h.
Set an image with 8 bit type.
[in] | srcImage | Array with the image data. |
[in] | srcpitch | Width of one row of data in bytes (typically size(dataType)*imageWidth). |
Definition at line 254 of file cpu_tracker.h.
void CPUTracker::SetImageFloat | ( | float * | srcImage | ) |
Set an image with float type.
[in] | srcImage | Array with the image data. |
Definition at line 88 of file cpu_tracker.cpp.
void CPUTracker::SetRadialWeights | ( | float * | radweights | ) |
Set the radial weights to be used for profile comparisons.
[in] | radweights | Array with the radial weights. |
Definition at line 767 of file cpu_tracker.cpp.
void CPUTracker::SetRadialZLUT | ( | float * | data, |
int | planes, | ||
int | res, | ||
int | num_zluts, | ||
float | minradius, | ||
float | maxradius, | ||
bool | copyMemory, | ||
bool | useCorrelation | ||
) |
Tell the tracker where in memory the LUT is located.
The LUT is a large contiguous memory area in which all LUTs are saved. See QueuedCPUTracker::zluts.
It is possible to make one CPUTracker instance the owner of the ZLUT memory if no other manager (like QueuedCPUTracker) is used. For this, use the copyMemory
parameter.
[in] | data | Pointer to the first element of the ZLUT memory. |
[in] | planes | The number of planes per lookup table. |
[in] | res | Number of radial steps per plane. |
[in] | num_zluts | The number of LUTs in memory. |
[in] | minradius | Starting sampling distance of the profiles in pixels. |
[in] | maxradius | Ending sampling distance of the profiles in pixels. |
[in] | copyMemory | Bool to indicate whether the data should be copied to locally managed memory. |
[in] | useCorrelation | Deprecated. No effect, only there not to break calls. |
Definition at line 741 of file cpu_tracker.cpp.
float* CPUTracker::debugImage |
Memory in which an intermediate image can optionally be place and retrieved.
Definition at line 47 of file cpu_tracker.h.
FFT2D* CPUTracker::fft2d |
Instance of FFT2D to perform 2D FFTs.
Definition at line 120 of file cpu_tracker.h.
int CPUTracker::height |
ROI height.
Definition at line 42 of file cpu_tracker.h.
float CPUTracker::mean |
Mean intensity of the ROI. Calculated in ComputeMeanAndCOM.
Definition at line 48 of file cpu_tracker.h.
kissfft<scalar_t>* CPUTracker::qa_fft_backward |
Handle to backward FFT kissfft instance for quadrant align.
Definition at line 70 of file cpu_tracker.h.
kissfft<scalar_t>* CPUTracker::qa_fft_forward |
Handle to forward FFT kissfft instance for quadrant align.
Definition at line 69 of file cpu_tracker.h.
kissfft<scalar_t>* CPUTracker::qi_fft_backward |
Handle to backward FFT kissfft instance for QI.
Definition at line 96 of file cpu_tracker.h.
kissfft<scalar_t>* CPUTracker::qi_fft_forward |
Handle to forward FFT kissfft instance for QI.
Definition at line 95 of file cpu_tracker.h.
int CPUTracker::qi_radialsteps |
Number of radialsteps in the QI calculations.
Definition at line 94 of file cpu_tracker.h.
std::vector<vector2f> CPUTracker::quadrantDirs |
Vector with the sampling points for a single quadrant (cos & sin pairs).
Definition at line 93 of file cpu_tracker.h.
float* CPUTracker::srcImage |
Memory region that holds the image on which tracking is to be performed.
Definition at line 46 of file cpu_tracker.h.
float CPUTracker::stdev |
Standard deviation of values in the ROI. Calculated in ComputeMeanAndCOM.
Definition at line 49 of file cpu_tracker.h.
bool CPUTracker::testRun |
Flag to enable running a test run.
A test run outputs a lot of intermediate data into an output path using GetCurrentOutputPath. This can currently be used to analyse the particulars of the ZLUT algorithms.
Output currently happens in LUTProfileCompare. A Matlab GUI has been created to read and analyse the created files.
Definition at line 82 of file cpu_tracker.h.
int CPUTracker::trackerID |
ID of this tracker (= ID of thread it runs in).
Definition at line 44 of file cpu_tracker.h.
int CPUTracker::width |
ROI width.
Definition at line 41 of file cpu_tracker.h.
XCor1DBuffer* CPUTracker::xcorBuffer |
The handle from which to perform cross correlation calculations.
Definition at line 92 of file cpu_tracker.h.
int CPUTracker::xcorw |
Cross correlation profile length.
Definition at line 43 of file cpu_tracker.h.
int CPUTracker::zlut_count |
Number of ZLUTs (= # beads) available.
Definition at line 65 of file cpu_tracker.h.
float CPUTracker::zlut_maxradius |
Maximum radius in pixels of the ZLUT profile sampling circle.
Definition at line 67 of file cpu_tracker.h.
bool CPUTracker::zlut_memoryOwner |
Flag indicating if this instance is the owner of the zluts memory, or is it external. False in all normal operation.
Definition at line 62 of file cpu_tracker.h.
float CPUTracker::zlut_minradius |
Minimum radius in pixels to start sampling for a ZLUT profile.
Definition at line 66 of file cpu_tracker.h.
int CPUTracker::zlut_planes |
Number of planes per ZLUT.
Definition at line 63 of file cpu_tracker.h.
std::vector<float> CPUTracker::zlut_radialweights |
Vector with the radialweights used by the error curve calculation.
Definition at line 68 of file cpu_tracker.h.
int CPUTracker::zlut_res |
ZLUT resolution = number of radial steps in a plane.
Definition at line 64 of file cpu_tracker.h.
float* CPUTracker::zluts |
Pointer to the first data in the ZLUTs.
All LUTs are saved in one big contiguous section of memory of size zlut_planes*zlut_count*zlut_res. Calculate specific LUTs or planes based on their indexes:
The ZLUT system stores 'zlut_count' number of 2D zlut's, so every bead can be tracked with its own unique ZLUT.
Definition at line 61 of file cpu_tracker.h.