-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c# D400 Series Visual Presets #2854
Comments
Hi @laolaolulu var pipeline = new Pipeline();
var profile = pipeline.Start();
var adv = AdvancedDevice.FromDevice(profile.Device);
adv.JsonConfiguration = File.ReadAllText("1.json"); |
I don't think this is related to the SDK. My best guess is that by switching from explicit |
I've given up using JSON files. I need to set up Disparity Shift, Laser Power... How should c# be set? Sorry, realsense has too little information about. net. |
Hallo @dorodnic I also discovered something similar to the above. It seems to be some setting in the json file which is causing an access violation exception randomly within the first 5 seconds of running the camera? I just tried to load the HighDensityPreset via a Json file I created through the RealSense viewer. Everything runs fine for around 5 seconds and then you get an access violation. It seems to have more chance of happening if I'm dragging a movable button to get pixel values to use in a measurement. This doesn't happen without the preset loaded. Some setting must be causing instability? |
Hi @KarlAbson |
Hi @dorodnic That would be great! Thanks very much. |
[Realsense Customer Engineering Team Comment] I can reproduce the similar crash issue if a json file loaded. |
Hi @RealSense-Customer-Engineering Great. Thanks for looking into it. I'm using 2.16.5. |
Hi, I can also reproduce the same issue. In my case with 2.17.0 librealsense version. When disposing device I also receive a System.AccessViolationException. If I don't dispose it, when I try to load a Json again I receive again a System.AccessViolationException. It looks like Json settings get device corrupted. If I don't load any Json file, it works fine. |
Hi all ! |
Hi @OlivierHoel, You can refer to #3088 to set the options in C#. |
Thanks for the link but apparently the enum values listed in Intel.RealSense.Option only gives you access to the "standard" parameters and not the "advanced" ones (e.g. disparity shift). I couldn't find a way to set the 92 params present in my json config file (exported from the realsense viewer). |
@ogoshen, any info to support the advanced parameters? |
Advanced mode commands API is yet available in C# ( A PR would be more than welcome here... In the meanwhile I can suggest getting the above fixes for |
This is fixed. Please refer to the release note. |
.net C # How to load the default JSON file?
{
"aux-param-autoexposure-setpoint": "1536",
"aux-param-colorcorrection1": "0.298828",
"aux-param-colorcorrection10": "0",
"aux-param-colorcorrection11": "0",
"aux-param-colorcorrection12": "0",
"aux-param-colorcorrection2": "0.293945",
"aux-param-colorcorrection3": "0.293945",
"aux-param-colorcorrection4": "0.114258",
"aux-param-colorcorrection5": "0",
"aux-param-colorcorrection6": "0",
"aux-param-colorcorrection7": "0",
"aux-param-colorcorrection8": "0",
"aux-param-colorcorrection9": "0",
"aux-param-depthclampmax": "65536",
"aux-param-depthclampmin": "0",
"aux-param-disparityshift": "50",
"controls-autoexposure-auto": "True",
"controls-autoexposure-manual": "8500",
"controls-color-autoexposure-auto": "True",
"controls-color-autoexposure-manual": "156",
"controls-color-backlight-compensation": "0",
"controls-color-brightness": "0",
"controls-color-contrast": "50",
"controls-color-gain": "64",
"controls-color-gamma": "300",
"controls-color-hue": "0",
"controls-color-power-line-frequency": "3",
"controls-color-saturation": "64",
"controls-color-sharpness": "50",
"controls-color-white-balance-auto": "True",
"controls-color-white-balance-manual": "4600",
"controls-depth-gain": "16",
"controls-laserpower": "360",
"controls-laserstate": "on",
"ignoreSAD": "0",
"param-autoexposure-setpoint": "1536",
"param-censusenablereg-udiameter": "9",
"param-censusenablereg-vdiameter": "9",
"param-censususize": "9",
"param-censusvsize": "9",
"param-depthclampmax": "65536",
"param-depthclampmin": "0",
"param-depthunits": "100",
"param-disableraucolor": "0",
"param-disablesadcolor": "0",
"param-disablesadnormalize": "0",
"param-disablesloleftcolor": "0",
"param-disableslorightcolor": "0",
"param-disparitymode": "0",
"param-disparityshift": "50",
"param-lambdaad": "800",
"param-lambdacensus": "26",
"param-leftrightthreshold": "24",
"param-maxscorethreshb": "2047",
"param-medianthreshold": "500",
"param-minscorethresha": "1",
"param-neighborthresh": "7",
"param-raumine": "1",
"param-rauminn": "1",
"param-rauminnssum": "3",
"param-raumins": "1",
"param-rauminw": "1",
"param-rauminwesum": "3",
"param-regioncolorthresholdb": "0.0499022",
"param-regioncolorthresholdg": "0.0499022",
"param-regioncolorthresholdr": "0.0499022",
"param-regionshrinku": "3",
"param-regionshrinkv": "1",
"param-robbinsmonrodecrement": "10",
"param-robbinsmonroincrement": "10",
"param-rsmdiffthreshold": "4",
"param-rsmrauslodiffthreshold": "1",
"param-rsmremovethreshold": "0.375",
"param-scanlineedgetaub": "72",
"param-scanlineedgetaug": "72",
"param-scanlineedgetaur": "72",
"param-scanlinep1": "60",
"param-scanlinep1onediscon": "105",
"param-scanlinep1twodiscon": "70",
"param-scanlinep2": "342",
"param-scanlinep2onediscon": "190",
"param-scanlinep2twodiscon": "130",
"param-secondpeakdelta": "325",
"param-texturecountthresh": "0",
"param-texturedifferencethresh": "0",
"param-usersm": "1",
"param-zunits": "100",
"stream-depth-format": "Z16",
"stream-fps": "6",
"stream-height": "720",
"stream-width": "1280"
}
The text was updated successfully, but these errors were encountered: