CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
image
ImageConverter.h
浏览该文件的文档.
1
// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2
// de Barcelona (UAB).
3
//
4
// This work is licensed under the terms of the MIT license.
5
// For a copy, see <https://opensource.org/licenses/MIT>.
6
7
#pragma once
8
9
#include "
carla/image/ImageView.h
"
10
11
namespace
carla
{
12
namespace
image {
13
14
class
ImageConverter
{
15
public
:
16
17
template
<
typename
SrcViewT,
typename
DstViewT>
18
static
void
CopyPixels
(
const
SrcViewT &src, DstViewT &dst) {
19
boost::gil::copy_pixels(src, dst);
20
}
21
22
template
<
typename
ColorConverter,
typename
MutableImageView>
23
static
void
ConvertInPlace
(
24
MutableImageView &image_view,
25
ColorConverter
converter =
ColorConverter
()) {
26
using
DstPixelT =
typename
MutableImageView::value_type;
27
CopyPixels
(
28
ImageView::MakeColorConvertedView<MutableImageView, DstPixelT>(image_view, converter),
29
image_view);
30
}
31
};
32
33
}
// namespace image
34
}
// namespace carla
ImageView.h
carla::image::ColorConverter
Definition
ColorConverter.h:15
carla::image::ImageConverter
Definition
ImageConverter.h:14
carla::image::ImageConverter::ConvertInPlace
static void ConvertInPlace(MutableImageView &image_view, ColorConverter converter=ColorConverter())
Definition
ImageConverter.h:23
carla::image::ImageConverter::CopyPixels
static void CopyPixels(const SrcViewT &src, DstViewT &dst)
Definition
ImageConverter.h:18
carla
This file contains definitions of common data structures used in traffic manager.
Definition
Carla.cpp:133
制作者
1.10.0