Page 1 of 1

Reading timecode from an eSync 2 via camera sdk?

Posted: Sun Nov 29, 2020 4:51 am
by antithing
I have a single Prime 13 running a computer vision application on a PC. What I need, is now to add genlock and timecode to this application.

If I connect an eSync 2 to this setup, and connect timecode and genlock to the eSync 2, can i read the timecode using the camera sdk?

Is it possible to have a setup that is just:

Host PC - > eSync2 (genlock / TC) -> prime 13


Re: Reading timecode from an eSync 2 via camera sdk?

Posted: Mon Nov 30, 2020 1:49 pm
by steven.andrews
Hi antithing,

As eSync can be used with a single Prime camera. If you connect the eSync, you can sync the camera to the genlock and receive the timecode.

Steven Andrews
OptiTrack | Senior Customer Support Engineer

Re: Reading timecode from an eSync 2 via camera sdk?

Posted: Tue Dec 01, 2020 2:47 am
by antithing
Hi Steven, thanks for getting back to me.

Do I need to run any code to set up genlock? or will the camera automatically sync when the eSync is connected?

Is there any example code for reading the timecode from the eSync?

Thanks again.

Re: Reading timecode from an eSync 2 via camera sdk?

Posted: Tue Dec 01, 2020 10:37 am
by steven.andrews
I am not sure if any of the samples specifically show how to use genlock or timecode, but the headers usually show the definitions for the data you need.

Working with the eSync should be similar to working with a camera. When you call an update, cameras give out frames, and so does the eSync. Instead of the frame containing a video image, you will get a pointer to a frame with some telemetry information. When you have that frame pointer just access it like so.

Code: Select all

For fetching cameras you create a CameraList and call CameraManager::GetCamera(). For fetching the eSync you create a HardwareDeviceList and call GetDevice().
You can add cDevice pointers to the cModuleSync object just the same as you add cameras by calling cModuleSync::AddCamera( device );

You might also find the following useful from frame.h

Code: Select all

        //== Synchronization Telemetry (The only time these functions return valid information
        //==                            is when this object is the result of calling GetFrame()
        //==                            on an OptiTrack eSync device)
        //== If you want synchronized telemetry to compliment one or more Ethernet cameras the
        //== best way to achieve this is to attach both the eSync and the cameras to a
        //== synchronizer.  The frame groups returned from the synchronizer will then include
        //== synchronized camera and synchronization telemetry.

        bool            IsSynchInfoValid();     //== Reports if the calls to the rest of the
                                                //== synchronization functions will return
                                                //== valid/meaningful information.

        bool            IsTimeCodeValid();      //== Is there valid TimeCode information =====---
        bool            IsExternalLocked();     //== Synchronization is locked to a signal ===---
        bool            IsRecording();          //== eSync is reporting that recording should ---
                                                //== take place  =============================---
        Core::cTimeCode TimeCode();             //== TimeCode ================================---

I hope this all helps,
Steven Andrews
OptiTrack | Senior Customer Support Engineer