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 /** �m�C�Y������ */ 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 * �m�C�Y���������ɕK�v�ȃ������T�C�Y���擾 49 * �w��ł���t�H�[�}�b�g��TRM���Q�ƁB 50 * 51 * @param[in] width ���͉摜�̕� 52 * @param[in] height ���͉摜�̍��� 53 * @param[in] format �摜�t�H�[�}�b�g������ 54 * @return �K�v�ȃ������T�C�Y(byte) 55 */ 56 MORPHO_API(int) 57 morpho_NoiseReduction_getBufferSize( 58 int width, 59 int height, 60 const char *format); 61 62 /** 63 * �m�C�Y������̏����� 64 * 65 * @param[out] reducer �m�C�Y������ 66 * @param[out] buffer �m�C�Y������Ɋ��蓖�Ă郁�����ւ̃|�C���^ 67 * @param[in] buffer_size �m�C�Y������Ɋ��蓖�Ă郁�����̃T�C�Y. 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 * �m�C�Y������̃N���[���A�b�v 78 * 79 * @param[in,out] reducer �m�C�Y������ 80 * @return �G���[�R�[�h(morpho_error.h) 81 */ 82 MORPHO_API(int) 83 morpho_NoiseReduction_finalize( 84 morpho_NoiseReduction *reducer); 85 86 /** 87 * �m�C�Y��������: �����J�n 88 * �o�͉摜(output_image)��1���ڂ̓��͉摜�Ɠ����ł��ǂ� 89 * 90 * @param[in,out] reducer �m�C�Y������ 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 * �m�C�Y��������: �m�C�Y���� 101 * 102 * @param[in,out] reducer �m�C�Y������ 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 * �摜�t�H�[�}�b�g���擾 113 * initialize()���s��Ɏ擾�\ 114 * �o�b�t�@�T�C�Y��32�ȏ�Ƃ��邱�� 115 * 116 * @param[in,out] reducer �m�C�Y������ 117 * @param[out] format �摜�t�H�[�}�b�g�����i�[����� 118 * @param[in] buffer_size �o�b�t�@�T�C�Y 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 * �P�x�m�C�Y�������x���x�����擾 129 * initialize()���s��Ɏ擾�\ 130 * 131 * @param[in,out] reducer �m�C�Y������ 132 * @param[out] level �P�x�m�C�Y�������x���x�����i�[����� 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���}�m�C�Y�������x���x�����擾 142 * initialize()���s��Ɏ擾�\ 143 * 144 * @param[in,out] reducer �m�C�Y������ 145 * @param[out] level �N���}�m�C�Y�������x���x�����i�[����� 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 * �摜�t�H�[�}�b�g��ݒ� 155 * initialize()���s�ォ��start()���s�O�ɐݒ�\ 156 * �w��ł���t�H�[�}�b�g��TRM���Q�ƁB 157 * 158 * @param[in,out] reducer �m�C�Y������ 159 * @param[in] format �摜�t�H�[�}�b�g������ 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 * �P�x�m�C�Y�������x���x����ݒ� 169 * initialize()���s�ォ��start()���s�O�ɐݒ�\ 170 * 171 * @param[in,out] reducer �m�C�Y������ 172 * @param[in] level �P�x�m�C�Y�������x���x��(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���}�m�C�Y�������x���x����ݒ� 182 * initialize()���s�ォ��start()���s�O�ɐݒ�\ 183 * 184 * @param[in,out] reducer �m�C�Y������ 185 * @param[in] level �N���}�m�C�Y�������x���x��(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