BRL-CAD
icv.h File Reference
#include "common.h"
#include <stddef.h>
Include dependency graph for icv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  icv_image
 

Macros

#define ICV_NULL_IMAGE   0X0001
 
#define ICV_SANITIZED   0X0002
 
#define ICV_OPERATIONS_MODE   0x0004
 
#define ICV_UNDEFINED_1   0x0008
 
#define ICV_IMAGE_NULL   ((struct icv_image *)0)
 
#define ICV_CK_IMAGE(_i)   ICV_CKMAG(_i, ICV_IMAGE_MAGIC, "icv_image")
 
#define ICV_IMAGE_INIT(_i)
 
#define ICV_IMAGE_IS_INITIALIZED(_i)   (((struct icv_image *)(_i) != ICV_IMAGE_NULL) && LIKELY((_i)->magic == ICV_IMAGE_MAGIC))
 
#define ICV_IMAGE_VAL_INT(_i)   if (!ICV_IMAGE_IS_INITIALIZED(_i)) return -1
 
#define ICV_IMAGE_VAL_PTR(_i)   if (!ICV_IMAGE_IS_INITIALIZED(_i)) return NULL
 
#define ICV_CONV_8BIT(data)   ((double)(data))/255.0
 
#define icv_rgb2gray_ntsc(_a)   icv_rgb2gray(_a, ICV_COLOR_RGB, 0.30, 0.59, 0.11)
 
#define icv_rgb2gray_crt(_a)   icv_rgb2gray(_a, ICV_COLOR_RGB, 0.26, 0.66, 0.08)
 

Typedefs

typedef struct icv_image icv_image_t
 

Enumerations

enum  ICV_IMAGE_FORMAT {
  ICV_IMAGE_AUTO, ICV_IMAGE_PIX, ICV_IMAGE_BW, ICV_IMAGE_DPIX,
  ICV_IMAGE_ALIAS, ICV_IMAGE_BMP, ICV_IMAGE_CI, ICV_IMAGE_ORLE,
  ICV_IMAGE_PNG, ICV_IMAGE_PPM, ICV_IMAGE_PS, ICV_IMAGE_RLE,
  ICV_IMAGE_SPM, ICV_IMAGE_SUN, ICV_IMAGE_YUV, ICV_IMAGE_UNKNOWN
}
 
enum  ICV_COLOR_SPACE { ICV_COLOR_SPACE_RGB, ICV_COLOR_SPACE_GRAY }
 
enum  ICV_DATA { ICV_DATA_DOUBLE, ICV_DATA_UCHAR }
 
enum  ICV_COLOR {
  ICV_COLOR_RGB, ICV_COLOR_R, ICV_COLOR_G, ICV_COLOR_B,
  ICV_COLOR_RG, ICV_COLOR_RB, ICV_COLOR_BG
}
 
enum  ICV_FILTER {
  ICV_FILTER_LOW_PASS, ICV_FILTER_LAPLACIAN, ICV_FILTER_HORIZONTAL_GRAD, ICV_FILTER_VERTICAL_GRAD,
  ICV_FILTER_HIGH_PASS, ICV_FILTER_NULL, ICV_FILTER_BOXCAR_AVERAGE
}
 
enum  ICV_FILTER3 {
  ICV_FILTER3_LOW_PASS, ICV_FILTER3_HIGH_PASS, ICV_FILTER3_BOXCAR_AVERAGE, ICV_FILTER3_ANIMATION_SMEAR,
  ICV_FILTER3_NULL
}
 
enum  ICV_RESIZE_METHOD { ICV_RESIZE_UNDERSAMPLE, ICV_RESIZE_SHRINK, ICV_RESIZE_NINTERP, ICV_RESIZE_BINTERP }
 

Functions

ICV_IMAGE_FORMAT icv_guess_file_format (const char *filename, char *trimmedname)
 
icv_image_ticv_create (int width, int height, ICV_COLOR_SPACE color_space)
 
int icv_writeline (icv_image_t *bif, int y, void *data, ICV_DATA type)
 
int icv_writepixel (icv_image_t *bif, int x, int y, double *data)
 
int icv_write (icv_image_t *bif, const char *filename, ICV_IMAGE_FORMAT format)
 
icv_image_ticv_read (const char *filename, int format, int width, int height)
 
icv_image_ticv_zero (icv_image_t *bif)
 
int icv_destroy (icv_image_t *bif)
 
int icv_gray2rgb (icv_image_t *img)
 
int icv_rgb2gray (icv_image_t *img, ICV_COLOR color, double rweight, double gweight, double bweight)
 
int icv_rect (icv_image_t *img, int xorig, int yorig, int xnum, int ynum)
 
int icv_crop (icv_image_t *img, int ulx, int uly, int urx, int ury, int lrx, int lry, int llx, int lly, unsigned int ynum, unsigned int xnum)
 
int icv_sanitize (icv_image_t *img)
 
int icv_add_val (icv_image_t *img, double val)
 
int icv_multiply_val (icv_image_t *img, double val)
 
int icv_divide_val (icv_image_t *img, double val)
 
int icv_pow_val (icv_image_t *img, double val)
 
icv_image_ticv_add (icv_image_t *img1, icv_image_t *img2)
 
icv_image_ticv_sub (icv_image_t *img1, icv_image_t *img2)
 
icv_image_ticv_multiply (icv_image_t *img1, icv_image_t *img2)
 
icv_image_ticv_divide (icv_image_t *img1, icv_image_t *img2)
 
int icv_saturate (icv_image_t *img, double sat)
 
int icv_filter (icv_image_t *img, ICV_FILTER filter_type)
 
icv_image_ticv_filter3 (icv_image_t *old_img, icv_image_t *curr_img, icv_image_t *new_img, ICV_FILTER3 filter_type)
 
int icv_fade (icv_image_t *img, double fraction)
 
size_t ** icv_hist (icv_image_t *img, int n_bins)
 
double * icv_min (icv_image_t *img)
 
double * icv_mean (icv_image_t *img)
 
double * icv_sum (icv_image_t *img)
 
double * icv_max (icv_image_t *img)
 
int * icv_mode (icv_image_t *img, size_t **bins, int n_bins)
 
int * icv_median (icv_image_t *img, size_t **bins, int n_bins)
 
double * icv_skew (icv_image_t *img, size_t **bins, int n_bins)
 
double * icv_var (icv_image_t *img, size_t **bins, int n_bins)
 
int icv_resize (icv_image_t *bif, ICV_RESIZE_METHOD method, unsigned int out_width, unsigned int out_height, unsigned int factor)
 
int icv_rot (int argv, char **argc)
 

Detailed Description

Functions provided by the LIBICV image processing library.

Definition in file icv.h.

Function Documentation

int icv_rot ( int  argv,
char **  argc 
)

Rotate an image. s [-rifb | -a angle] [-# bytes] [-s squaresize] [-w width] [-n height] [-o outputfile] inputfile [> outputfile]

Definition at line 285 of file rot.c.

References bp, bu_exit(), bu_free(), bu_fseek(), bu_log(), bu_malloc(), bu_setprogname(), buflines, firsty, get_args(), invert, lasty, minus90, nxin, nyin, obp, pixbytes, plus90, reverse, scanbytes, SEEK_SET, xout, yin, and yout.

Here is the call graph for this function: