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

#normal-estimation-using-integral-images showing error #5282

Closed
manz00 opened this issue Jun 2, 2022 · 4 comments
Closed

#normal-estimation-using-integral-images showing error #5282

manz00 opened this issue Jun 2, 2022 · 4 comments

Comments

@manz00
Copy link

manz00 commented Jun 2, 2022

I'm using below code from tutorial of normal-estimation-using-integral-images,

#include <pcl/common/io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <iostream>
#include <pcl/io/io.h>
#include <pcl/io/pcd_io.h>
#include <pcl/features/integral_image_normal.h>

int main( ){
	// load point cloud
	pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
	pcl::io::loadPCDFile("C:\\pcl_tutorials\\normal\\table_scene_mug_stereo_textured.pcd", *cloud);
	
	// estimate normals
	pcl::PointCloud<pcl::Normal>::Ptr normals(new pcl::PointCloud<pcl::Normal>);
	
	pcl::IntegralImageNormalEstimation<pcl::PointXYZ, pcl::Normal> ne;
	ne.setNormalEstimationMethod(ne.AVERAGE_3D_GRADIENT);
	ne.setMaxDepthChangeFactor(0.02f);
	ne.setNormalSmoothingSize(10.0f);
	ne.setInputCloud(cloud);
	ne.compute(*normals);
	
	// visualize normals
	pcl::visualization::PCLVisualizer viewer("PCL Viewer");
	viewer.setBackgroundColor(0.0, 0.0, 0.5);
	viewer.addPointCloudNormals<pcl::PointXYZ, pcl::Normal>(cloud, normals);
	
	while (!viewer.wasStopped())
	{
	viewer.spinOnce();
	}
	return 0;
}

CMakeLists.txt

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(normal_estimation_using_integral_images)

find_package(PCL 1.2 REQUIRED)

include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable (normal_estimation_using_integral_images normal_estimation_using_integral_images.cpp)
target_link_libraries (normal_estimation_using_integral_images ${PCL_LIBRARIES})

The following issue is displayed in the command prompt after running the program in Visual Studios on Windows 10.

Assertion failed: v == T(Value), file C:\Program Files\Eigen3\include\eigen3\Eigen\src/Core/util/XprHelper.h, line 133

C:\pcl_tutorials\normal\out\build\x64-Debug\normal_estimation_using_integral_images.exe (process 10180) exited with code 3.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .

Debug output:

Debug Error!

Program: ...t\build\x64-Debug\normal_estimation_using_integral_images.exe

abort() has been called

(Press Retry to debug the application)
.
.
The thread 0x18d4 has exited with code 0 (0x0).
'normal_estimation_using_integral_images.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. 
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in normal_estimation_using_integral_images.exe.

I followed this #4462 (comment) for library installation.

Could anyone help me with this issue?

@manz00 manz00 added the status: triage Labels incomplete label Jun 2, 2022
@mvieth
Copy link
Member

mvieth commented Jun 2, 2022

See here: #5063

@mvieth mvieth added kind: bug Type of issue module: features module: tutorials and removed status: triage Labels incomplete labels Jun 2, 2022
@manz00
Copy link
Author

manz00 commented Jun 3, 2022

I complied the program using x64-Release, and it still shows below errors.

Unhandled exception at 0x00007FFEDA898327 (vtkCommonCore-9.1.dll) in narf_feature_extraction.exe: 0xC0000005: Access violation reading location 0x000000000000003F.
Severity	Code	Description	Project	File	Line	Suppression State
Error (active)	E0992	command-line error: invalid macro definition: BOOST_ALL_NO_LIB-DBOOST_ALL_NO_LIB	narf_feature_extraction.exe - x64-Release	C:\pcl_tutorials\narf\narf_feature_extraction.cpp	1	

Can you help with these?

@mvieth
Copy link
Member

mvieth commented Jun 3, 2022

Sounds like that might be the same problem as in #5159 ? Please check the other issues before opening a new issue. Your questions might already have been answered.

@mvieth mvieth closed this as completed Jun 5, 2022
@manz00
Copy link
Author

manz00 commented Jun 16, 2022

So I checked #5159 and made the following changes to my CMakeLists.txt:

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

project(range_image_visualization)

find_package(PCL 1.3 REQUIRED)
find_package(VTK REQUIRED)

include_directories(${PCL_INCLUDE_DIRS}${VTK_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable (range_image_visualization range_image_visualization.cpp)
target_link_libraries (range_image_visualization ${PCL_LIBRARIES};${VTK_LIBRARIES})

vtk_module_autoinit(TARGETS range_image_visualization 
                    MODULES VTK::RenderingContextOpenGL2)

New error

Target missing executable

does not have an executable configured.

It cannot be launched.

When I hit OK, it follows it up with another error box:

Value cannot be null.
Parameter name: key

I also downloaded and added this library by following #5252:

//#include <pcl/visualization/vtk/vtkRenderWindowInteractorFix.h>
#include <pcl/visualization/vtk/vtkFixedXRenderWindowInteractor.h>

Without that library, I get the below error:
image

I need some assistance @mvieth.

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

No branches or pull requests

2 participants