Home | History | Annotate | Download | only in include
      1 //====================================================================
      2 // morpho_noise_reduction.h
      3 // [SJIS/CRLF] {  p }
      4 //
      5 // Copyright(c) 2006-2012 Morpho,Inc.
      6 //====================================================================
      7 
      8 #ifndef MORPHO_NOISE_REDUCTION_H
      9 # define MORPHO_NOISE_REDUCTION_H
     10 
     11 //--------------------------------------------------------------------
     12 
     13 # include "morpho_api.h"
     14 # include "morpho_error.h"
     15 # include "morpho_image_data.h"
     16 # include "morpho_motion_data.h"
     17 # include "morpho_rect_int.h"
     18 
     19 //--------------------------------------------------------------------
     20 
     21 # ifdef __cplusplus
     22 extern "C" {
     23 # endif
     24 
     25 //====================================================================
     26 
     27 /** o[W */
     28 # define MORPHO_NOISE_REDUCTION_VERSION "Morpho Noise Reduction Ver.0.9.0 2012/08/09"
     29 
     30 //--------------------------------------------------------------------
     31 /** mCY */
     32 typedef struct
     33 {
     34     void *p; /**< \|C^ */
     35 } morpho_NoiseReduction;
     36 
     37 //--------------------------------------------------------------------
     38 
     39 /**
     40  * o[W
     41  *
     42  * @return o[W(MORPHO_IMAGE_STABILIZER_VERSION)
     43  */
     44 MORPHO_API(const char *)
     45 morpho_NoiseReduction_getVersion(void);
     46 
     47 /**
     48  * mCYKvTCY
     49  * wtH[}bgTRMQB
     50  *
     51  * @param[in] width  
     52  * @param[in] height 
     53  * @param[in] format tH[}bg
     54  * @return KvTCY(byte)
     55  */
     56 MORPHO_API(int)
     57 morpho_NoiseReduction_getBufferSize(
     58     int width,
     59     int height,
     60     const char *format);
     61 
     62 /**
     63  * mCY
     64  *
     65  * @param[out] reducer  mCY
     66  * @param[out] buffer      mCY|C^
     67  * @param[in]  buffer_size mCYTCY.
     68  * @return G[R[h(morpho_error.h)
     69  */
     70 MORPHO_API(int)
     71 morpho_NoiseReduction_initialize(
     72     morpho_NoiseReduction *reducer,
     73     void *buffer,
     74     int buffer_size);
     75 
     76 /**
     77  * mCYN[Abv
     78  *
     79  * @param[in,out] reducer mCY
     80  * @return G[R[h(morpho_error.h)
     81  */
     82 MORPHO_API(int)
     83 morpho_NoiseReduction_finalize(
     84     morpho_NoiseReduction *reducer);
     85 
     86 /**
     87  * mCY: Jn
     88  * o(output_image)1
     89  *
     90  * @param[in,out] reducer    mCY
     91  * @param[out]    output_image  o
     92  * @return G[R[h(morpho_error.h)
     93  */
     94 MORPHO_API(int)
     95 morpho_NoiseReduction_start(
     96     morpho_NoiseReduction *reducer,
     97     morpho_ImageData *output_image);
     98 
     99 /**
    100  * mCY: mCY
    101  *
    102  * @param[in,out] reducer   mCY
    103  * @param[out]    input_image  o
    104  * @return G[R[h(morpho_error.h)
    105  */
    106 MORPHO_API(int)
    107 morpho_NoiseReduction_reduceNoise(
    108     morpho_NoiseReduction *reducer,
    109     morpho_ImageData *input_image);
    110 
    111 /**
    112  * tH[}bg
    113  * initialize()s\
    114  * obt@TCY32
    115  *
    116  * @param[in,out] reducer mCY
    117  * @param[out] format tH[}bgi[
    118  * @param[in] buffer_size obt@TCY
    119  * @return G[R[h(morpho_error.h)
    120  */
    121 MORPHO_API(int)
    122 morpho_NoiseReduction_getImageFormat(
    123     morpho_NoiseReduction *reducer,
    124     char *format,
    125     const int buffer_size);
    126 
    127 /**
    128  * PxmCYxx
    129  * initialize()s\
    130  *
    131  * @param[in,out] reducer mCY
    132  * @param[out] level PxmCYxxi[
    133  * @return G[R[h(morpho_error.h)
    134  */
    135 MORPHO_API(int)
    136 morpho_NoiseReduction_getLumaNoiseReductionLevel(
    137     morpho_NoiseReduction *reducer,
    138     int *level);
    139 
    140 /**
    141  * N}mCYxx
    142  * initialize()s\
    143  *
    144  * @param[in,out] reducer mCY
    145  * @param[out] level N}mCYxxi[
    146  * @return G[R[h(morpho_error.h)
    147  */
    148 MORPHO_API(int)
    149 morpho_NoiseReduction_getChromaNoiseReductionLevel(
    150     morpho_NoiseReduction *reducer,
    151     int *level);
    152 
    153 /**
    154  * tH[}bg
    155  * initialize()sstart()sO\
    156  * wtH[}bgTRMQB
    157  *
    158  * @param[in,out] reducer mCY
    159  * @param[in] format tH[}bg
    160  * @return G[R[h(morpho_error.h)
    161  */
    162 MORPHO_API(int)
    163 morpho_NoiseReduction_setImageFormat(
    164     morpho_NoiseReduction *reducer,
    165     const char *format);
    166 
    167 /**
    168  * PxmCYxx
    169  * initialize()sstart()sO\
    170  *
    171  * @param[in,out] reducer mCY
    172  * @param[in] level PxmCYxx(0-7)
    173  * @return G[R[h(morpho_error.h)
    174  */
    175 MORPHO_API(int)
    176 morpho_NoiseReduction_setLumaNoiseReductionLevel(
    177     morpho_NoiseReduction *reducer,
    178     int level);
    179 
    180 /**
    181  * N}mCYxx
    182  * initialize()sstart()sO\
    183  *
    184  * @param[in,out] reducer mCY
    185  * @param[in] level N}mCYxx(0-7)
    186  * @return G[R[h(morpho_error.h)
    187  */
    188 MORPHO_API(int)
    189 morpho_NoiseReduction_setChromaNoiseReductionLevel(
    190     morpho_NoiseReduction *reducer,
    191     int level);
    192 
    193 //====================================================================
    194 
    195 # ifdef __cplusplus
    196 } // extern "C"
    197 # endif
    198 
    199 //--------------------------------------------------------------------
    200 
    201 #endif // !MORPHO_IMAGE_STABILIZER3_H
    202 
    203 //====================================================================
    204 // [EOF]
    205