![]() |
ImFusion SDK 4.3
|
#include <ImFusion/CT/PointExtraction.h>
Utility class for extracting calibration points from images. More...
Utility class for extracting calibration points from images.
Provides static methods for bead detection and tracking in calibration phantoms.
Static Public Member Functions | |
| static int | extractPoints (const MemImage *img, std::vector< ConeBeamCalibration::PointInfo > &points, double minDiameter=3.0, double maxDiameter=30.0, double gradientThreshold=0.2, double isoThreshold=0.9, double pointContrast=0.05, bool inpaint=true, bool meanCorrection=false, const Mask *imgMask=nullptr) |
| Extract points from input image. | |
| static std::pair< int, std::vector< std::vector< ConeBeamCalibration::PointInfo > > > | trackPoints (std::vector< std::vector< ConeBeamCalibration::PointInfo > > &points, double matchingThreshold=20.0, bool removeIncompleteTracks=true, int minTrackLength=2, int pointTolerance=4, bool trackPoints=true, bool joinTracks=true, bool sortTracks=true, bool detectCollisions=true, bool checkConvexity=false) |
| Track extracted points over image sequence. | |
| static int | joinTracks (std::vector< std::vector< ConeBeamCalibration::PointInfo > > &points, const std::vector< std::vector< int > > &joinedTracks) |
| Join tracks over sequence. | |
| static int | removeIncompleteTracks (std::vector< std::vector< ConeBeamCalibration::PointInfo > > &points, int minTrackLength, std::vector< std::vector< ConeBeamCalibration::PointInfo > > *deletedPoints=nullptr) |
| Remove tracks with too few points. | |
| static void | sortTracks (std::vector< std::vector< ConeBeamCalibration::PointInfo > > &points, bool inverted=true, bool circular=false) |
Sort tracks along y-axis or by angle if circular is true. | |
| static bool | isConvex (std::vector< int > &leftTrack, std::vector< int > &rightTrack, std::vector< std::vector< std::pair< Eigen::Vector2d, int > > > &pointsOfSegment) |
| Check whether the polygon formed by segments of two tracks is convex (i.e. | |
| static void | removeBigPoints (std::vector< std::vector< ConeBeamCalibration::PointInfo > > &points, double radThreshold=1.2) |
| Remove points which have radius significantly bigger than the neigbouring points, for proper results use it only after the tracking has been performed. | |
| static void | addPointsOnEllipsoid (std::vector< std::vector< ConeBeamCalibration::PointInfo > > &points, const std::vector< std::vector< ConeBeamCalibration::PointInfo > > &deletedPoints, const bool addDeletedPoints=true, const bool addMirrorPoints=true, const bool removeDuplicatePoints=true, const float deletedPointsMaxDist=1e-4, const float duplicatePointDistTol=0.5) |
| Fit points on each track to an ellipse in order to complete each track with points on the corresponding ellipse. | |
|
static |
Extract points from input image.
| img | input image |
| points | extracted points |
| minDiameter | minimum diameter of points |
| maxDiameter | maximum diameter of points |
| gradientThreshold | normalized gradient threshold for discarding objects |
| isoThreshold | normalized isolevel at which to extract points |
| pointContrast | relative difference between the intensity of the point and the background (backround intensity is at least pointContrast higher than point intensity) |
| inpaint | if true, bead extraction is performed on an image with substracted background, otherwise it is performed on the original image |
| meanCorrection | if true, a vertical mean is computed and any pixel is divided by the corresponding mean value. |
| mask | if mask is set the extractPoints will be computed with taking mask into account |
|
static |
Track extracted points over image sequence.
| points | input and output points |
| matchingThreshold | distance threshold for tracking points over frames |
| removeIncompleteTracks | if true incomplete tracks with a length below minTrackLength are removed |
| minTrackLength | used in conjunction with remove incompleteTracks |
| joinTracks | join tracks whose start and end points are close |
| sortTracks | sort tracks descending in image y-direction |
| points | by this function |
|
static |
Check whether the polygon formed by segments of two tracks is convex (i.e.
the segments of polygon have the same direction (clockwise or counter-clockwise) and they don't intersect with each other)
| leftTrack | segments that form a track which might be needed to be connected with the rightTrack from the right |
| rightTrack | segments that form a track which might be needed to be connected with the leftTrack from the left |
| pointsOfSegment | points that form the segments, each entry contains the coordinate of the point and the frame where it was detected |
|
static |
Remove points which have radius significantly bigger than the neigbouring points, for proper results use it only after the tracking has been performed.
| radThreshold | a relative factor. Points with a radius larger than radThreshold * avgRadius will be removed. |
|
static |
Fit points on each track to an ellipse in order to complete each track with points on the corresponding ellipse.
| points | points per frame |
| deletedPoints | points per frame previously deleted |
| addDeletedPoints | re-evaluate if points in |
| deletedPoints | are on any track by reinserting them if they lie on any ellipse |
| addMirrorPoints | mirroring the points on the ellipse center and adding them to points |
| removeDuplicatePoints | removing inserted points when they are too close to already existing points |