CARLA
ImageIO.h
Go to the documentation of this file.
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 
11 namespace carla {
12 namespace image {
13 
14  class ImageIO {
15  public:
16 
17  template <typename ImageT, typename IO = io::any>
18  static void ReadImage(const std::string &in_filename, ImageT &image, IO = IO()) {
19  IO::read_image(in_filename, image);
20  }
21 
22  template <typename ViewT, typename IO = io::any>
23  static std::string WriteView(std::string out_filename, const ViewT &image_view, IO = IO()) {
24  IO::write_view(out_filename, image_view);
25  return out_filename;
26  }
27  };
28 
29 } // namespace image
30 } // namespace carla
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
static std::string WriteView(std::string out_filename, const ViewT &image_view, IO=IO())
Definition: ImageIO.h:23
static void ReadImage(const std::string &in_filename, ImageT &image, IO=IO())
Definition: ImageIO.h:18