1 #pragma once 2 3 #ifndef igs_hls_noise_h 4 #define igs_hls_noise_h 5 6 #ifndef IGS_HLS_NOISE_EXPORT 7 #define IGS_HLS_NOISE_EXPORT 8 #endif 9 10 namespace igs { 11 namespace hls_noise { 12 IGS_HLS_NOISE_EXPORT void change( 13 unsigned char *image_array 14 15 , 16 const int height, const int width, const int channels, const int bits 17 18 , 19 const unsigned char *ref /* 求める画像と同じ高、幅、channels数 */ 20 , 21 const int ref_bits /* refがゼロのときはここもゼロ */ 22 , 23 const int ref_mode /* 0=R,1=G,2=B,3=A,4=Luminance,5=Nothing */ 24 25 /* image_arrayに余白が変化してもノイズパターンが変わらない 26 ようにするためにカメラエリアを指定する */ 27 , 28 const int camera_x, const int camera_y, const int camera_w, 29 const int camera_h 30 31 , 32 const double hue_range /* =0.025 0 ... 1.0 */ 33 , 34 const double lig_range /* =0.035 0 ... 1.0 */ 35 , 36 const double sat_range /* =0.0 0 ... 1.0 */ 37 , 38 const double alp_range /* =0.0 0 ... 1.0 */ 39 , 40 const unsigned long random_seed /* =1 0 ... ULONG_MAX */ 41 , 42 const double near_blur /* =0.500 0 ... 0.5 */ 43 44 , 45 const double lig_effective /* =0.0 0 ... 1.0 */ 46 , 47 const double lig_center /* =0.5 0 ... 1.0 */ 48 , 49 const int lig_type /* =0 50 0(shift_whole),1(shift_term),2(decrease_whole),3(decrease_term) */ 51 , 52 const double sat_effective /* =0.0 0 ... 1.0 */ 53 , 54 const double sat_center /* =0.5 0 ... 1.0 */ 55 , 56 const int sat_type /* =0 57 0(shift_whole),1(shift_term),2(decrease_whole),3(decrease_term) */ 58 , 59 const double alp_effective /* =0.0 0 ... 1.0 */ 60 , 61 const double alp_center /* =0.5 0 ... 1.0 */ 62 , 63 const int alp_type /* =0 64 0(shift_whole),1(shift_term),2(decrease_whole),3(decrease_term) */ 65 66 , 67 const bool add_blend_sw 68 /* 効果(変化量)をアルファブレンドするか否かのスイッチ 69 add_blend_sw == true 70 アルファ値によりRGBの変化量を調整する 71 合成方法が 72 合成画 = 下絵 * (1 - alpha) + 上絵 73 の場合こちらを使う 74 add_blend_sw == false 75 アルファ値に関係なくRGBが変化する 76 合成方法が 77 合成画 = 下絵 * (1 - alpha) + 上絵 * alpha 78 の場合こちらを使う 79 */ 80 ); 81 } 82 } 83 84 #endif /* !igs_hls_noise_h */ 85