|
Toshihiro Shimizu |
890ddd |
#ifndef igs_hsv_noise_h
|
|
Toshihiro Shimizu |
890ddd |
#define igs_hsv_noise_h
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef IGS_HSV_NOISE_EXPORT
|
|
Toshihiro Shimizu |
890ddd |
#define IGS_HSV_NOISE_EXPORT
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
namespace igs
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
namespace hsv_noise
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
IGS_HSV_NOISE_EXPORT void change(
|
|
Toshihiro Shimizu |
890ddd |
unsigned char *image_array
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int height, const int width, const int channels, const int bits
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const unsigned char *ref /* 求める画像と同じ高、幅、channels数 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int ref_bits /* refがゼロのときはここもゼロ */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int ref_mode /* 0=R,1=G,2=B,3=A,4=Luminance,5=Nothing */
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/* image_arrayに余白が変化してもノイズパターンが変わらない
|
|
Toshihiro Shimizu |
890ddd |
ようにするためにカメラエリアを指定する */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int camera_x, const int camera_y, const int camera_w, const int camera_h
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double hue_range /* =0.025 0 ... 1.0 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double sat_range /* =0.0 0 ... 1.0 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double val_range /* =0.035 0 ... 1.0 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double alp_range /* =0.0 0 ... 1.0 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const unsigned long random_seed /* =1 0 ... ULONG_MAX */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double near_blur /* =0.500 0 ... 0.5 */
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double sat_effective /* =0.0 0 ... 1.0 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double sat_center /* =0.5 0 ... 1.0 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int sat_type /* =0
|
|
Toshihiro Shimizu |
890ddd |
0(shift_whole),1(shift_term),2(decrease_whole),3(decrease_term) */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double val_effective /* =0.0 0 ... 1.0 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double val_center /* =0.5 0 ... 1.0 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int val_type /* =0
|
|
Toshihiro Shimizu |
890ddd |
0(shift_whole),1(shift_term),2(decrease_whole),3(decrease_term) */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double alp_effective /* =0.0 0 ... 1.0 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const double alp_center /* =0.5 0 ... 1.0 */
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const int alp_type /* =0
|
|
Toshihiro Shimizu |
890ddd |
0(shift_whole),1(shift_term),2(decrease_whole),3(decrease_term) */
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
,
|
|
Toshihiro Shimizu |
890ddd |
const bool add_blend_sw
|
|
Toshihiro Shimizu |
890ddd |
/* 効果(変化量)をアルファブレンドするか否かのスイッチ
|
|
Toshihiro Shimizu |
890ddd |
add_blend_sw == true
|
|
Toshihiro Shimizu |
890ddd |
アルファ値によりRGBの変化量を調整する
|
|
Toshihiro Shimizu |
890ddd |
合成方法が
|
|
Toshihiro Shimizu |
890ddd |
合成画 = 下絵 * (1 - alpha) + 上絵
|
|
Toshihiro Shimizu |
890ddd |
の場合こちらを使う
|
|
Toshihiro Shimizu |
890ddd |
add_blend_sw == false
|
|
Toshihiro Shimizu |
890ddd |
アルファ値に関係なくRGBが変化する
|
|
Toshihiro Shimizu |
890ddd |
合成方法が
|
|
Toshihiro Shimizu |
890ddd |
合成画 = 下絵 * (1 - alpha) + 上絵 * alpha
|
|
Toshihiro Shimizu |
890ddd |
の場合こちらを使う
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
);
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif /* !igs_hsv_noise_h */
|