easimage
Classes | Macros | Functions | Variables
easimage.h File Reference
#include <linux/videodev2.h>
#include <SDL/SDL.h>
Include dependency graph for easimage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Camera
 Represents an image capturing device. More...
 
struct  Image
 Stores an image. More...
 
struct  Viewer
 Represents an image presenting device. More...
 

Macros

#define QUOTE(name)   #name
 
#define STR(macro)   QUOTE(macro)
 
#define RGB24   V4L2_PIX_FMT_RGB24
 
#define BGR24   V4L2_PIX_FMT_BGR24
 
#define YUYV   V4L2_PIX_FMT_YUYV
 
#define RGB32   V4L2_PIX_FMT_RGB32
 
#define RGBA32   V4L2_PIX_FMT_RGB32
 
#define RGB48   V4L2_PIX_FMT_RGB48
 
#define GREY   V4L2_PIX_FMT_GREY
 
#define MJPEG   V4L2_PIX_FMT_MJPEG
 
#define min(a, b)   ( a<b ? a : b )
 
#define max(a, b)   ( a>b ? a : b )
 

Functions

void init_easimage ()
 Init easimage.
 
void quit_easimage ()
 Quit easimage. More...
 
void waitTime (unsigned int milliseconds)
 Delay for a given number of milliseconds. More...
 
long int GetTime ()
 GetTime. More...
 
int kbhit ()
 
int appProcEvents ()
 
CameracamOpen (char *dev_name, unsigned int width, unsigned int height, int format)
 
unsigned int camGetWidth (Camera *cam)
 
unsigned int camGetHeight (Camera *cam)
 
ImagecamGrabNewImage (Camera *cam)
 
int camGrabImage (Camera *cam, Image *img)
 
void camClose (Camera *cam)
 
int camPrintCaps (Camera *cam)
 
ImageimgNew (unsigned int width, unsigned int height, unsigned short depth)
 Creates a new image. More...
 
ImageimgFromBitmap (const char *filename)
 Loads an image from a BMP image file. More...
 
ImageimgFromPPM (const char *filename)
 Loads an image from a PPM image file. More...
 
ImageimgFromFile (const char *filename)
 
int imgSavePPM (Image *img, char *fname)
 
int imgSavePAM (Image *img, char *fname)
 
int imgSaveRAW (Image *img, char *fname)
 Save RAW file. More...
 
ImageimgCopy (Image *img)
 Creates a copy of an Image. More...
 
void imgScale (Image *img, unsigned int sfactor)
 Scales an image.
 
ImageimgCrop (Image *img, int x1, int y1, int x2, int y2)
 Crops an image. More...
 
ImageimgCreateGaussian (int dim, float sig)
 
ImageimgConvolution (Image *img1, Image *img2, Image *res)
 Image convolution. More...
 
int imgFindPattern (Image *img, Image *pat, int *best_x, int *best_y)
 Searches image for a pattern. More...
 
int imgFindPatternArea (Image *img, Image *pat, int x1, int y1, int x2, int y2, int *best_x, int *best_y)
 Searches image area for a pattern. More...
 
void imgDestroy (Image *img)
 Destroys the image.
 
void imgMakeSymmetricX (Image *img)
 
void imgMakeSymmetricY (Image *img)
 
void imgMakeSymmetric (Image *img)
 
int imgGetSymmetryError (Image *img, int x, int y, int radius)
 Evaluates simmetry error at location. More...
 
ImageimgPatternDifference (Image *img, Image *pat, Image *res, int x1, int y1, int x2, int y2)
 Searches image for a pattern. More...
 
int imgGetPixelDifference (unsigned char *p1, unsigned char *p2)
 
int imgGetSumArea (Image *img, int x1, int y1, int x2, int y2)
 Evaluates the addition of pixel components. More...
 
float imgGetMeanArea (Image *img, int x1, int y1, int x2, int y2)
 Evaluates the pixel component mean value. More...
 
float imgGetMean (Image *img)
 Evaluates the pixel component mean value. More...
 
unsigned int imgGetWidth (Image *img)
 
unsigned int imgGetHeight (Image *img)
 
void imgSetPixel (Image *img, unsigned int x, unsigned int y, unsigned char *pdata)
 
void imgSetPixelRGB (Image *img, unsigned int x, unsigned int y, unsigned char r, unsigned char g, unsigned char b)
 
void imgSetPixelRGBA (Image *img, unsigned int x, unsigned int y, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 
unsigned char * imgGetPixel (Image *img, unsigned int x, unsigned int y)
 Gets pixel data. More...
 
unsigned char * imgPixel (Image *img, unsigned int x, unsigned int y)
 
void MarkImagePositionRGB (Image *img, int x, int y, unsigned char r, unsigned char g, unsigned char b)
 
void MarkImagePosition (Image *img, int x, int y)
 
ViewerviewOpen (unsigned int width, unsigned int height, const char *title)
 
void viewDisplayImage (Viewer *view, Image *img)
 Displays an Image. More...
 
void viewClose (Viewer *view)
 Terminates the viewer. More...
 
int viewPollEvent (SDL_Event *event)
 Polls for currently pending events. More...
 

Variables

int easimageAppEnd
 Global termination flag.
 

Detailed Description

Author
Miguel Leitao

Easimage headerfile