1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
|
#ifndef ROTOR_NODES_CHANNELS
#define ROTOR_NODES_CHANNELS
#include "rotor.h"
namespace Rotor {
class Invert: public Image_node {
public:
Invert(){
create_image_input("Image to invert","Image input");
create_parameter("invert","number","Invert when greater than 0.0","Negative",1.0f,0.0f,1.0f);
title="Negative";
description="Inverts the input picture";
NODEID="8676c25c-2d09-11e3-80a7-db36c774523c";
};
Invert(map<string,string> &settings) :Invert() {
base_settings(settings);
};
~Invert(){};
Invert* clone(map<string,string> &_settings) { return new Invert(_settings);};
Image *output(const Frame_spec &frame){
Image *in=image_inputs[0]->get(frame);
if (in) {
if (parameters["invert"]->value>0.0f){
for (int i=0;i<in->w*in->h*3;i++) {
image.RGBdata[i]=255-in->RGBdata[i];
}
return ℑ
}
return in;
}
return nullptr;
}
private:
};
class Monochrome: public Image_node {
public:
Monochrome(){
create_image_input("image input","Image input");
title="Monochrome";
description="Render video greyscale";
NODEID="2c3cb12e-2d0a-11e3-a46b-a34e44493cef";
};
Monochrome(map<string,string> &settings):Monochrome() {
base_settings(settings);
};
~Monochrome(){
};
Monochrome* clone(map<string,string> &_settings) { return new Monochrome(_settings);};
Image *output(const Frame_spec &frame){
Image *in=image_inputs[0]->get(frame);
if (in){
for (int i=0;i<image.w;i++){
for (int j=0;j<image.h;j++){
uint8_t luma=0;
for (int l=0;l<3;l++) luma+=pixels.mono_weights[l][in->RGBdata[(((j*image.w)+i)*3)+l]];
for (int k=0;k<3;k++) image.RGBdata[(((j*image.w)+i)*3)+k]=luma;
}
}
return ℑ
}
return nullptr;
}
private:
};
#define BLEND_blend 1
#define BLEND_screen 2
#define BLEND_multiply 3
#define BLEND_alpha 4
#define BLEND_wrap 5
#define BLEND_xor 6
#define BLEND_overlay 7
class Blend: public Image_node {
public:
Blend(){
create_image_input("image input 1","Image input 1");
create_image_input("image input 2","Image input 2");
create_parameter("amount","number","amount to blend input 2","Blend amount",0.5f,0.0f,1.0f);
create_attribute("mode","Blend mode","Blend mode","blend",{"blend","screen","multiply","alpha","wrap","xor","overlay"});
title ="Blend";
description="Blend images in various modes";
NODEID="12ed7af0-2d0a-11e3-ae32-2b44203b93c9";
};
Blend(map<string,string> &settings):Blend() {
base_settings(settings);
};
~Blend(){};
Blend* clone(map<string,string> &_settings) { return new Blend(_settings);};
Image *output(const Frame_spec &frame){
Image *in1=image_inputs[0]->get(frame);
if (in1){
Image *in2=image_inputs[1]->get(frame);
if (in2) {
image=*(in1);
switch(attributes["mode"]->intVal){
case BLEND_screen:
image+=(*in2);
break;
case BLEND_multiply:
image*=(*in2);
break;
case BLEND_xor:
image^=(*in2);
break;
case BLEND_alpha:
image=image.alpha_blend(*in2);
break;
case BLEND_wrap:
image=image.add_wrap(*in2);
break;
case BLEND_overlay:
image=image.overlay(*in2);
break;
case BLEND_blend: //has to be last because of initialser of *in? go figure
image*=(1.0f-parameters["amount"]->value);
/* //problem here with leak
//opencv handles not being released
Image *in=(*in2)*parameters["amount"]->value;
image+=(*in);
delete in;
*/
in=(*in2); //removed allocator
in*=parameters["amount"]->value;
image+=in;
break;
}
return ℑ
}
//if there aren't 2 image inputs connected just return the first
return in1;
}
return nullptr;
}
private:
Image in;
};
#define ARITHMETIC_plus 1
#define ARITHMETIC_minus 2
#define ARITHMETIC_multiply 3
#define ARITHMETIC_divide 4
#define ARITHMETIC_modulo 5
class Image_arithmetic: public Image_node {
public:
Image_arithmetic(){
create_image_input("image input","Image input");
create_parameter("value","number","Value or signal for operation","Value",1.0f);
create_attribute("operator","operator for image","Operator","+",{"+","-","*","/"});
title="Image arithmetic";
description="Performs arithmetic on an image with a signal or value";
NODEID="bc3b633e-2d09-11e3-86b2-7fbba3d71604";
};
Image_arithmetic(map<string,string> &settings):Image_arithmetic() {
base_settings(settings);
}
~Image_arithmetic(){};
Image *output(const Frame_spec &frame){
Image *in=image_inputs[0]->get(frame);
if (in){
switch (attributes["operator"]->intVal) {
case ARITHMETIC_plus:
image=(*in); //could be poss without copy?
image+=parameters["value"]->value;
break;
case ARITHMETIC_minus:
image=(*in);
image-=parameters["value"]->value;
break;
case ARITHMETIC_multiply:
image=(*in);
image*=parameters["value"]->value;
break;
case ARITHMETIC_divide:
image=(*in);
image/=parameters["value"]->value;
break;
}
}
return ℑ
}
Image_arithmetic* clone(map<string,string> &_settings) { return new Image_arithmetic(_settings);};
private:
};
class Alpha_merge: public Image_node {
public:
Alpha_merge(){
create_image_input("image input","Image input");
create_image_input("alpha input","Alpha input");
title="Alpha merge";
description="Alpha merge two images";
NODEID="3f5e3eee-2d0a-11e3-8679-1374154a9fa8";
};
Alpha_merge(map<string,string> &settings):Alpha_merge() {
base_settings(settings);
};
~Alpha_merge(){};
Alpha_merge* clone(map<string,string> &_settings) { return new Alpha_merge(_settings);};
Image *output(const Frame_spec &frame){
Image *in1=image_inputs[0]->get(frame);
if (in1){
//copy incoming image **writable
Image *in2=image_inputs[1]->get(frame);
if (in2) {
image=(*in1);
image.alpha_merge(*in2);
return ℑ
}
//if there aren't 2 image inputs connected just return the first
return in1;
}
return nullptr;
}
private:
};
class Difference_matte: public Image_node {
public:
Difference_matte(){
create_image_input("image input","Image input");
create_image_input("background input","Background input");
create_parameter("threshold","number","Difference threshold","Threshold",0.2f,0.0f,1.0f);
create_parameter("feather","number","Feather width","Feather",0.1f,0.0f,1.0f);
create_parameter("weight_h","number","H component weight","Weight H",0.5f,0.0f,1.0f);
create_parameter("weight_s","number","S component weight","Weight S",0.5f,0.0f,1.0f);
create_parameter("weight_v","number","V component weight","Weight V",0.5f,0.0f,1.0f);
create_parameter("blursize","number","Blur size","Blur size",2.0f,0.0f,10.0f);
create_attribute("mode","Output {image|alpha}","output mode","alpha",{"image","alpha"});
title="Difference matte";
description="Create an alpha channel using a background reference picture";
LUT=nullptr;
NODEID="4db4d2c8-2d0a-11e3-b08b-7fb00f8c562a";
};
Difference_matte(map<string,string> &settings):Difference_matte() {
base_settings(settings);
};
~Difference_matte(){if (LUT) delete[] LUT;};
Difference_matte* clone(map<string,string> &_settings) { return new Difference_matte(_settings);};
Image *output(const Frame_spec &frame){
Image *in1=image_inputs[0]->get(frame);
if (in1){
Image *in2=image_inputs[1]->get(frame);
if (in2) {
generate_LUT();
/*
cv::cvtColor(in1->rgb,greyfg,CV_RGB2GRAY);
cv::cvtColor(in2->rgb,greybg,CV_RGB2GRAY);
cv::absdiff(greyfg,greybg,greyDiff);
//parameters["threshold"]->value
cv::threshold(greyDiff,mask,parameters["threshold"]->value,255,CV_THRESH_BINARY); //int block_size=3, double param1=5); //int blockSize, int offset=0,bool invert=false, bool gauss=false);
//cv::adaptiveThreshold(greyDiff,mask,255,CV_ADAPTIVE_THRESH_GAUSSIAN_C,CV_THRESH_BINARY, 3,5); //int block_size=3, double param1=5); //int blockSize, int offset=0,bool invert=false, bool gauss=false);
*/
cv::cvtColor(in1->rgb, hsv1, CV_RGB2HSV);
cv::cvtColor(in2->rgb, hsv2, CV_RGB2HSV);
mask.create(frame.h,frame.w,CV_8UC1);
lutmask.create(frame.h,frame.w,CV_8UC1);
//get euclidean distance in HSV space
int dist,d;
float weights[3] = {parameters["weight_h"]->value,parameters["weight_s"]->value,parameters["weight_v"]->value};
float weight_total=255.0f/pow(pow(weights[0]*255,2)+pow(weights[1]*255,2)+pow(weights[2]*255,2),0.5);
for (int i=0;i<frame.w*frame.h;i++){
dist=0;
for (int j=0;j<3;j++){
d=((int)hsv1.data[i*3+j])-((int)hsv2.data[i*3+j]);
dist+=(d*d)*weights[j];
}
uint8_t id=(uint8_t)(sqrt((float)dist)*weight_total);
mask.data[i]=id;
}
/*
for (int i=0;i<frame.w*frame.h;i++){
dist=0;
for (int j=0;j<3;j++){
d=((int)hsv1.data[i*3+j])-((int)hsv2.data[i*3+j]);
dist+=(abs(d))*weights[j];
}
uint8_t id=(uint8_t)(((float)dist)/weight_total);
m=LUT[id];
mask.data[i]=m;
}
*/
//cv::bilateralFilter(mask,filtmask, 4,8,2 );
//cv::GaussianBlur(mask,filtmask,cv::Size( 4, 4 ), 2, 2);
int ksize=max((ceil(parameters["blursize"]->value/2.0)*2)+1,1.0);
//nb this doesn't do the intended: create 'continuously variable' blur
cv::GaussianBlur(mask,filtmask,cvSize(ksize,ksize),parameters["blursize"]->value);
for (int i=0;i<frame.w*frame.h;i++){
lutmask.data[i]=LUT[filtmask.data[i]];
}
image=(*in1);
if (attributes["mode"]->value=="image"){
cv::cvtColor(lutmask, image.rgb, CV_GRAY2RGB);
}
else image.alpha_from_cv(lutmask);
return ℑ
}
//if there aren't 2 image inputs connected just return the first
return in1;
}
return nullptr;
}
void generate_LUT(){
//can check here if anything has changed
//cerr<<"generating LUT: threshold "<<parameters["threshold"]->value<<", feather "<<parameters["feather"]->value<<endl;
if (LUT) delete[] LUT;
LUT=new uint8_t[256];
float minf=max(0.0f,parameters["threshold"]->value-(parameters["feather"]->value*0.5f));
float maxf=min(1.0f,parameters["threshold"]->value+(parameters["feather"]->value*0.5f));
for (int i=0;i<256;i++){
LUT[i]=(uint8_t)(min(1.0f,max(0.0f,((((float)i)/255.0f)-minf)/(maxf-minf)))*255.0f);
// cerr<<((int)LUT[i])<<" ";
}
//cerr<<endl;
}
private:
cv::Mat greyfg,greybg,greyDiff,mask,filtmask,lutmask;
cv::Mat hsv1,hsv2;
uint8_t *LUT;
};
class Luma_levels: public Image_node {
public:
Luma_levels(){
create_image_input("image input","Image input");
create_parameter("black_in","number","input black point","Input black point",0.0f,0.0f,1.0f);
create_parameter("white_in","number","input white point","Input white point",1.0f,0.0f,1.0f);
create_parameter("gamma","number","gamma level","Gamma",1.0f,0.0f,10.0f);
create_parameter("black_out","number","output black point","Output black point",0.0f,0.0f,1.0f);
create_parameter("white_out","number","output white point","Output white point",1.0f,0.0f,1.0f);
title="Luma levels";
description="Remap luma values of image";
LUT=nullptr;
NODEID="4e500576-2d0b-11e3-b234-cf74b6a122e4";
};
Luma_levels(map<string,string> &settings):Luma_levels() {
base_settings(settings);
}
~Luma_levels(){if (LUT) { delete[] LUT;} };
void generate_LUT(){
//can check here if anything has changed
if (LUT) delete[] LUT;
LUT=new unsigned char[256];
float fltmax=(255.0f/256.0f);
for (int i=0;i<256;i++){
LUT[i]=(unsigned char)(((pow(min(fltmax,max(0.0f,(((((float)i)/256.0f)-parameters["black_in"]->value)/(parameters["white_in"]->value-parameters["black_in"]->value)))),(1.0/parameters["gamma"]->value))*(parameters["white_out"]->value-parameters["black_out"]->value))+parameters["black_out"]->value)*255.0f);
}
}
void apply_LUT(const Image& in){
apply_LUT(in,image);
}
void apply_LUT(const Image& in,Image &out){ //facility to apply to other images for inherited classes
out.setup(in.w,in.h);
for (int i=0;i<out.w*out.h*3;i++){
out.RGBdata[i]=LUT[in.RGBdata[i]];
}
}
Image *output(const Frame_spec &frame){
Image *in=image_inputs[0]->get(frame);
if (in){
generate_LUT();
apply_LUT(*in);
}
return ℑ
}
Luma_levels* clone(map<string,string> &_settings) { return new Luma_levels(_settings);};
protected:
unsigned char *LUT;
};
class Echo_trails: public Luma_levels {
//draw trail frames additively that fade off over time
//the hard thing here is how to cache frames, if its done cleverly it could have no impact when
//used linearly
//Image needs to overload operator+
//need a clever data structure to cache frames - maybe a map of Image pointers
//we know the frames we want to overlay as offsets ie -25,-20,-15,-10,-5
//do we keep 25 frames loaded in order to benefit? 25 PAL frames is 60MB so probably so
//OK so:
//make a new set of pointers
//identify if any of the new pointers can inherit old frames
//delete unneeded old frames
//load new frames
//do the calculations
//new set of pointers? or track frames by absolute frame number?
//with relative pointers and switching frames, could use auto_ptr?
//this cache mechanism should maybe be inheritable too?
//it could be hugely beneficial to only do the LUT once?
//although maybe the way to do the fading is to have a LUT for each frame?
//or is it actually best to use alpha keying after all!
public:
Echo_trails(){
//calls base class constructor first
create_parameter("number","number","number of echoes","Number echoes",25.0f);
create_parameter("fadeto","number","amount that echoes fade out","Fadout amount",1.0f,0.0f,1.0f);
create_attribute("mode","blend mode for echoes","Blend mode","screen",{"screen","wrap"});
title="Echo trails";
description="Draw trail frames additively that fade off over time";
NODEID="5b1ab684-2d0b-11e3-8fa2-970be8c360dd";
lastframe=-1;
};
Echo_trails(map<string,string> &settings):Echo_trails() {
base_settings(settings);
}
~Echo_trails(){
for (auto i:images) delete i.second;
};
Image *output(const Frame_spec &frame){
//check if cache is valid
if (images.size()){
if (frame.w!=image.w||frame.h!=image.h){ //or framerate changed?
//clear cache and start over
images.clear();
lastframe=-1;
//calculate frame interval
//interval=(int)(((duration/number)*frame.framerate)+0.5);
//total=interval*number;
}
}
int thisframe=((Time_spec)frame).frame();
//iterate cache and throw out any obsolete frames
auto i = std::begin(images);
while (i != std::end(images)) {
// check if the image is in the range we need
if (thisframe-(*i).first>(int)parameters["number"]->value||thisframe-(*i).first<0) {
delete (*i).second;
i = images.erase(i);
}
else
++i;
}
//if frame has already been calculated just return it
if (thisframe!=lastframe) {
Image *in=image_inputs[0]->get(frame);
if (in) {
generate_LUT();
//need a better strategy here, should be able to get each image once
//copy incoming image **writable
image=*(in);
images[thisframe]=new Image(frame.w,frame.h);
apply_LUT(image,*(images[thisframe]));
for (int i=1;i<(int)parameters["number"]->value;i++){
//check echo frame isn't at negative time
int absframe=thisframe-i;
if (absframe>-1){
//check if image is in the cache
if (images.find(absframe)==images.end()){
images[absframe]=new Image(frame.w,frame.h);
Frame_spec wanted=Frame_spec(absframe,frame.framerate,frame.duration,frame.w,frame.h);
Image *in2=(((Image_node*)image_inputs[0]->connection)->get_image_output(wanted));
if (in2) apply_LUT(*(in2),*(images[absframe]));
else in2->clear();
}
if (fless(1.0f,parameters["fadeto"]->value)){
float amount=(((parameters["number"]->value-i)/parameters["number"]->value)*(1.0f-parameters["fadeto"]->value))+(1.0f-parameters["fadeto"]->value);
Image *temp=*images[absframe]*amount;
if (attributes["mode"]->value=="screen") {
image+=*temp;
}
else {
image.add_wrap(*temp);
}
delete temp;
}
else {
if (attributes["mode"]->value=="screen") image+=*(images[absframe]);
else image=image.add_wrap(*(images[absframe]));
}
}
}
//for (int i=0;i<frame.w*frame.h*3;i++){
// image->RGBdata[i]=LUT[in->RGBdata[i]];
//}
lastframe=thisframe;
}
}
return ℑ
}
Echo_trails* clone(map<string,string> &_settings) { return new Echo_trails(_settings);};
protected:
int interval,total,lastframe; //number of frames between displayed echoes
unordered_map<int,Image*> images;
};
class RGB_levels: public Image_node {
public:
RGB_levels(){
create_image_input("image input","Image input");
create_parameter("red_black_in","number","Red input black-point","Red input black-point",0.0f,0.0f,1.0f);
create_parameter("red_white_in","number","Red input white-point","Red input white-point",1.0f,0.0f,1.0f);
create_parameter("red_gamma","number","Red gamma level","Red gamma",1.0f,0.01f,10.0f);
create_parameter("red_black_out","number","Red output black point","Red output black point",0.0f,0.0f,1.0f);
create_parameter("red_white_out","number","Red output white point","Red output white point",1.0f,0.0f,1.0f);
create_parameter("green_black_in","number","Green input black point","Green input black point",0.0f,0.0f,1.0f);
create_parameter("green_white_in","number","Green input white point","Green input white point",1.0f,0.0f,1.0f);
create_parameter("green_gamma","number","Green gamma level","Green gamma",1.0f,0.01f,10.0f);
create_parameter("green_black_out","number","Green output black point","Green output black point",0.0f,0.0f,1.0f);
create_parameter("green_white_out","number","Green output white point","Green output white point",1.0f,0.0f,1.0f);
create_parameter("blue_black_in","number","Blue input black point","Blue input black point",0.0f,0.0f,1.0f);
create_parameter("blue_white_in","number","Blue input white point","Blue input white point",1.0f,0.0f,1.0f);
create_parameter("blue_gamma","number","Blue gamma level","Blue gamma",1.0f,0.01f,10.0f);
create_parameter("blue_black_out","number","Blue output black point","Blue output black point",0.0f,0.0f,1.0f);
create_parameter("blue_white_out","number","Blue output white point","Blue output white point",1.0f,0.0f,1.0f);
title="RGB levels";
description="Remap RGB values of image";
LUT=nullptr;
NODEID="68522cba-2d0b-11e3-8767-8f3c605e9bed";
};
RGB_levels(map<string,string> &settings):RGB_levels() {
base_settings(settings);
}
~RGB_levels(){
if (LUT) {
for (int i=0;i<3;i++) {
delete[] LUT[i];
}
delete[] LUT;
}
};
void generate_LUT(){
//can check here if anything has changed
if (LUT) {
for (int i=0;i<3;i++) {
delete[] LUT[i];
}
delete[] LUT;
}
LUT=new unsigned char*[3];
for (int i=0;i<3;i++){
LUT[i]=new unsigned char[256];
}
float fltmax=(255.0f/256.0f);
for (int i=0;i<256;i++){
LUT[0][i]=(unsigned char)(((\
pow(min(fltmax,max(0.0f,(((((float)i)/256.0f)-parameters["red_black_in"]->value)/(parameters["red_white_in"]->value-parameters["red_black_in"]->value))))\
,(1.0/parameters["red_gamma"]->value))\
*(parameters["red_white_out"]->value-parameters["red_black_out"]->value))+parameters["red_black_out"]->value)*255.0f);
LUT[1][i]=(unsigned char)(((\
pow(min(fltmax,max(0.0f,(((((float)i)/256.0f)-parameters["green_black_in"]->value)/(parameters["green_white_in"]->value-parameters["green_black_in"]->value))))\
,(1.0/parameters["green_gamma"]->value))\
*(parameters["green_white_out"]->value-parameters["green_black_out"]->value))+parameters["green_black_out"]->value)*255.0f);
LUT[2][i]=(unsigned char)(((\
pow(min(fltmax,max(0.0f,(((((float)i)/256.0f)-parameters["blue_black_in"]->value)/(parameters["blue_white_in"]->value-parameters["blue_black_in"]->value))))\
,(1.0/parameters["blue_gamma"]->value))\
*(parameters["blue_white_out"]->value-parameters["blue_black_out"]->value))+parameters["blue_black_out"]->value)*255.0f);
}
}
void apply_LUT(const Image& in){
apply_LUT(in,image);
}
void apply_LUT(const Image& in,Image &out){ //facility to apply to other images for inherited classes
for (int i=0;i<out.w*out.h;i++){
out.RGBdata[i*3]=LUT[0][in.RGBdata[i*3]];
out.RGBdata[i*3+1]=LUT[1][in.RGBdata[i*3+1]];
out.RGBdata[i*3+2]=LUT[2][in.RGBdata[i*3+2]];
}
if (!in.alpha.empty()){
out.alpha=in.alpha;
}
}
Image *output(const Frame_spec &frame){
Image *in=image_inputs[0]->get(frame);
if (in){
generate_LUT();
apply_LUT(*in);
}
return ℑ
}
RGB_levels* clone(map<string,string> &_settings) { return new RGB_levels(_settings);};
protected:
unsigned char **LUT;
};
}
#endif
|