Predictor that may be used for searching objects. More...
Inherits PredictorBase.
Public Member Functions | |
override void | Dispose () |
Dispose search classifier. | |
SearchPredictor (string fileName) | |
Load a saved Polimago classification classifier from a file. More... | |
SearchResult[] | GridSearch (Image img, Rect aoi, double gridStep, double threshold, double locality, out int numCalls) |
Perform a grid search. More... | |
SearchResult[] | GridSearch (Image img, Rect aoi, double gridStep, double threshold, double locality) |
Perform a grid search. More... | |
SearchResult | Inspect (Image img, Point2D pos, out int searchDepth) |
PMInspect carries out the operation that GridSearch executes for a grid point, starting at the position defined by pos and with an upright and untransformed perspective. More... | |
SearchResult | Inspect (Image img, Point2D pos, out int searchDepth, out SearchResult[] trace) |
PMInspect carries out the operation that GridSearch executes for a grid point, starting at the position defined by pos and with an upright and untransformed perspective. More... | |
bool | Inspect (Image img, ref SearchResult res, out int searchDepth) |
PMInspect carries out the operation that GridSearch executes for a grid point, starting at the perspective and position defined by the initial value of the parameter SearchResult. When PMInspect returns successfully, SearchResult will contain the final perspective and result quality. For additional information please see the tutorial on search functions of Polimago. More... | |
bool | Inspect (Image img, ref SearchResult res, ref int searchDepth, out SearchResult[] trace) |
PMInspect carries out the operation that GridSearch executes for a grid point, starting at the perspective and position defined by the initial value of the parameter SearchResult. When PMInspect returns successfully, SearchResult will contain the final perspective and result quality. For additional information please see the tutorial on search functions of Polimago. More... | |
Image | SearchResultToImage (Image sourceImage, SearchResult res) |
Create a visual representation of a search result. More... | |
Public Member Functions inherited from PredictorBase | |
bool | IsCompatible (Image img, Point2D pos) |
Verify the compatibility of a CVB image with this classifier. More... | |
bool | IsCompatible (Image img) |
Verify the compatibility of a CVB image with this classifier. More... | |
Public Member Functions inherited from PolimagoFactoryCreatedObject | |
void | Save (string fileName) |
Save this object into a file. More... | |
virtual void | Dispose () |
IDisposable implementation. More... | |
Properties | |
int | MaxNumResults [get, set] |
The maximum number of results that can be extracted in a GridSearch operation. Increasing this value will increase the amount of memory allocated by this SearchPredictor object. | |
int | SampleSize [get] |
Sample size that has been used in each training set. | |
double | ExtractionRadius [get] |
Radius for extracting positive search instances. The unit size is the size of the feature window, i.e. a value of 0.5 means that positive samples can be extracted from withing a range of +/- Feature Window Width and +/- Feature Window Height around each trained instance. Smaller values will necessitate a finer search grid but may yield better results on difficult search tasks. | |
ValueRange< Angle > | RotationRange [get] |
Range of angles that was covered during classifier training. | |
ValueRange< double > | ScaleRange [get] |
Range of scale factors that was covered during classifier training. | |
InvarianceType | Invariances [get] |
Invariances that have been trained on this classifier. | |
int | NumClassificationSteps [get] |
Number of classification steps defined during training. | |
int | FeatureResolutionStep1And2 [get] |
Feature resolution to be used for the first two classification steps. | |
int | FeatureResolutionRest [get] |
Feature resolution to be used for the third and later classification steps. | |
Properties inherited from PolimagoFactoryCreatedObject | |
string | FileName [get, protected set] |
Name of the file the object has been loaded from (or More... | |
double | Lambda [get] |
Regularization value that has been used for generating this object. | |
double | Offset [get] |
Intercept weight that has been used for generating this object. | |
InterpolationType | Interpolation [get] |
Interpolation setting used for generating this object. | |
int | ImagePlanes [get] |
The plane count of the images that have been used for generating this classifier. Image on which this classifier is to be used will need to have the same plane count. | |
Rect | FeatureWindowExtent [get] |
The feature window extent that has been used during classifier training. | |
Size2D | RetinaSize [get] |
Size of the "Retina" in paxels. The retina is the set of paxels onto which the input image is projected using the preprocessing code prior to application/training of the classifier. | |
Point2Dd | Correction [get] |
Correction factors in X and Y direction required to rescale the input images for projection onto the retina. | |
string | Preprocessing [get] |
Preprocessing code with which this object was generated. | |
Properties inherited from PolimagoRefCountedObject | |
IntPtr | Handle [get] |
Native Manto classifier handle. More... | |
bool | IsDisposed [get] |
Tests if the native handle has already been disposed. | |
Properties inherited from INativeHandle | |
IntPtr | Handle [get] |
The native handle of the object. | |
bool | IsDisposed [get] |
Possibility to check whether the object has already been disposed of. | |
Additional Inherited Members | |
Static Public Member Functions inherited from PredictorBase | |
static int | GetGranularity (string preproCode) |
The function returns the granularity (see tutorial) associated with a preprocessing code. More... | |
Protected Member Functions inherited from PredictorBase | |
void | VerifyCompatibility (Image img) |
Verify the compatibility of a CVB image with this classifier. More... | |
void | VerifyCompatibility (Image img, Point2D pos) |
Verify the compatibility of a CVB image with this classifier. More... | |
Protected Member Functions inherited from PolimagoRefCountedObject | |
virtual void | Dispose (bool disposing) |
IDispose helper function. More... | |
Events inherited from PolimagoRefCountedObject | |
NativeHandleEventDelegate | ObjectDisposing |
Raised when this object is about to be disposed via the IDisposable.Dispose method. More... | |
Events inherited from INativeHandle | |
NativeHandleEventDelegate | ObjectDisposing |
Raised when this object is about to be disposed via the IDisposable.Dispose method. More... | |
Predictor that may be used for searching objects.
SearchPredictor | ( | string | fileName | ) |
Load a saved Polimago classification classifier from a file.
fileName | name of the file to be loaded |
FileNotFoundException | If the classifier file does not exist |
FileLoadException | If loading an existing classifier file failed |
ArgumentNullException | If fileName is null |
SearchResult[] GridSearch | ( | Image | img, |
Rect | aoi, | ||
double | gridStep, | ||
double | threshold, | ||
double | locality | ||
) |
Perform a grid search.
img | Image to search in. |
aoi | AOI inside the image to search in. |
gridStep | Spacing of the grid points in units of the feature window width/height. |
threshold | Minimum quality a result must have for being reported. |
locality | Minimum distance between the results that this SearchPredictor found. If two results that exceed the quality requirement defined by the threshold parameter are spaced less than locality pixels apart (in either x or y direction) then the result with the lower quality will be eliminated from the result list. |
SearchResult[] GridSearch | ( | Image | img, |
Rect | aoi, | ||
double | gridStep, | ||
double | threshold, | ||
double | locality, | ||
out int | numCalls | ||
) |
Perform a grid search.
img | Image to search in. |
aoi | AOI inside the image to search in. |
gridStep | Spacing of the grid points in units of the feature window width/height. |
threshold | Minimum quality a result must have for being reported. |
locality | Minimum distance between the results that this SearchPredictor found. If two results that exceed the quality requirement defined by the threshold parameter are spaced less than locality pixels apart (in either x or y direction) then the result with the lower quality will be eliminated from the result list. |
numCalls | Will receive the number of calls to the predictor's classification routine that have been carried out in the GridSearch(Image, Rect, double, double, double, out int) call. |
SearchResult Inspect | ( | Image | img, |
Point2D | pos, | ||
out int | searchDepth | ||
) |
PMInspect carries out the operation that GridSearch executes for a grid point, starting at the position defined by pos and with an upright and untransformed perspective.
img | Image to work on. |
pos | Position at which to start. |
searchDepth | receives the number of steps that were executed. |
SearchResult Inspect | ( | Image | img, |
Point2D | pos, | ||
out int | searchDepth, | ||
out SearchResult[] | trace | ||
) |
PMInspect carries out the operation that GridSearch executes for a grid point, starting at the position defined by pos and with an upright and untransformed perspective.
img | Image to work on. |
pos | Position at which to start. |
searchDepth | receives the number of steps that were executed. |
trace | Inspection trace (series of intermediate results). |
bool Inspect | ( | Image | img, |
ref SearchResult | res, | ||
out int | searchDepth | ||
) |
PMInspect carries out the operation that GridSearch executes for a grid point, starting at the perspective and position defined by the initial value of the parameter SearchResult. When PMInspect returns successfully, SearchResult will contain the final perspective and result quality. For additional information please see the tutorial on search functions of Polimago.
img | Image to work on. |
res | Search Result to start with (upon exit: final result) |
searchDepth | Maximum number of steps to calculate (upon exit: number of steps actually calculated). |
true
if the SearchPredictor found a result when starting at the position defined through the res parameter, false
otherwise.bool Inspect | ( | Image | img, |
ref SearchResult | res, | ||
ref int | searchDepth, | ||
out SearchResult[] | trace | ||
) |
PMInspect carries out the operation that GridSearch executes for a grid point, starting at the perspective and position defined by the initial value of the parameter SearchResult. When PMInspect returns successfully, SearchResult will contain the final perspective and result quality. For additional information please see the tutorial on search functions of Polimago.
img | Image to work on. |
res | Search Result to start with (upon exit: final result) |
searchDepth | Maximum number of steps to calculate (upon exit: number of steps actually calculated). |
trace | Search results that lead from the initial value of the res parameter to the final value. |
true
if the SearchPredictor found a result when starting at the position defined through the res parameter, false
otherwise.Image SearchResultToImage | ( | Image | sourceImage, |
SearchResult | res | ||
) |
Create a visual representation of a search result.
sourceImage | Image to create the representation from. This should be the image on which the result was found with this classifier. |
res | Search result (should match the image and this classifier). |