1 /******************************************************************* 2 * morpho_hdr_checker.h 3 * [CP932/CRLF] { p } 4 *------------------------------------------------------------------ 5 * Copyright (C) 2011-2012 Morpho,Inc. 6 *******************************************************************/ 7 8 #ifndef MORPHO_HDR_CHECKER_H 9 #define MORPHO_HDR_CHECKER_H 10 11 /*******************************************************************/ 12 13 #include "morpho_api.h" 14 #include "morpho_error.h" 15 #include "morpho_image_data.h" 16 17 /*******************************************************************/ 18 19 #define MORPHO_HDR_CHECKER_VER "Morpho DR Checker Ver.1.1.0 2012/1/17" 20 21 /*-----------------------------------------------------------------*/ 22 23 #define MORPHO_HDR_CHECKER_MIN_IMAGE_WIDTH 2 24 #define MORPHO_HDR_CHECKER_MAX_IMAGE_WIDTH 8192 25 #define MORPHO_HDR_CHECKER_MIN_IMAGE_HEIGHT 2 26 #define MORPHO_HDR_CHECKER_MAX_IMAGE_HEIGHT 8192 27 28 /*******************************************************************/ 29 30 typedef struct _morpho_HDRChecker morpho_HDRChecker; 31 32 /* HDRwW] */ 33 struct _morpho_HDRChecker 34 { 35 void *p; /**< \|C^ */ 36 }; 37 38 /* Eqx */ 39 typedef enum { 40 MORPHO_HDR_CHECKER_SENSITIVITY_SENSITIVE, 41 MORPHO_HDR_CHECKER_SENSITIVITY_NORMAL, 42 MORPHO_HDR_CHECKER_SENSITIVITY_INSENSITIVE, 43 } MORPHO_HDR_CHECKER_SENSITIVITY; 44 45 /*******************************************************************/ 46 47 #ifdef __cplusplus 48 extern "C" { 49 #endif 50 51 /** 52 * o[W 53 * 54 * @return o[W(MORPHO_EASY_HDR_VER) 55 */ 56 MORPHO_API(const char*) 57 morpho_HDRChecker_getVersion(void); 58 59 /** 60 * KvTCY 61 * 62 * @param[in] width 63 * @param[in] height 64 * @param[in] format tH[}bg 65 * @return KvTCY(byte) 66 */ 67 MORPHO_API(int) 68 morpho_HDRChecker_getBufferSize( 69 int width, 70 int height, 71 const char *format); 72 73 /** 74 * 75 * 76 * @param[in,out] p HDRCheckerCX^X 77 * @param[in] buffer HDRChecker|C^ 78 * @param[in] buffer_size HDRCheckerTCY 79 * @param[in] width 80 * @param[in] height 81 * @param[in] format tH[}bg 82 * @return G[R[h (see morpho_error.h) 83 */ 84 MORPHO_API(int) 85 morpho_HDRChecker_initialize( 86 morpho_HDRChecker * const p, 87 void * const buffer, 88 const int buffer_size, 89 const int width, 90 const int height, 91 const char *format); 92 93 /** 94 * N[Abv 95 * initialize()ss\ 96 * 97 * @param[in,out] p HDRCheckerCX^X 98 * @return G[R[h (see morpho_error.h) 99 */ 100 MORPHO_API(int) 101 morpho_HDRChecker_finalize( 102 morpho_HDRChecker *p); 103 104 /*-----------------------------------------------------------------*/ 105 106 /** 107 * HDRwWvZq 108 * initialize()ss\ 109 * 110 * @param[in,out] p HDRCheckerCX^X 111 * @param[in] sensitivity q(MORPHO_HDR_CHECKER_SENSITIVIYw) 112 * @return G[R[h (see morpho_error.h) 113 */ 114 MORPHO_API(int) 115 morpho_HDRChecker_setSensitivity( 116 morpho_HDRChecker * const p, 117 MORPHO_HDR_CHECKER_SENSITIVITY sensitivity); 118 119 /** 120 * HDRwWvZq 121 * initialize()ss\ 122 * 123 * @param[in,out] p HDRCheckerCX^X 124 * @param[out] sensitivity q|C^ 125 * @return G[R[h (see morpho_error.h) 126 */ 127 MORPHO_API(int) 128 morpho_HDRChecker_getSensitivity( 129 morpho_HDRChecker * const p, 130 MORPHO_HDR_CHECKER_SENSITIVITY *sensitivity); 131 132 /** 133 * HDRwW] 134 * initialize()ss\ 135 * 136 * @param[in,out] p HDRCheckerCX^X 137 * @param[out] result ]i[z(vf4z) 138 * vf[LIoKv 139 * {+2, +1, -1, -2}i[ 140 * @param[in] input_image 141 * @return G[R[h (see morpho_error.h) 142 */ 143 MORPHO_API(int) 144 morpho_HDRChecker_evaluate( 145 morpho_HDRChecker * const p, 146 int * const result, 147 const morpho_ImageData * const input_image); 148 149 /*-----------------------------------------------------------------*/ 150 151 #ifdef __cplusplus 152 } 153 #endif 154 155 #endif /* MORPHO_HDR_CHECKER_H */ 156