| 55 | } |
| 56 | |
| 57 | bool Cylinder::filter(const Scalar &maxTreeRadius, const Scalar &maxAxisTheta, const Plane &gplane) |
| 58 | { |
| 59 | if (model.radius == -1) |
| 60 | return false; |
| 61 | |
| 62 | // use estimated ground plane to check if the ray direction is reasonable |
| 63 | Vector3 up(gplane.model.plane[0], gplane.model.plane[1], gplane.model.plane[2]); |
| 64 | Scalar theta = (180 / PIDEF) * acos(((model.ray).dot(up)) / |
| 65 | ((model.ray).norm() * up.norm())); |
| 66 | // Remove if radius is too large or angle to up is too large |
| 67 | if ((model.radius < maxTreeRadius) && |
| 68 | ((theta <= maxAxisTheta) || (theta >= 180 - maxAxisTheta))) |
| 69 | { |
| 70 | return true; |
| 71 | } |
| 72 | return false; |
| 73 | } |
| 74 | |
| 75 | void Cylinder::computeModel(const std::vector<TreeVertex> &landmarkVtxs, |
| 76 | const Scalar defaultTreeRadius, const Scalar featuresPerTree) |
nothing calls this directly
no outgoing calls
no test coverage detected