Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

C++ read rgb+depth images sequentially

Hi, i have a dataset that contains 250 rgb and depth images. Every rgb image has a depth image, like this: img_1.png, img_1_depth.png, img_2.png, img_2_depth.png ... and so on.

I would read rgb image + depth image and save the associated point cloud on pcd file. I read like this:

cv::Mat input_rgb = cv::imread("src/dataset-path/img_1.png", cv::IMREAD_COLOR);
cv::Mat input_depth = cv::imread("src/dataset-path/image_1_depth.png", cv::IMREAD_ANYDEPTH);

but i can't read, with for loop , every images sequentially.

How can i do?

Thanks!

C++ read rgb+depth images sequentially

Hi, i have a dataset that contains 250 rgb and depth images. Every rgb image has a depth image, like this: img_1.png, img_1_depth.png, img_2.png, img_2_depth.png ... and so on.

I would read rgb image + depth image and save the associated point cloud on pcd file. I read like this:

cv::Mat input_rgb = cv::imread("src/dataset-path/img_1.png", cv::IMREAD_COLOR);
cv::Mat input_depth = cv::imread("src/dataset-path/image_1_depth.png", cv::IMREAD_ANYDEPTH);

but i can't read, with for loop , every images sequentially.

How can i do?

Thanks!

C++ read rgb+depth images sequentiallysequentially [SOLVED]

Hi, i have a dataset that contains 250 rgb and depth images. Every rgb image has a depth image, like this: img_1.png, img_1_depth.png, img_2.png, img_2_depth.png ... and so on.

I would read rgb image + depth image and save the associated point cloud on pcd file. I read like this:

cv::Mat input_rgb = cv::imread("src/dataset-path/img_1.png", cv::IMREAD_COLOR);
cv::Mat input_depth = cv::imread("src/dataset-path/image_1_depth.png", cv::IMREAD_ANYDEPTH);

but i can't read, with for loop , every images sequentially.

How can i do?

Thanks!