コード例 #1
0
ファイル: TxKitEyes.cs プロジェクト: red-pencil/ISWC18
    void OnFrameGrabbed(GstBaseTexture texture, int index)
    {
        //	Debug.Log ("Frame Grabbed: "+index);
        m_grabbedFrames++;
        if (m_grabbedFrames > 10)
        {
            //	_camRenderer[0].Enable();
            //	_camRenderer[1].Enable();
        }

        if (_imageProcessor != null)
        {
            _imageProcessor.ProcessTextures(ref Output);
        }

        if (OnImageArrived != null)
        {
            OnImageArrived(this, index);
        }

        if (RobotConnector != null)
        {
            RobotConnector.OnCameraFPS(_cameraSource.GetCaptureRate((int)EyeName.LeftEye), _cameraSource.GetCaptureRate((int)EyeName.RightEye));
        }
    }
コード例 #2
0
ファイル: GStreamerTest1.cs プロジェクト: mrayy/TxKit
    void OnFrameGrabbed(GstBaseTexture src, int index)
    {
        //m_Texture.Player.CopyFrame (_img);
        m_Texture.Player.CopyFrameCropped(_img, (int)BlitRect.x, (int)BlitRect.y, (int)BlitRect.width, (int)BlitRect.height);
        _img.BlitToTexture(BlittedImage);
//		Debug.Log(String.Format("Frame Copied {0}x{1}",_img.Width,_img.Height));
    }
コード例 #3
0
    void OnFrameGrabbed(GstBaseTexture src, int index)
    {
        if (_sampleImage && index == _targetStream)
        {
            lock (_img) {
                //_SrcTexture.Player.CopyFrameCropped (_img, (int)BlitRect.x, (int)BlitRect.y, (int)BlitRect.width, (int)BlitRect.height);
                if (_sampleRect)
                {
                    _img.CopyCroppedFrom(src.GetPlayer().GetLastImage(index), (int)BlitRect.x, (int)BlitRect.y, (int)BlitRect.width, (int)BlitRect.height, true);
                }
                else
                {
                    _img.CopyFrom(src.GetPlayer().GetLastImage(index));
                }
            }
            _sampleImage = false;

            //	_img.FlipImage (false, true);
            if (OnImageSampled != null)
            {
                OnImageSampled(this, _img);
            }

            _sampleImage = false;
            _newImg      = true;
        }
    }
コード例 #4
0
ファイル: FileAVProvider.cs プロジェクト: red-pencil/ISWC18
 void _OnFrameGrabbed(GstBaseTexture src, int index)
 {
     if (OnImageArrived != null)
     {
         OnImageArrived(this, index);
     }
     _needProcessing = true;
 }
コード例 #5
0
ファイル: LatencyTester.cs プロジェクト: red-pencil/ISWC18
 void OnImageArrived(GstBaseTexture src, int index)
 {
     if (Src.Output == null)
     {
         return;
     }
     _eye      = index;
     new_image = true;
 }
コード例 #6
0
    void OnFrameBlitted(GstBaseTexture src, int index)
    {
        //m_Texture.Player.CopyFrame (_img);
        float w = m_Texture.Player.FrameSizeImage.x;
        float h = m_Texture.Player.FrameSizeImage.y;

        //m_Texture.Player.CopyFrameCropped(_img,(int)(BlitRect.x*w),(int)(BlitRect.y*h),(int)(BlitRect.width*w),(int)(BlitRect.height*h));
        m_Texture.Player.CopyFrameCropped(_img, 0, 0, 7680, 2160);
        _newFrame = true;
//		Debug.Log(String.Format("Frame Copied {0}x{1}",_img.Width,_img.Height));
    }
コード例 #7
0
    void OnFrameBlitted(GstBaseTexture src, int index)
    {
        m_Texture.Player.CopyFrame(_img_left);
        m_Texture.Player.CopyFrame(_img_right);
        float w = m_Texture.Player.FrameSizeImage.x;
        float h = m_Texture.Player.FrameSizeImage.y;

        m_Texture.Player.CopyFrameCropped(_img_left, 0, 0, (int)(w / 2), (int)(h));
        m_Texture.Player.CopyFrameCropped(_img_right, (int)(w / 2), 0, (int)(w / 2), (int)(h));
        _newFrame = true;
        if (_newFrame)
        {
            _img_left.BlitToTexture(blittedImageLeft);
            _img_right.BlitToTexture(blittedImageRight);
            _newFrame = false;
        }
    }
コード例 #8
0
    void OnFrameBlitted(GstBaseTexture src, int index)
    {
        m_Texture.Player.CopyFrame(_img_left);
        m_Texture.Player.CopyFrame(_img_right);
        float w = m_Texture.Player.FrameSizeImage.x;
        float h = m_Texture.Player.FrameSizeImage.y;

        m_Texture.Player.CopyFrameCropped(_img_left, 0, 0, (int)(w / 2), (int)(h));
        m_Texture.Player.CopyFrameCropped(_img_right, (int)(w / 2), 0, (int)(w / 2), (int)(h));
        _newFrame = true;

        //can be moved update function in case of performance issues
        if (_newFrame)
        {
            _img_left.BlitToTexture(blittedImageLeft);
            _img_right.BlitToTexture(blittedImageRight);
            _newFrame = false;
        }
    }
コード例 #9
0
 void OnFrameGrabbed(GstBaseTexture src, int index)
 {
     _needProcessing [index] = true;
 }
コード例 #10
0
 void OnFrameGrabbed(GstBaseTexture src, int index)
 {
     _newFrame = true;
 }
コード例 #11
0
 public DebugCameraCaptureElement(GstBaseTexture src)
 {
     SrcTexture = src;
 }
コード例 #12
0
 public ImageSampler(GstBaseTexture src, GstImageInfo.EPixelFormat format = GstImageInfo.EPixelFormat.EPixel_Alpha8)
 {
     _format     = format;
     _SrcTexture = src;
     _initTexture();
 }
コード例 #13
0
 public DebugCameraCaptureElement(GstBaseTexture src)
 {
     SrcTexture = src;
 }
コード例 #14
0
 void OnFrameGrabbed(GstBaseTexture src, int index)
 {
     //Debug.Log ("A");
     m_dirty = true;
 }