VisionCpp  0.0.1
OP_ScaleChannel.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_ScaleChannel.hpp
21 /// \brief This files contains structs that change different channels by factor
22 /// passed via float f.
23 
24 namespace visioncpp {
25 /// \struct OP_ScaleChannelZero
26 /// \brief This custom functor changes 0 channel by factor passed via float f.
28  /// \param lhs - Pixel in HSV color space
29  /// \param f - S channel multiplier
30  /// \return F32C3 - Altered HSV color space pixel
32  lhs[0] *= f;
33  return lhs;
34  }
35 };
36 
37 /// \struct OP_ScaleChannelOne
38 /// \brief This custom functor changes 1 channel by factor passed via float f.
40  /// \param lhs - Pixel in HSV color space
41  /// \param f - S channel multiplier
42  /// \return F32C3 - Altered HSV color space pixel
44  lhs[1] *= f;
45  return lhs;
46  }
47 };
48 
49 /// \struct OP_ScaleChannelTwo
50 /// \brief This custom functor changes 2 channel by factor passed via float f.
52  /// \param lhs - Pixel in HSV color space
53  /// \param f - S channel multiplier
54  /// \return F32C3 - Altered HSV color space pixel
56  lhs[2] *= f;
57  return lhs;
58  }
59 };
60 }
VisionCpp namespace.
Definition: sycl/device.hpp:24
This custom functor changes 1 channel by factor passed via float f.
visioncpp::pixel::F32C3 operator()(visioncpp::pixel::F32C3 lhs, float f)
This custom functor changes 2 channel by factor passed via float f.
visioncpp::pixel::F32C3 operator()(visioncpp::pixel::F32C3 lhs, float f)
This custom functor changes 0 channel by factor passed via float f.
visioncpp::pixel::F32C3 operator()(visioncpp::pixel::F32C3 lhs, float f)