Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D-3D Registration based on PCL #425

Closed
wants to merge 34 commits into from
Closed

Conversation

fabiencastan
Copy link
Member

@fabiencastan fabiencastan commented Jun 30, 2018

WARNING: DO NOT MERGE due to Eigen alignment flags or C++17 switch.

find_package(Flann QUIET)
if(NOT FLANN_FOUND OR ALICEVISION_USE_INTERNAL_FLANN)
set(FLANN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/flann/src/cpp)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FLANN_INCLUDE_DIR_HINTS is now set after find_package.
In order to find the internal one we should add another find_package after this line.

@@ -320,8 +321,8 @@ if(Eigen3_FOUND OR EIGEN3_FOUND)
# message(FATAL_ERROR "EIGEN_INCLUDE_DIR: ${EIGEN_INCLUDE_DIR}")
include_directories(${EIGEN_INCLUDE_DIR})
# See https://eigen.tuxfamily.org/dox/group__TopicUnalignedArrayAssert.html
add_definitions("-DEIGEN_DONT_ALIGN_STATICALLY=1")
add_definitions("-DEIGEN_DONT_VECTORIZE=1")
# add_definitions("-DEIGEN_DONT_ALIGN_STATICALLY=1")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: do not merge before we have done all the changes needed for that.

{
auto tic = std::chrono::steady_clock::now();

int res = loadCloud(file, targetCloud);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const


int PointcloudRegistration::loadTargetCloud(const std::string & file)
{
auto tic = std::chrono::steady_clock::now();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Timer


pcl::PointCloud<pcl::PointXYZRGB> inputCloud, outputCloud;

// load input cloud:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const auto ext =  path(inputFile).extension().toString();
if(inputFile == "ply")
...

pcl::transformPointCloud(inputCloud, outputCloud, T);

// save the transformed pointcloud:
if (outputFile.substr(outputFile.find_last_of(".") + 1) == "ply")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if(ext != "ply")
{
    ALICEVISION_LOG_ERROR("PointcloudRegistration::saveCloud: Unknown extension: " << outputFile);
    return EXIT_FAILURE;
}
pcl::io::savePLYFile(outputFile, outputCloud);

@griwodz
Copy link
Member

griwodz commented Oct 2, 2020

FYI, we have a quick example for using symmetric with PCL > 1.10.0 here:
https://github.com/henryhansen23/Indoor-reconstruction-plus-plus/pull/3/files

{
case EAlignmentMethod::GICP:
{
transform = alignGICP(mutableSourceCloud, mutableTargetCloud);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

break?
or is it done on purpose?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems to be a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants