YARP
Yet Another Robot Platform
DeBayer.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
17 #ifndef YARP_SIG_IMPL_DEBAYER_H
18 #define YARP_SIG_IMPL_DEBAYER_H
19 
20 #include <yarp/sig/Image.h>
21 
22 inline bool isBayer8(int v)
23 {
28  return true;
29  else
30  return false;
31 }
32 
33 inline bool isBayer16(int v)
34 {
39  return true;
40  else
41  return false;
42 }
43 
44 /*
45  * Nearest neighbor debayer implementation (warning: skip borders)
46  */
47 bool deBayer_GRBG8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
48 
49 bool deBayer_BGGR8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
50 
51 bool deBayer_RGGB8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
52 
53 /*
54  * Nearest neighbor debayer implementation (warning: skip borders)
55  */
56 bool deBayer_GRBG8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
57 
58 bool deBayer_BGGR8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
59 
60 inline bool deBayer_RGGB8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize);
61 
62 #endif // YARP_SIG_IMPL_DEBAYER_H
deBayer_BGGR8_TO_BGR
bool deBayer_BGGR8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition: DeBayer.cpp:156
VOCAB_PIXEL_ENCODING_BAYER_BGGR16
@ VOCAB_PIXEL_ENCODING_BAYER_BGGR16
Definition: Image.h:65
VOCAB_PIXEL_ENCODING_BAYER_RGGB8
@ VOCAB_PIXEL_ENCODING_BAYER_RGGB8
Definition: Image.h:68
deBayer_RGGB8_TO_BGR
bool deBayer_RGGB8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition: DeBayer.cpp:162
VOCAB_PIXEL_ENCODING_BAYER_RGGB16
@ VOCAB_PIXEL_ENCODING_BAYER_RGGB16
Definition: Image.h:69
VOCAB_PIXEL_ENCODING_BAYER_GBRG16
@ VOCAB_PIXEL_ENCODING_BAYER_GBRG16
Definition: Image.h:67
deBayer_BGGR8_TO_RGB
bool deBayer_BGGR8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition: DeBayer.cpp:144
VOCAB_PIXEL_ENCODING_BAYER_GRBG16
@ VOCAB_PIXEL_ENCODING_BAYER_GRBG16
Definition: Image.h:63
VOCAB_PIXEL_ENCODING_BAYER_GBRG8
@ VOCAB_PIXEL_ENCODING_BAYER_GBRG8
Definition: Image.h:66
deBayer_GRBG8_TO_BGR
bool deBayer_GRBG8_TO_BGR(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition: DeBayer.cpp:12
isBayer8
bool isBayer8(int v)
Basic implementations of debayering functions.
Definition: DeBayer.h:22
Image.h
yarp::sig::Image
Base class for storing images.
Definition: Image.h:85
deBayer_GRBG8_TO_RGB
bool deBayer_GRBG8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition: DeBayer.cpp:78
deBayer_RGGB8_TO_RGB
bool deBayer_RGGB8_TO_RGB(yarp::sig::Image &source, yarp::sig::Image &dest, int pixelSize)
Definition: DeBayer.cpp:150
isBayer16
bool isBayer16(int v)
Definition: DeBayer.h:33
VOCAB_PIXEL_ENCODING_BAYER_BGGR8
@ VOCAB_PIXEL_ENCODING_BAYER_BGGR8
Definition: Image.h:64
VOCAB_PIXEL_ENCODING_BAYER_GRBG8
@ VOCAB_PIXEL_ENCODING_BAYER_GRBG8
Definition: Image.h:62