VLFeat.org

API docs

  • Home
    • Download and Install
    • API docs
    • Matlab docs
    • About VLFeat
  • Tutorials
    • SIFT
    • MSER
    • IKM
    • HIKM
    • AIB
    • Utils
  • Main Page
  • Related Pages
  • Data Structures
  • Files
  • Examples

pgm.h

Go to the documentation of this file.
00001 
00006 /* AUTORIGHTS
00007 Copyright 2007 (c) Andrea Vedaldi and Brian Fulkerson
00008 
00009 This file is part of VLFeat, available in the terms of the GNU
00010 General Public License version 2.
00011 */
00012 
00013 #include "generic.h"
00014 #include <stdio.h>
00015 
00016 #ifndef VL_PGM
00017 #define VL_PGM
00018 
00021 #define VL_ERR_PGM_INV_HEAD  101 
00022 #define VL_ERR_PGM_INV_META  102 
00023 #define VL_ERR_PGM_INV_DATA  103 
00024 #define VL_ERR_PGM_IO        104 
00026 
00027 
00034 struct _VlPgmImage
00035 {
00036   int        width ;     
00037   int        height ;    
00038   int        max_value ; 
00039   vl_bool    is_raw ;    
00040 };
00041 
00045 typedef struct  _VlPgmImage  VlPgmImage ;
00046 
00049 VL_EXPORT int vl_pgm_extract_head  (FILE *f, VlPgmImage       *im) ;
00050 VL_EXPORT int vl_pgm_extract_data  (FILE *f, VlPgmImage const *im, void *data) ;
00051 VL_EXPORT int vl_pgm_insert        (FILE *f, 
00052                                     VlPgmImage const *im, 
00053                                     void const*data ) ;
00054 VL_EXPORT int vl_pgm_get_npixels   (VlPgmImage const *im) ;
00055 VL_EXPORT int vl_pgm_get_bpp       (VlPgmImage const *im) ;
00060 VL_EXPORT int vl_pgm_write         (char const *name,
00061                                     vl_uint8 const *data, 
00062                                     int width, int height) ;
00063 VL_EXPORT int vl_pgm_write_f       (char const *name,
00064                                     float const *data, 
00065                                     int width, int height) ;
00066 VL_EXPORT int vl_pgm_read_new      (char const *name,
00067                                     VlPgmImage *im,
00068                                     vl_uint8 **data) ;
00069 VL_EXPORT int vl_pgm_read_new_f    (char const *name,
00070                                     VlPgmImage *im,
00071                                     float **data) ;
00072 
00074 /* VL_PGM */
00075 #endif
Copyright © 2008 Andrea Vedaldi and Brian Fulkerson