blob: 886c2c1777fb72c1042977b265ad14fc187c684c [file] [log] [blame]
//====================================================================
// morpho_noise_reduction.h
// [SJIS/CRLF] { ‚  •„†‰»•ûŽ®Ž©“®”»’è—p }
//
// Copyright(c) 2006-2012 Morpho,Inc.
//====================================================================
#ifndef MORPHO_NOISE_REDUCTION_H
# define MORPHO_NOISE_REDUCTION_H
//--------------------------------------------------------------------
# include "morpho_api.h"
# include "morpho_error.h"
# include "morpho_image_data.h"
# include "morpho_motion_data.h"
# include "morpho_rect_int.h"
//--------------------------------------------------------------------
# ifdef __cplusplus
extern "C" {
# endif
//====================================================================
/** ƒo[ƒWƒ‡ƒ“•¶Žš—ñ */
# define MORPHO_NOISE_REDUCTION_VERSION "Morpho Noise Reduction Ver.0.9.0 2012/08/09"
//--------------------------------------------------------------------
/** ƒmƒCƒYœ‹ŽŠí */
typedef struct
{
void *p; /**< “à•”\‘¢‘̂ւ̃|ƒCƒ“ƒ^ */
} morpho_NoiseReduction;
//--------------------------------------------------------------------
/**
* ƒo[ƒWƒ‡ƒ“•¶Žš—ñ‚ðŽæ“¾
*
* @return ƒo[ƒWƒ‡ƒ“•¶Žš—ñ(MORPHO_IMAGE_STABILIZER_VERSION)
*/
MORPHO_API(const char *)
morpho_NoiseReduction_getVersion(void);
/**
* ƒmƒCƒYœ‹Žˆ—‚É•K—v‚ȃƒ‚ƒŠƒTƒCƒY‚ðŽæ“¾
* Žw’è‚Å‚«‚éƒtƒH[ƒ}ƒbƒg‚ÍTRM‚ðŽQÆB
*
* @param[in] width “ü—͉摜‚Ì•
* @param[in] height “ü—͉摜‚̍‚‚³
* @param[in] format ‰æ‘œƒtƒH[ƒ}ƒbƒg•¶Žš—ñ
* @return •K—v‚ȃƒ‚ƒŠƒTƒCƒY(byte)
*/
MORPHO_API(int)
morpho_NoiseReduction_getBufferSize(
int width,
int height,
const char *format);
/**
* ƒmƒCƒYœ‹ŽŠí‚̏‰Šú‰»
*
* @param[out] reducer ƒmƒCƒYœ‹ŽŠí
* @param[out] buffer ƒmƒCƒYœ‹ŽŠí‚ÉŠ„‚è“–‚Ă郁ƒ‚ƒŠ‚ւ̃|ƒCƒ“ƒ^
* @param[in] buffer_size ƒmƒCƒYœ‹ŽŠí‚ÉŠ„‚è“–‚Ă郁ƒ‚ƒŠ‚̃TƒCƒY.
* @return ƒGƒ‰[ƒR[ƒh(morpho_error.h)
*/
MORPHO_API(int)
morpho_NoiseReduction_initialize(
morpho_NoiseReduction *reducer,
void *buffer,
int buffer_size);
/**
* ƒmƒCƒYœ‹ŽŠí‚̃NƒŠ[ƒ“ƒAƒbƒv
*
* @param[in,out] reducer ƒmƒCƒYœ‹ŽŠí
* @return ƒGƒ‰[ƒR[ƒh(morpho_error.h)
*/
MORPHO_API(int)
morpho_NoiseReduction_finalize(
morpho_NoiseReduction *reducer);
/**
* ƒmƒCƒYœ‹Žˆ—: ˆ—ŠJŽn
* o—͉摜(output_image)‚Í1–‡–Ú‚Ì“ü—͉摜‚Æ“¯‚¶‚Å‚à—Ç‚¢
*
* @param[in,out] reducer ƒmƒCƒYœ‹ŽŠí
* @param[out] output_image o—͉摜
* @return ƒGƒ‰[ƒR[ƒh(morpho_error.h)
*/
MORPHO_API(int)
morpho_NoiseReduction_start(
morpho_NoiseReduction *reducer,
morpho_ImageData *output_image);
/**
* ƒmƒCƒYœ‹Žˆ—: ƒmƒCƒYœ‹Ž
*
* @param[in,out] reducer ƒmƒCƒYœ‹ŽŠí
* @param[out] input_image o—͉摜
* @return ƒGƒ‰[ƒR[ƒh(morpho_error.h)
*/
MORPHO_API(int)
morpho_NoiseReduction_reduceNoise(
morpho_NoiseReduction *reducer,
morpho_ImageData *input_image);
/**
* ‰æ‘œƒtƒH[ƒ}ƒbƒg‚ðŽæ“¾
* initialize()ŽÀsŒã‚Ɏ擾‰Â”\
* ƒoƒbƒtƒ@ƒTƒCƒY‚Í32ˆÈã‚Æ‚·‚邱‚Æ
*
* @param[in,out] reducer ƒmƒCƒYœ‹ŽŠí
* @param[out] format ‰æ‘œƒtƒH[ƒ}ƒbƒg•¶Žš—ñ‚ªŠi”[‚³‚ê‚é
* @param[in] buffer_size ƒoƒbƒtƒ@ƒTƒCƒY
* @return ƒGƒ‰[ƒR[ƒh(morpho_error.h)
*/
MORPHO_API(int)
morpho_NoiseReduction_getImageFormat(
morpho_NoiseReduction *reducer,
char *format,
const int buffer_size);
/**
* ‹P“xƒmƒCƒYœ‹Ž‹­“xƒŒƒxƒ‹‚ðŽæ“¾
* initialize()ŽÀsŒã‚Ɏ擾‰Â”\
*
* @param[in,out] reducer ƒmƒCƒYœ‹ŽŠí
* @param[out] level ‹P“xƒmƒCƒYœ‹Ž‹­“xƒŒƒxƒ‹‚ªŠi”[‚³‚ê‚é
* @return ƒGƒ‰[ƒR[ƒh(morpho_error.h)
*/
MORPHO_API(int)
morpho_NoiseReduction_getLumaNoiseReductionLevel(
morpho_NoiseReduction *reducer,
int *level);
/**
* ƒNƒƒ}ƒmƒCƒYœ‹Ž‹­“xƒŒƒxƒ‹‚ðŽæ“¾
* initialize()ŽÀsŒã‚Ɏ擾‰Â”\
*
* @param[in,out] reducer ƒmƒCƒYœ‹ŽŠí
* @param[out] level ƒNƒƒ}ƒmƒCƒYœ‹Ž‹­“xƒŒƒxƒ‹‚ªŠi”[‚³‚ê‚é
* @return ƒGƒ‰[ƒR[ƒh(morpho_error.h)
*/
MORPHO_API(int)
morpho_NoiseReduction_getChromaNoiseReductionLevel(
morpho_NoiseReduction *reducer,
int *level);
/**
* ‰æ‘œƒtƒH[ƒ}ƒbƒg‚ðÝ’è
* initialize()ŽÀsŒã‚©‚Âstart()ŽÀs‘O‚ɐݒè‰Â”\
* Žw’è‚Å‚«‚éƒtƒH[ƒ}ƒbƒg‚ÍTRM‚ðŽQÆB
*
* @param[in,out] reducer ƒmƒCƒYœ‹ŽŠí
* @param[in] format ‰æ‘œƒtƒH[ƒ}ƒbƒg•¶Žš—ñ
* @return ƒGƒ‰[ƒR[ƒh(morpho_error.h)
*/
MORPHO_API(int)
morpho_NoiseReduction_setImageFormat(
morpho_NoiseReduction *reducer,
const char *format);
/**
* ‹P“xƒmƒCƒYœ‹Ž‹­“xƒŒƒxƒ‹‚ðÝ’è
* initialize()ŽÀsŒã‚©‚Âstart()ŽÀs‘O‚ɐݒè‰Â”\
*
* @param[in,out] reducer ƒmƒCƒYœ‹ŽŠí
* @param[in] level ‹P“xƒmƒCƒYœ‹Ž‹­“xƒŒƒxƒ‹(0-7)
* @return ƒGƒ‰[ƒR[ƒh(morpho_error.h)
*/
MORPHO_API(int)
morpho_NoiseReduction_setLumaNoiseReductionLevel(
morpho_NoiseReduction *reducer,
int level);
/**
* ƒNƒƒ}ƒmƒCƒYœ‹Ž‹­“xƒŒƒxƒ‹‚ðÝ’è
* initialize()ŽÀsŒã‚©‚Âstart()ŽÀs‘O‚ɐݒè‰Â”\
*
* @param[in,out] reducer ƒmƒCƒYœ‹ŽŠí
* @param[in] level ƒNƒƒ}ƒmƒCƒYœ‹Ž‹­“xƒŒƒxƒ‹(0-7)
* @return ƒGƒ‰[ƒR[ƒh(morpho_error.h)
*/
MORPHO_API(int)
morpho_NoiseReduction_setChromaNoiseReductionLevel(
morpho_NoiseReduction *reducer,
int level);
//====================================================================
# ifdef __cplusplus
} // extern "C"
# endif
//--------------------------------------------------------------------
#endif // !MORPHO_IMAGE_STABILIZER3_H
//====================================================================
// [EOF]