Skip to content

Commit f64425d

Browse files
fix
1 parent 3eb83f2 commit f64425d

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ find_package(Open3D HINTS /home/dinhnambkhn/open3d_install/lib/cmake)
88

99
find_package(OpenCV)
1010
include_directories(${OpenCV_INCLUDE_DIRS})
11+
message(STATUS "OpenCV_INCLUDE_DIRS: ${OpenCV_INCLUDE_DIRS}")
12+
message(STATUS "OpenCV_LIBRARIES: ${OpenCV_LIBRARIES}")
1113

1214
if (NOT Open3D_FOUND)
1315
message(FATAL_ERROR "Open3D not found, please use -DCMAKE_INSTALL_PREFIX=open3d_install_dir")

RGBD_odometry.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ int main() {
5252
auto option = open3d::pipelines::odometry::OdometryOption();
5353
auto odom_init = Eigen::Matrix4d::Identity();
5454
//print option
55-
std::cout << "max_depth_: " << option.max_depth_ << std::endl;
56-
std::cout << "min_depth_: " << option.min_depth_ << std::endl;
57-
std::cout << "max_depth_diff_: " << option.max_depth_diff_ << std::endl;
55+
std::cout << "max_depth_: " << option.depth_max_ << std::endl;
56+
std::cout << "min_depth_: " << option.depth_min_ << std::endl;
57+
std::cout << "max_depth_diff_: " << option.depth_diff_max_ << std::endl;
5858

5959
//begin counting time
6060
auto start = std::chrono::system_clock::now();

Transformation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int main() {
2323
Eigen::Matrix4d transformation;
2424
//set identity matrix
2525
transformation.setIdentity();
26-
//rotate around x axis
26+
//rotate around x-axis
2727
transformation(0, 0) = 1;
2828
transformation(1, 1) = cos(M_PI / 4);
2929
transformation(1, 2) = -sin(M_PI / 4);

read_image.cpp

+1-12
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
int main() {
1212
//read image file
1313
open3d::geometry::Image image;
14-
open3d::io::ReadImage("lena_color.jpg", image);
14+
open3d::io::ReadImage("/home/dinhnambkhn/Open3D/examples/test_data/lena_color.jpg", image);
1515
//check image is empty or not
1616
if (image.IsEmpty()) {
1717
std::cout << "Image is empty" << std::endl;
@@ -21,17 +21,6 @@ int main() {
2121

2222
//create a share d pointer of image
2323
std::shared_ptr<open3d::geometry::Image> image_ptr = std::make_shared<open3d::geometry::Image>(image);
24-
//read image file opencv
25-
cv::Mat image_cv;
26-
image_cv = cv::imread("lena_color.jpg");
27-
//convert to gray scale
28-
cv::Mat image_gray;
29-
cv::cvtColor(image_cv, image_gray, cv::COLOR_BGR2GRAY);
30-
//show color image and gray image
31-
cv::imshow("color image", image_cv);
32-
cv::imshow("gray image", image_gray);
33-
cv::waitKey(0);
34-
3524
//draw the image_ptr
3625
open3d::visualization::DrawGeometries({image_ptr});
3726

0 commit comments

Comments
 (0)