Apollo
v5.5.0
Open source self driving car software
modules
perception
camera
lib
traffic_light
detector
detection
cropbox.h
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright 2018 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
#pragma once
17
18
#include "
modules/perception/base/traffic_light.h
"
19
20
namespace
apollo
{
21
namespace
perception {
22
namespace
camera {
23
24
class
IGetBox
{
25
public
:
26
virtual
void
getCropBox
(
const
int
width,
const
int
height,
27
const
base::TrafficLightPtr
&light,
28
base::RectI
*crop_box) = 0;
29
};
30
31
class
CropBox
:
public
IGetBox
{
32
public
:
33
CropBox
(
float
crop_scale,
int
min_crop_size);
34
35
void
Init(
float
crop_scale,
int
min_crop_size);
36
37
virtual
void
getCropBox
(
const
int
width,
const
int
height,
38
const
base::TrafficLightPtr
&light,
39
base::RectI
*crop_box);
40
41
private
:
42
float
crop_scale_ = 2.5f;
43
int
min_crop_size_ = 270;
44
};
45
46
class
CropBoxWholeImage
:
public
IGetBox
{
47
public
:
48
virtual
void
getCropBox
(
const
int
width,
const
int
height,
49
const
base::TrafficLightPtr
&light,
50
base::RectI
*crop_box);
51
};
52
53
}
// namespace camera
54
}
// namespace perception
55
}
// namespace apollo
apollo::perception::camera::IGetBox::getCropBox
virtual void getCropBox(const int width, const int height, const base::TrafficLightPtr &light, base::RectI *crop_box)=0
apollo
Definition:
blob.h:72
apollo::perception::camera::IGetBox
Definition:
cropbox.h:24
apollo::perception::camera::CropBoxWholeImage
Definition:
cropbox.h:46
apollo::perception::base::TrafficLightPtr
std::shared_ptr< TrafficLight > TrafficLightPtr
Definition:
traffic_light.h:88
apollo::perception::camera::CropBox
Definition:
cropbox.h:31
traffic_light.h
apollo::perception::base::Rect< int >
Generated by
1.8.13