opencv: move openni option inside block