public CalculateOpticalFlow ( CvPoint2D32f corners0 ) : AsyncResult | ||
corners0 | CvPoint2D32f | |
리턴 | AsyncResult |
void Start() { _of = GetComponent<OpticalFlowWorker>(); _tex = new Texture2D(0, 0, TextureFormat.RGB24, false); var mf = flow.GetComponent<MeshFilter>(); _mesh = mf.mesh = new Mesh(); background.renderer.sharedMaterial.mainTexture = _tex; _corners0 = FlowUtil.GenGridCorners(_of.width, _of.height, 50f); _result = _of.CalculateOpticalFlow(_corners0); }
// Use this for initialization void Start() { _of = GetComponent<OpticalFlowWorker>(); _videoTex = new Texture2D(0, 0, TextureFormat.RGB24, false, false); _flowMesh = new Mesh(); var mf = flow.GetComponent<MeshFilter>(); mf.sharedMesh = _flowMesh; video.renderer.sharedMaterial.mainTexture = _videoTex; _corners0 = FlowUtil.GenGridCorners(_of.width, _of.height, 50f); _cornerBirthTimes = new float[_corners0.Length]; var t = Time.timeSinceLevelLoad; for (var i = 0; i < _cornerBirthTimes.Length; i++) _cornerBirthTimes[i] = t; _ofResult = _of.CalculateOpticalFlow(_corners0); }
void Start() { _of = GetComponent<OpticalFlowWorker>(); _tex = new Texture2D(0, 0, TextureFormat.RGB24, false); target.renderer.sharedMaterial.mainTexture = _tex; _corners0 = FlowUtil.GenGridCorners(_of.width, _of.height, 50f); _prevResult = _result = _of.CalculateOpticalFlow(_corners0); }