bm.state->roi1 = roi1;
bm.state->roi2 = roi2;
bm.state->preFilterCap = 13;
bm.state->preFilterSize = 13;
bm.state->SADWindowSize = SADWindowSize;
bm.state->minDisparity = 0;
bm.state->numberOfDisparities = numberOfDisparities;
bm.state->textureThreshold = 10;
bm.state->uniquenessRatio = uniquenessRatio;
bm.state->speckleWindowSize = 13;
bm.state->speckleRange = 32;
bm.state->disp12MaxDiff = 1;