#include <iostream>
#include "cvb/calibrator_3d.hpp"
#include "cvb/point_cloud.hpp"
#include "cvb/point_cloud_factory.hpp"
double zRangeRoof,
double xRangeRoofPlane,
double yRangeRoofPlane);
int main() {
try {
path +
CVB_LIT("tutorial/Metric/Images/RangeMapCalibrationPattern.tif"));
path + CVB_LIT("tutorial/Metric/Images/SICalibration.json"));
calibrator->SetRangeMapIgnoreValue(0.0);
rangemap->Plane(0), *calibrator,
Cvb::PointCloudFlags::Float | Cvb::PointCloudFlags::XYZ);
auto plane =
CutAqs12RoofAndCalculateNormal(*cloudAqs12, 10.0, 50.0, 1000.0);
} catch (const std::exception &error) {
std::cout << error.what() << std::endl;
}
return 0;
}
double zRangeRoof,
double xRangeRoofPlane,
double yRangeRoofPlane) {
auto dx = xRangeRoofPlane / 2;
auto dy = yRangeRoofPlane / 2;
{bbRoof.ZRange().Max() - zRangeRoof, bbRoof.ZRange().Max() + 1});
auto bbRoofPlane = roof->CalculateBoundingBox();
bbRoofPlane.SetXRange({cog.X() - dx, cog.X() + dx});
bbRoofPlane.SetYRange({cog.Y() - dy, cog.Y() + dy});
auto roofPlane = roof->Crop(bbRoofPlane);
return roof->FitPlane();
}
static std::shared_ptr< T > Load(const String &fileName)
void SetZRange(ValueRange< double > zRange) noexcept
static std::unique_ptr< Image > Load(const String &fileName)
static PointCloudPtr Create(const ImagePlane &rangeMap, const Calibrator3D &calibrator, PointCloudFlags flags)
std::shared_ptr< T > Crop(const Cuboid &clipBox) const
Cuboid CalculateBoundingBox() const
Point3D< double > CalculateCenterOfGravity() const
std::shared_ptr< Image > ImagePtr