00001 /* --------------------------------------------------------------------------- 00002 Phission : 00003 Realtime Vision Processing System 00004 00005 Copyright (C) 2003-2006 Philip D.S. Thoren (pthoren@cs.uml.edu) 00006 University of Massachusetts at Lowell, 00007 Laboratory for Artificial Intelligence and Robotics 00008 00009 This file is part of Phission. 00010 00011 Phission is free software; you can redistribute it and/or modify 00012 it under the terms of the GNU Lesser General Public License as published by 00013 the Free Software Foundation; either version 2 of the License, or 00014 (at your option) any later version. 00015 00016 Phission is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU Lesser General Public License for more details. 00020 00021 You should have received a copy of the GNU Lesser General Public License 00022 along with Phission; if not, write to the Free Software 00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 00025 ---------------------------------------------------------------------------*/ 00026 #ifndef _IMAGEUTIL_H 00027 #define _IMAGEUTIL_H 00028 00029 #include <phStandard.h> 00030 #include <phStdint.h> 00031 00032 /* ------------------------------------------------------------------------- */ 00033 #ifdef __cplusplus 00034 extern "C" 00035 { 00036 #endif /* __cplusplus */ 00037 00047 #define phResizeBilinear (1<<1) 00048 #define phResizeNN (1<<2) 00049 00050 /* ------------------------------------------------------------------------- */ 00051 /* Bilinear conversion functions */ 00052 /* ------------------------------------------------------------------------- */ 00057 typedef struct ph_bilinear_table_t *ph_bilinear_table_type; 00058 #define bl_table_type ph_bilinear_table_type 00059 00063 PHAPI(int) ph_bilinear_scale(const uint8_t *image, 00064 const uint32_t w, /* input width */ 00065 const uint32_t h, /* input height */ 00066 const uint32_t f, /* input format */ 00067 const uint32_t nw, /* new width */ 00068 const uint32_t nh, /* new height */ 00069 ph_bilinear_table_type *table, 00070 uint8_t **pscaled_image ); 00071 00072 PHAPI(void) ph_bilinear_table_free(ph_bilinear_table_type *table); 00073 00074 /* ------------------------------------------------------------------------- */ 00075 /* Nearest Neighbor conversion functions */ 00076 /* ------------------------------------------------------------------------- */ 00077 typedef struct ph_nearest_neighbor_table_t *ph_nearest_neighbor_table_type; 00078 #define ph_nn_table_type ph_nearest_neighbor_table_type 00083 PHAPI(int) ph_nearest_neighbor_scale(const uint8_t *image, 00084 const uint32_t w, /* input width */ 00085 const uint32_t h, /* input height */ 00086 const uint32_t f, /* input format */ 00087 const uint32_t nw, /* new width */ 00088 const uint32_t nh, /* new height */ 00089 ph_nn_table_type *table, 00090 uint8_t **pscaled_image ); 00091 00092 PHAPI(void) ph_nearest_neighbor_table_free(ph_nn_table_type *table); 00093 00094 /* ------------------------------------------------------------------------- */ 00095 /* Image crop function */ 00096 /* ------------------------------------------------------------------------- */ 00101 PHAPI(int) ph_image_crop(const uint8_t *imgptr, 00102 const uint32_t in_w, /* input width */ 00103 const uint32_t in_h, /* input height */ 00104 const uint32_t in_f, /* input format */ 00105 uint32_t x1, 00106 uint32_t y1, 00107 uint32_t x2, 00108 uint32_t y2, 00109 uint8_t **pcropped_image, 00110 uint32_t *ps, 00111 uint32_t *pw, 00112 uint32_t *ph ); 00113 /* end \addtogroup Image_Utility */ /* end \addtogroup Image */ 00116 00117 /* ------------------------------------------------------------------------- */ 00118 #ifdef __cplusplus 00119 } 00120 #endif /* __cplusplus */ 00121 00122 #endif /* _IMAGEUTIL_H */
| Copyright (C) 2002 - 2007 |
Philip D.S. Thoren ( pthoren@users.sourceforge.net ) University Of Massachusetts at Lowell Robotics Lab |
|
1.4.4