19 #include "gtest/gtest.h" 21 #include <opencv2/opencv.hpp> 26 namespace perception {
32 cv::Mat cv_img(image->
rows(), image->
cols(), cv_type,
34 cv::imwrite(path, cv_img);
40 int cv_type = blob->
shape(2) == 1 ? CV_8UC1 : CV_8UC3;
41 cv::Mat cv_img(blob->
shape(0), blob->
shape(1), cv_type,
43 cv::imwrite(path, cv_img);
Dtype * mutable_cpu_data()
Color type() const
Definition: image_8u.h:119
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
A wrapper around Blob holders serving as the basic computational unit for images. ...
Definition: image_8u.h:44
void save_image(const std::string &path, base::Image8U *image)
Definition: camera_common_io_util.h:29
void save_blob(const std::string &path, base::Blob< uint8_t > *blob)
Definition: camera_common_io_util.h:37
void Reshape(const int num, const int channels, const int height, const int width)
Deprecated; use Reshape(const std::vector<int>& shape).
int cols() const
Definition: image_8u.h:121
int width_step() const
Definition: image_8u.h:123
uint8_t * mutable_cpu_data()
Definition: image_8u.h:95
int rows() const
Definition: image_8u.h:120
#define AINFO
Definition: log.h:42
const std::vector< int > & shape() const
Definition: blob.h:130