hl2ss
hl2ss copied to clipboard
Better PV Extrinsics
For the PV calibration -- there is an alternative that can be used to get the extrinsics from the Research Mode Rignode to the PV camera. By taking the RM Rignode locator and then locating that in the PV coordinate system, we get the consistent, correct extrinsics. This code solves that problem, and could be included in the calibration information for the PV, rather than having to run the separate calibration script.
static void PV_OnVideoFrameArrived_Intrinsics(MediaFrameReader const& sender, MediaFrameArrivedEventArgs const& args)
.....
GUID nodeId = ResearchMode_GetRigNodeId();
SpatialLocator g_locator = SpatialGraphInteropPreview::CreateLocatorForNode(nodeId);
int64_t timestamp = frame.SystemRelativeTime().Value().count();
float4x4 extrinsics = Locator_Locate(QPCTimestampToPerceptionTimestamp(timestamp), Locator_GetLocator(), frame.CoordinateSystem());
Thanks for the great library!
That is very cool. Thanks for sharing.