Add Record/Playback nodes for recording Track type#57
Draft
shamilatesoglu wants to merge 27 commits into
Draft
Conversation
New node that records camera tracking data per frame and exports COLMAP-format files (cameras.txt + images.txt). - RecordTrackCOLMAP.cpp: Node implementation with Record/Stop/Save/Clear/ Open Folder functions. Captures position, rotation, FOV, sensor size, and lens distortion each frame. Exports OPENCV camera model intrinsics and world-to-camera extrinsics. - RecordTrackCOLMAP.nosdef: Node definition with Track input/output, output directory, image resolution, euler order, record toggle, and frame count pins. - Track.fbs: Added EulerOrder enum (ZYX, XYZ, YXZ, YZX, ZXY, XZY) for configurable euler angle rotation order in COLMAP export. - TrackMain.cpp: Registered RecordTrackCOLMAP in TrackNode enum and ExportNodeFunctions switch. - Track.noscfg: Bumped plugin version to 1.10.0, added nosdef entry. Review fixes applied: - Pin buffer size looked up by name instead of hardcoded index - Null checks on Track flatbuffer fields to prevent crashes - Euler convention matches MakeRotation (eulerAngleZYX with sign negation) - Float output precision set to 12 digits for camera parameters - macOS support added to Open Folder Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> # Conflicts: # Subsystems/nosTrackSubsystem/Config/Track.fbs
New PlaybackTrackCOLMAP node loads cameras.txt + images.txt and outputs Track data. Two modes via PlaybackMode enum: - Sequential: Play/Stop auto-advance frames each execution - Manual: frame index input pin controls which frame to output Pins and functions are orphaned based on mode. Also: - Added PlaybackMode enum to Track.fbs - Renamed Record node pins to InTrack/OutTrack with "Track" display name - Renamed Playback frame pins to InFrameIndex/OutFrameIndex - Replaced nosEngine.SetPinValueByName with NodeContext::SetPinValue Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… frame index only Also fix frames not loading on node creation by always loading when InputDirectory or EulerOrder changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Migrate COLMAP nodes from the removed plugin-local EulerOrder enum to the existing nos.sys.track.CoordinateSystem enum. Also fix nos.track namespace references to nos.sys.track after upstream merge. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
11ff5eb to
8b13957
Compare
WriteFiles() is now invoked from StopRecording() so cameras.txt and images.txt are written the moment recording ends. The Save function remains available for re-exporting the buffered frames on demand.
CopyFrom went straight from BeginPop to Copy, so the GPU copy used the stale default-sized output pin descriptor as its destination. Mirror the single BoundedQueue path (CommonCopyFrom) and MultiRingBuffer by calling BeginCopyFrom and writing the slot resource's descriptor onto the output pin first. The ring resources themselves are still (re)allocated from the input descriptor in OnPathStart — this only fixes the output-side descriptor propagation.
Recording is now driven by the Record pin alone; the dedicated Record/Stop/Save/Clear/OpenFolder functions are removed. Stop is debounced via a new MinOffFrames property so brief glitches in the upstream signal (e.g. SDI bit flips on a camera-derived recording flag) don't end a take prematurely. Buffer is auto-cleared on stop. RecordedFrame is widened to capture Zoom, Focus, RenderRatio, NodalOffset, CenterShift, and DistortionScale from the incoming Track. PlaybackTrackCOLMAP gains a paired ExtrasEntry sidecar so the same fields can be replayed.
Drop the duplicated ChannelViewerFormats enum and retype the Format pin to nos.mediaio.ColorSpace, matching how the rest of the codebase (GetLumaCoeffs, ColorSpaceMatrix, AJA/DeckLink IO, CasWithColorSpace) already names this concept. The two enums disagreed on index ordering (Rec_601=0 vs REC709=0), so the luma coeffs array is reordered to match the new mapping. A MigrateNode hook rewrites legacy pin type_name and remaps the saved enum literal Rec_601/Rec_709/Rec_2020 -> REC601/REC709/REC2020 so existing graphs keep their selected color space. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Introduce nosMath's first flatbuffer custom type (Math.fbs) and wire the plugin through nos_generate_flatbuffers so future nodes can share strongly-typed inputs/outputs. Adds two conversion nodes between Euler angles and quaternions, registered alongside the existing math nodes.
Capture TimingInfo.FixedStepTiming.DeltaSeconds during ExecuteNode and write it as the first non-comment line of the timecode sidecar (0 if the recording wasn't taken in fixed-step mode). Lets downstream tooling know the per-frame interval without having to derive it from timecodes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.