YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
DeBayer.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
14#ifndef YARP_SIG_IMPL_DEBAYER_H
15#define YARP_SIG_IMPL_DEBAYER_H
16
17#include <yarp/sig/Image.h>
18
19inline bool isBayer8(int v)
20{
22 return true;
23 } else {
24 return false;
25 }
26}
27
28inline bool isBayer16(int v)
29{
31 return true;
32 } else {
33 return false;
34 }
35}
36
37/*
38 * Nearest neighbor debayer implementation (warning: skip borders)
39 */
40bool deBayer_GRBG8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
41
42bool deBayer_BGGR8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
43
44bool deBayer_RGGB8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
45
46/*
47 * Nearest neighbor debayer implementation (warning: skip borders)
48 */
49bool deBayer_GRBG8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
50
51bool deBayer_BGGR8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
52
53inline bool deBayer_RGGB8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
54
55#endif // YARP_SIG_IMPL_DEBAYER_H
bool deBayer_GRBG8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition DeBayer.cpp:75
bool deBayer_BGGR8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition DeBayer.cpp:153
bool isBayer8(int v)
Basic implementations of debayering functions.
Definition DeBayer.h:19
bool isBayer16(int v)
Definition DeBayer.h:28
bool deBayer_RGGB8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition DeBayer.cpp:147
bool deBayer_GRBG8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition DeBayer.cpp:9
bool deBayer_RGGB8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition DeBayer.cpp:159
bool deBayer_BGGR8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition DeBayer.cpp:141
@ VOCAB_PIXEL_ENCODING_BAYER_BGGR16
Definition Image.h:59
@ VOCAB_PIXEL_ENCODING_BAYER_BGGR8
Definition Image.h:58
@ VOCAB_PIXEL_ENCODING_BAYER_RGGB8
Definition Image.h:62
@ VOCAB_PIXEL_ENCODING_BAYER_GRBG8
Definition Image.h:56
@ VOCAB_PIXEL_ENCODING_BAYER_GBRG16
Definition Image.h:61
@ VOCAB_PIXEL_ENCODING_BAYER_GRBG16
Definition Image.h:57
@ VOCAB_PIXEL_ENCODING_BAYER_GBRG8
Definition Image.h:60
@ VOCAB_PIXEL_ENCODING_BAYER_RGGB16
Definition Image.h:63
Base class for storing images.
Definition Image.h:79