Skip to content

Commit cab9e48

Browse files
committed
visual preset from 435 depth and 455 color
1 parent ef3ac9e commit cab9e48

File tree

3 files changed

+82
-53
lines changed

3 files changed

+82
-53
lines changed

src/ds/advanced_mode/advanced_mode.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ namespace librealsense
114114
case ds::RS430I_PID:
115115
case ds::RS435_RGB_PID:
116116
case ds::RS435I_PID:
117-
case ds::RS436I_PID:
118117
default_430(p);
119118
break;
119+
case ds::RS436I_PID:
120+
default_436(p);
121+
break;
120122
case ds::RS455_PID:
121123
case ds::RS457_PID:
122124
case ds::D555_PID:

src/ds/advanced_mode/presets.cpp

Lines changed: 78 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,41 @@ namespace librealsense
361361
p.depth_gain.gain = 16.f;
362362
}
363363

364-
void default_430(preset& p)
364+
void default_430_color_only(preset& p)
365+
{
366+
p.color_control.disableRAUColor = 0;
367+
p.color_control.disableSADColor = 0;
368+
p.color_control.disableSADNormalize = 0;
369+
p.color_control.disableSLOLeftColor = 0;
370+
p.color_control.disableSLORightColor = 0;
371+
p.cc.colorCorrection1 = 0.298828f;
372+
p.cc.colorCorrection2 = 0.293945f;
373+
p.cc.colorCorrection3 = 0.293945f;
374+
p.cc.colorCorrection4 = 0.114258f;
375+
p.cc.colorCorrection5 = 0.f;
376+
p.cc.colorCorrection6 = 0.f;
377+
p.cc.colorCorrection7 = 0.f;
378+
p.cc.colorCorrection8 = 0.f;
379+
p.cc.colorCorrection9 = 0.f;
380+
p.cc.colorCorrection10 = 0.f;
381+
p.cc.colorCorrection11 = 0.f;
382+
p.cc.colorCorrection12 = 0.f;
383+
p.color_auto_exposure.auto_exposure = 1;
384+
p.color_exposure.exposure = 156;
385+
p.color_backlight_compensation.backlight_compensation = 0;
386+
p.color_brightness.brightness = 0;
387+
p.color_contrast.contrast = 50;
388+
p.color_gain.gain = 64;
389+
p.color_gamma.gamma = 300;
390+
p.color_hue.hue = 0;
391+
p.color_power_line_frequency.power_line_frequency = 3;
392+
p.color_saturation.saturation = 64;
393+
p.color_sharpness.sharpness = 50;
394+
p.color_auto_white_balance.auto_white_balance = 1;
395+
p.color_white_balance.white_balance = 4600;
396+
}
397+
398+
void default_430_except_color(preset& p)
365399
{
366400
p.depth_controls.deepSeaMedianThreshold = 500;
367401
p.depth_controls.deepSeaNeighborThreshold = 7;
@@ -385,11 +419,6 @@ namespace librealsense
385419
p.rsvc.minWEsum = 3;
386420
p.rsvc.uShrink = 3;
387421
p.rsvc.vShrink = 1;
388-
p.color_control.disableRAUColor = 0;
389-
p.color_control.disableSADColor = 0;
390-
p.color_control.disableSADNormalize = 0;
391-
p.color_control.disableSLOLeftColor = 0;
392-
p.color_control.disableSLORightColor = 0;
393422
p.rctc.rauDiffThresholdBlue = 51;
394423
p.rctc.rauDiffThresholdGreen = 51;
395424
p.rctc.rauDiffThresholdRed = 51;
@@ -404,18 +433,6 @@ namespace librealsense
404433
p.spc.sloK2PenaltyMod2 = 130;
405434
p.hdad.lambdaAD = 800.f;
406435
p.hdad.lambdaCensus = 26.f;
407-
p.cc.colorCorrection1 = 0.298828f;
408-
p.cc.colorCorrection2 = 0.293945f;
409-
p.cc.colorCorrection3 = 0.293945f;
410-
p.cc.colorCorrection4 = 0.114258f;
411-
p.cc.colorCorrection5 = 0.f;
412-
p.cc.colorCorrection6 = 0.f;
413-
p.cc.colorCorrection7 = 0.f;
414-
p.cc.colorCorrection8 = 0.f;
415-
p.cc.colorCorrection9 = 0.f;
416-
p.cc.colorCorrection10 = 0.f;
417-
p.cc.colorCorrection11 = 0.f;
418-
p.cc.colorCorrection12 = 0.f;
419436
p.depth_table.depthClampMax = 65536;
420437
p.depth_table.depthClampMin = 0;
421438
p.depth_table.depthUnits = 1000;
@@ -427,31 +444,23 @@ namespace librealsense
427444
p.laser_power.laser_power = 150.f;
428445
p.depth_exposure.exposure = 8500.f;
429446
p.depth_auto_exposure.auto_exposure = 1;
430-
p.color_auto_exposure.auto_exposure = 1;
431-
p.color_exposure.exposure = 156;
432-
p.color_backlight_compensation.backlight_compensation = 0;
433-
p.color_brightness.brightness = 0;
434-
p.color_contrast.contrast = 50;
435-
p.color_gain.gain = 64;
436-
p.color_gamma.gamma = 300;
437-
p.color_hue.hue = 0;
438-
p.color_power_line_frequency.power_line_frequency = 3;
439-
p.color_saturation.saturation = 64;
440-
p.color_sharpness.sharpness = 50;
441-
p.color_auto_white_balance.auto_white_balance = 1;
442-
p.color_white_balance.white_balance = 4600;
443447
p.depth_gain.gain = 16.f;
444448
p.hdad.ignoreSAD = 0;
445449
p.amplitude_factor.amplitude = 0.f;
446450
}
451+
452+
void default_430(preset& p)
453+
{
454+
default_430_except_color(p);
455+
default_430_color_only(p);
456+
}
447457
// the only different between high res to mid & low is the amplitude_factor value
448458
void default_450_high_res(preset& p)
449459
{
450460
p.amplitude_factor.amplitude = 0.f;
451461
}
452462

453-
//used as base preset for the D450
454-
void default_450_mid_low_res(preset& p)
463+
void default_450_mid_low_res_except_color(preset& p)
455464
{
456465
p.depth_controls.deepSeaMedianThreshold = 500;
457466
p.depth_controls.deepSeaNeighborThreshold = 7;
@@ -475,11 +484,6 @@ namespace librealsense
475484
p.rsvc.minWEsum = 3;
476485
p.rsvc.uShrink = 3;
477486
p.rsvc.vShrink = 1;
478-
p.color_control.disableRAUColor = 0;
479-
p.color_control.disableSADColor = 0;
480-
p.color_control.disableSADNormalize = 0;
481-
p.color_control.disableSLOLeftColor = 0;
482-
p.color_control.disableSLORightColor = 0;
483487
p.rctc.rauDiffThresholdBlue = 51;
484488
p.rctc.rauDiffThresholdGreen = 51;
485489
p.rctc.rauDiffThresholdRed = 51;
@@ -494,6 +498,29 @@ namespace librealsense
494498
p.spc.sloK2PenaltyMod2 = 130;
495499
p.hdad.lambdaAD = 800.f;
496500
p.hdad.lambdaCensus = 26.f;
501+
p.depth_table.depthClampMax = 65536;
502+
p.depth_table.depthClampMin = 0;
503+
p.depth_table.depthUnits = 1000;
504+
p.depth_table.disparityShift = 0;
505+
p.ae.meanIntensitySetPoint = 1000;
506+
p.census.uDiameter = 9;
507+
p.census.vDiameter = 9;
508+
p.laser_state.laser_state = 1;
509+
p.laser_power.laser_power = 150.f;
510+
p.depth_exposure.exposure = 8500.f;
511+
p.depth_auto_exposure.auto_exposure = 1;
512+
p.depth_gain.gain = 16.f;
513+
p.hdad.ignoreSAD = 0;
514+
p.amplitude_factor.amplitude = 0.08f;
515+
}
516+
517+
void default_450_mid_low_res_color_only(preset& p)
518+
{
519+
p.color_control.disableRAUColor = 0;
520+
p.color_control.disableSADColor = 0;
521+
p.color_control.disableSADNormalize = 0;
522+
p.color_control.disableSLOLeftColor = 0;
523+
p.color_control.disableSLORightColor = 0;
497524
p.cc.colorCorrection1 = -0.493164f;
498525
p.cc.colorCorrection2 = 0.831055f;
499526
p.cc.colorCorrection3 = 0.831055f;
@@ -506,17 +533,6 @@ namespace librealsense
506533
p.cc.colorCorrection10 = -0.272461f;
507534
p.cc.colorCorrection11 = -0.272461f;
508535
p.cc.colorCorrection12 = -0.355469f;
509-
p.depth_table.depthClampMax = 65536;
510-
p.depth_table.depthClampMin = 0;
511-
p.depth_table.depthUnits = 1000;
512-
p.depth_table.disparityShift = 0;
513-
p.ae.meanIntensitySetPoint = 1000;
514-
p.census.uDiameter = 9;
515-
p.census.vDiameter = 9;
516-
p.laser_state.laser_state = 1;
517-
p.laser_power.laser_power = 150.f;
518-
p.depth_exposure.exposure = 8500.f;
519-
p.depth_auto_exposure.auto_exposure = 1;
520536
p.color_auto_exposure.auto_exposure = 1;
521537
p.color_exposure.exposure = 156;
522538
p.color_backlight_compensation.backlight_compensation = 0;
@@ -530,10 +546,20 @@ namespace librealsense
530546
p.color_sharpness.sharpness = 50;
531547
p.color_auto_white_balance.auto_white_balance = 1;
532548
p.color_white_balance.white_balance = 4600;
533-
p.depth_gain.gain = 16.f;
534-
p.hdad.ignoreSAD = 0;
535-
p.amplitude_factor.amplitude = 0.08f;
549+
}
536550

551+
//used as base preset for the D450
552+
void default_450_mid_low_res(preset& p)
553+
{
554+
default_450_mid_low_res_except_color(p);
555+
default_450_mid_low_res_color_only(p);
556+
}
557+
558+
// D436i has same depth as D435 and same color as D455
559+
void default_436(preset& p)
560+
{
561+
default_430_except_color(p);
562+
default_450_mid_low_res_color_only(p);
537563
}
538564

539565
void high_accuracy(preset& p)

src/ds/advanced_mode/presets.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ namespace librealsense
138138
void default_410( preset & p );
139139
void default_420( preset & p );
140140
void default_430( preset & p );
141+
void default_436( preset & p );
141142
void default_450_high_res( preset & p );
142143
void default_450_mid_low_res( preset & p );
143144
void high_accuracy( preset & p );

0 commit comments

Comments
 (0)