initial commit
This commit is contained in:
commit
6c394cb395
3 changed files with 39 additions and 0 deletions
18
CMakeLists.txt
Normal file
18
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
|
|
||||||
|
set(PROJECT_NAME box3d)
|
||||||
|
|
||||||
|
project(${PROJECT_NAME})
|
||||||
|
|
||||||
|
find_package(OpenCV REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
|
set(HEADERS
|
||||||
|
)
|
||||||
|
set(SOURCES
|
||||||
|
main.cpp)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
|
||||||
|
target_include_directories(${PROJECT_NAME} PUBLIC ${OpenCV_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})
|
||||||
BIN
data/carbon_bin_picking_gamma_bgcrop.ply
Normal file
BIN
data/carbon_bin_picking_gamma_bgcrop.ply
Normal file
Binary file not shown.
21
main.cpp
Normal file
21
main.cpp
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
#include <opencv2/viz.hpp>
|
||||||
|
#include <opencv2/viz/viz3d.hpp>
|
||||||
|
#include <opencv2/viz/vizcore.hpp>
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
const std::string DEFAULT_POINT_CLOUD_FILE = "../data/carbon_bin_picking_gamma_bgcrop.ply";
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
cv::viz::Viz3d window("Point cloud");
|
||||||
|
std::string fileName = argc == 2 ? argv[1] : DEFAULT_POINT_CLOUD_FILE;
|
||||||
|
|
||||||
|
auto pointCloud = cv::viz::readCloud(fileName.c_str());
|
||||||
|
cv::viz::WCloud cloudWidget(pointCloud, cv::viz::Color::red());
|
||||||
|
window.showWidget("Point cloud", cloudWidget);
|
||||||
|
window.spin();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue