conversions.cpp File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "conversions.h"
#include <dc1394_control.h>

Defines

#define YUYV
#define YUV2RGB(y, u, v, r, g, b)
#define RGB2YUV(r, g, b, y, u, v)
#define CLIP(in, out)

Functions

void yuyv2uyvy (unsigned char *src, unsigned char *dest, int NumPixels)
void uyvy2yuyv (unsigned char *src, unsigned char *dest, int NumPixels)
void uyyvyy2uyvy (unsigned char *src, unsigned char *dest, int NumPixels)
void uyv2uyvy (unsigned char *src, unsigned char *dest, int NumPixels)
void y2uyvy (unsigned char *src, unsigned char *dest, int NumPixels)
void y162uyvy (unsigned char *src, unsigned char *dest, int NumPixels, int bits)
void y162y (unsigned char *src, unsigned char *dest, int NumPixels, int bits)
void rgb2uyvy (unsigned char *src, unsigned char *dest, int NumPixels)
void rgb482uyvy (unsigned char *src, unsigned char *dest, int NumPixels)
void rgb482rgb (unsigned char *src, unsigned char *dest, int NumPixels)
void uyv2rgb (unsigned char *src, unsigned char *dest, int NumPixels)
void uyv2bgr (unsigned char *src, unsigned char *dest, int NumPixels)
void uyvy2rgb (unsigned char *src, unsigned char *dest, int NumPixels)
void uyvy2bgr (unsigned char *src, unsigned char *dest, int NumPixels)
void uyyvyy2rgb (unsigned char *src, unsigned char *dest, int NumPixels)
void uyyvyy2bgr (unsigned char *src, unsigned char *dest, int NumPixels)
void y2rgb (unsigned char *src, unsigned char *dest, int NumPixels)
void y162rgb (unsigned char *src, unsigned char *dest, int NumPixels, int bits)
void BayerNearestNeighbor (unsigned char *src, unsigned char *dest, int sx, int sy, bayer_pattern_t type)
void BayerEdgeSense (unsigned char *src, unsigned char *dest, int sx, int sy, bayer_pattern_t type)
void BayerDownsample (unsigned char *src, unsigned char *dest, int sx, int sy, bayer_pattern_t type)
void StereoDecode (unsigned char *src, unsigned char *dest, int NumPixels)
void convert_to_rgb (unsigned char *src, unsigned char *dest, int mode, int width, int height, int f7_colormode, int bayer, int bits)
void convert_to_bgr (unsigned char *src, unsigned char *dest, int mode, int width, int height, int f7_colormode, int bayer, int bits)


Define Documentation

#define CLIP ( in,
out   ) 

Value:

{\
   in = in < 0 ? 0 : in;\
   in = in > 255 ? 255 : in;\
   out=in;\
}

#define RGB2YUV ( r,
g,
b,
y,
u,
 ) 

Value:

y = (306*r + 601*g + 117*b)  >> 10;\
  u = ((-172*r - 340*g + 512*b) >> 10)  + 128;\
  v = ((512*r - 429*g - 83*b) >> 10) + 128;\
  y = y < 0 ? 0 : y;\
  u = u < 0 ? 0 : u;\
  v = v < 0 ? 0 : v;\
  y = y > 255 ? 255 : y;\
  u = u > 255 ? 255 : u;\
  v = v > 255 ? 255 : v

#define YUV2RGB ( y,
u,
v,
r,
g,
 ) 

Value:

r = y + ((v*1436) >>10);\
  g = y - ((u*352 + v*731) >> 10);\
  b = y + ((u*1814) >> 10);\
  r = r < 0 ? 0 : r;\
  g = g < 0 ? 0 : g;\
  b = b < 0 ? 0 : b;\
  r = r > 255 ? 255 : r;\
  g = g > 255 ? 255 : g;\
  b = b > 255 ? 255 : b

#define YUYV


Function Documentation

void BayerDownsample ( unsigned char *  src,
unsigned char *  dest,
int  sx,
int  sy,
bayer_pattern_t  type 
)

void BayerEdgeSense ( unsigned char *  src,
unsigned char *  dest,
int  sx,
int  sy,
bayer_pattern_t  type 
)

void BayerNearestNeighbor ( unsigned char *  src,
unsigned char *  dest,
int  sx,
int  sy,
bayer_pattern_t  type 
)

void convert_to_bgr ( unsigned char *  src,
unsigned char *  dest,
int  mode,
int  width,
int  height,
int  f7_colormode,
int  bayer,
int  bits 
)

void convert_to_rgb ( unsigned char *  src,
unsigned char *  dest,
int  mode,
int  width,
int  height,
int  f7_colormode,
int  bayer,
int  bits 
)

void rgb2uyvy ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void rgb482rgb ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void rgb482uyvy ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void StereoDecode ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void uyv2bgr ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void uyv2rgb ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void uyv2uyvy ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void uyvy2bgr ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void uyvy2rgb ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void uyvy2yuyv ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void uyyvyy2bgr ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void uyyvyy2rgb ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void uyyvyy2uyvy ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void y162rgb ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels,
int  bits 
)

void y162uyvy ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels,
int  bits 
)

void y162y ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels,
int  bits 
)

void y2rgb ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void y2uyvy ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)

void yuyv2uyvy ( unsigned char *  src,
unsigned char *  dest,
int  NumPixels 
)


Generated on Tue Jan 30 15:33:07 2007 for camera1394_control.kdevelop by  doxygen 1.4.7