Apollo 10.0
自动驾驶开放平台
smartereye_handler.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2020 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 <functional>
20#include <iostream>
21#include <string>
22
23#include "cyber/cyber.h"
24#include "third_party/camera_library/smartereye/include/calibrationparams.h"
25#include "third_party/camera_library/smartereye/include/camerahandler.h"
26#include "third_party/camera_library/smartereye/include/rotationmatrix.h"
27
28namespace apollo {
29namespace drivers {
30namespace smartereye {
31
32typedef std::function<bool(RawImageFrame *rawFrame)> CallbackFunc;
33
34class SmartereyeHandler : public CameraHandler {
35 public:
36 explicit SmartereyeHandler(std::string name);
38 void handleRawFrame(const RawImageFrame *rawFrame);
39 bool SetCallback(CallbackFunc ptr);
40 void handleUpdateFinished(Result result) {}
41
42 protected:
43 void handleDisparityPointByPoint(unsigned char *image, int width, int height,
44 int bitNum) {}
45 void handleDisparityByLookupTable(unsigned char *image, int width, int height,
46 int bitNum) {}
47
48 private:
49 std::string mName = nullptr;
50 CallbackFunc pCallbackFunc = nullptr;
51};
52
53} // namespace smartereye
54} // namespace drivers
55} // namespace apollo
void handleDisparityByLookupTable(unsigned char *image, int width, int height, int bitNum)
void handleDisparityPointByPoint(unsigned char *image, int width, int height, int bitNum)
void handleRawFrame(const RawImageFrame *rawFrame)
std::function< bool(RawImageFrame *rawFrame)> CallbackFunc
class register implement
Definition arena_queue.h:37