public static bool SetSegmentationObjectId(string objectName, int objectId, bool isNameRegex) { int finalId = ((objectId + 2) << 16) | ((objectId + 1) << 8) | objectId; bool result = CameraFiltersScript.SetSegmentationId(objectName, finalId, isNameRegex); isSegmentationUpdated = result; return(result); }
public void SetUpCamera(string cameraName, bool isDrone) { this.cameraName = cameraName; renderCam = GetComponent <Camera>(); fov = renderCam.fieldOfView; recorder = new DataRecorder(); waitUntilNext = new WaitForSeconds(AirSimSettings.GetSettings().Recording.RecordInterval); waitForEndOfFrame = new WaitForEndOfFrame(); shaderScript = GetComponent <CameraFiltersScript>(); renderCam.enabled = false; shaderScript.effect = ImageType.Count; recorder.IsDrone(isDrone); SetUpRenderTextureForCapture(ImageType.Scene); SetUpRenderType(ImageType.Scene); }
public static int GetSegmentationObjectId(string objectName) { return(CameraFiltersScript.GetSegmentationId(objectName)); }