CARLA
 
载入中...
搜索中...
未找到
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
10
11namespace carla {
12namespace image {
13
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;
28 ImageView::MakeColorConvertedView<MutableImageView, DstPixelT>(image_view, converter),
29 image_view);
30 }
31 };
32
33} // namespace image
34} // namespace carla
static void ConvertInPlace(MutableImageView &image_view, ColorConverter converter=ColorConverter())
static void CopyPixels(const SrcViewT &src, DstViewT &dst)
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133