質問: how to modify the tara sdk to auto select the deviceid and resolutionid?
回答: the source of the tara library has to be modified to start streaming directly with tara and also in the resolution required. follow the steps to do the changes and build the library file. in the api named cameraenumeration::getdeviceidecon in tara.cpp is the device selection and resolution selection. the last two lines of the method is the resolution selection. replace the resolution id with the value of the resolution required. resolution id 0 for 752 x 480 resolution id 1 for 640 x 480 resolution id 2 for 320 x 240 to select the stereo camera by default compare the name of the device with the friendly name see3cam_stereo and assign that id to the variable deviceid of that method. snippet to compare the device name with the friendly name is also in the same method for your reference. note: setting the stereo camera to stream by default will have another drawback when multiple stereo camera's are connected the first enumerated stereo camera will be initiated by default.