VisionCpp
0.0.1
include
operators
convert
OP_BGRToRGB.hpp
Go to the documentation of this file.
1
// This file is part of VisionCpp, a lightweight C++ template library
2
// for computer vision and image processing.
3
//
4
// Copyright (C) 2016 Codeplay Software Limited. All Rights Reserved.
5
//
6
// Contact: visioncpp@codeplay.com
7
//
8
// Licensed under the Apache License, Version 2.0 (the "License");
9
// you may not use this file except in compliance with the License.
10
// You may obtain a copy of the License at
11
//
12
// http://www.apache.org/licenses/LICENSE-2.0
13
//
14
// Unless required by applicable law or agreed to in writing, software
15
// distributed under the License is distributed on an "AS IS" BASIS,
16
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
// See the License for the specific language governing permissions and
18
// limitations under the License.
19
20
/// \file OP_BGRToRGB.hpp
21
/// \brief it converts BGR pixel to RGB pixel
22
23
namespace
visioncpp
{
24
/// \brief This functor reorders channels BGR to RGB
25
struct
OP_BGRToRGB
{
26
/// \brief functor that reorders channels, e.g. HSV becomes VSH
27
/// \param in - three channel unsigned char
28
/// \return U8C3 - three channel unsigned char
29
visioncpp::pixel::U8C3
operator()
(
visioncpp::pixel::U8C3
in) {
30
return
visioncpp::pixel::U8C3
(
static_cast<
unsigned
char
>
(in[2]),
31
static_cast<
unsigned
char
>
(in[1]),
32
static_cast<
unsigned
char
>
(in[0]));
33
}
34
};
35
}
visioncpp::pixel::U8C3
Storage< unsigned char, 3 > U8C3
Definition:
pixel.hpp:136
visioncpp
VisionCpp namespace.
Definition:
sycl/device.hpp:24
visioncpp::OP_BGRToRGB
This functor reorders channels BGR to RGB.
Definition:
OP_BGRToRGB.hpp:25
visioncpp::OP_BGRToRGB::operator()
visioncpp::pixel::U8C3 operator()(visioncpp::pixel::U8C3 in)
functor that reorders channels, e.g.
Definition:
OP_BGRToRGB.hpp:29
visioncpp::pixel::Storage
Definition:
pixel.hpp:85
Generated on Thu Apr 18 2024 09:07:15 for VisionCpp by
1.9.1