ShapeFinder (SF.dll) 15.0
TSFSolution Struct Reference

Utility structure to interpret ShapeFinder2 results. More...

Data Fields

double A
 Rotation of the result in degrees.
 
double R
 Scale factor of the result.
 
double X
 X position of the result.
 
double Y
 Y position of the result.
 
double Z
 Quality of the result.
 

Detailed Description

Utility structure to interpret ShapeFinder2 results.

As can be seen from the signatures of SF2Search and SF2SearchEx, a ShapeFinder2 model will return its results in the form of a pixel list (see description of PIXELLIST in the CVCImg.dll). To make access the TSFSolution structure has been defined and can be used like this:

// preconditions:
// - sf refers to a valid ShapeFinder2 model
// - img refers to a valid Common Vision Blox image that contains
// at least one of the objects trained into sf
PIXELLIST results = nullptr;
SF2Search(sf, img, 0, 0, ImageWidth(img)-1, ImageHeight(img)-1, results);
if (IsPixels(results))
for (int i = 0; i < PixelListCount(results); ++i)
{
TSFSolution solution;
ListPixelEx(results, i, reinterpret_cast<double*>(&solution);
// the current solution's properties are now accessible through
// the members of solution...
}
// don't forget to clean up!
ReleaseObject(results);
cvbbool_t SF2Search(SF sf, IMG Image, cvbdim_t Index, cvbdim_t Left, cvbdim_t Top, cvbdim_t Right, cvbdim_t Bottom, PIXELLIST &Solutions)
Use a ShapeFinder2 model for finding occurrences of the trained pattern in an image.
Definition: FromDelphi_USF.cpp:2340
Utility structure to interpret ShapeFinder2 results.
Definition: iSF.h:254