Apollo 10.0
自动驾驶开放平台
util.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2022 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
17#pragma once
18
19#include <string>
20#include <vector>
21
22#include "opencv2/opencv.hpp"
23
27
28namespace apollo {
29namespace perception {
30namespace camera {
31
40bool FillImage(onboard::CameraFrame* frame, const std::string& file_name);
41
50bool RecoveryImage(onboard::CameraFrame* frame, cv::Mat* cv_img);
51
60bool GetFileListFromPath(const std::string& file_path,
61 std::vector<std::string>* file_list);
62
71bool GetFileListFromFile(const std::string& file_name,
72 std::vector<std::string>* file_list);
73
82bool SaveCameraDetectionResult(onboard::CameraFrame* frame,
83 const std::string& file_name);
84
85bool SaveTfDetectionResult(onboard::CameraFrame* frame,
86 const std::string& file_name);
87
88bool SaveLaneDetectionResult(onboard::CameraFrame* frame,
89 const std::string& file_name);
90
91} // namespace camera
92} // namespace perception
93} // namespace apollo
bool RecoveryImage(onboard::CameraFrame *frame, cv::Mat *cv_img)
Recovery cv image from frame->data_provider
Definition util.cc:46
bool FillImage(onboard::CameraFrame *frame, const std::string &file_name)
Read image from file_name and fill in frame->data_provider
Definition util.cc:28
bool SaveLaneDetectionResult(onboard::CameraFrame *frame, const std::string &file_name)
Definition util.cc:119
bool GetFileListFromPath(const std::string &file_path, std::vector< std::string > *file_list)
Get the File List From Path object
Definition util.cc:58
bool GetFileListFromFile(const std::string &file_name, std::vector< std::string > *file_list)
Get the File List From File object
Definition util.cc:64
bool SaveTfDetectionResult(onboard::CameraFrame *frame, const std::string &file_name)
Definition util.cc:114
bool SaveCameraDetectionResult(onboard::CameraFrame *frame, const std::string &file_name)
Save detection result to file_name
Definition util.cc:84
class register implement
Definition arena_queue.h:37