Skip to content

Comparer: click metric graph to seek to that frame (#8)#41

Merged
chammoru merged 1 commit into
masterfrom
feature/comparer-graph-click-seek
May 27, 2026
Merged

Comparer: click metric graph to seek to that frame (#8)#41
chammoru merged 1 commit into
masterfrom
feature/comparer-graph-click-seek

Conversation

@chammoru
Copy link
Copy Markdown
Owner

Closes #8.

The PSNR/SSIM line graph in FrmsInfoView now responds to left-clicks: clicking any point in the graph area calls SetScenes() to set both panes to the frame at that X position, then refreshes the per-frame metric label via CalMetrics(). The frame is computed against the current view range, so the wheel-zoom and click-to-seek features stack naturally — zoom in to a region of interest and click any point to land exactly on that frame.

  • Clicks outside the graph area fall through to the default handler.
  • Double-click still resets the view to the full range.
  • If a click happens during playback, the play timer is killed first.

How to try

  • Open two video sources, let metric scanning produce a few frames.
  • Click any point on the metric graph — both panes jump to that frame.
  • Try zooming in first, then clicking for sub-frame-precision seeks.

Add MetricCal::FrameAtX that maps a graph-area X pixel to a frame ID
under the current view range, and let FrmsInfoView::OnLButtonDown use
it to call SetScenes() and refresh the per-frame metric label. Combined
with the recently-landed wheel zoom, the user can now zoom into a
region of interest and click any point to jump straight to that frame.

Double-click still resets the view, and clicks outside the graph area
fall through to the default handler.
@chammoru chammoru marked this pull request as ready for review May 27, 2026 09:49
@chammoru chammoru merged commit fa5600b into master May 27, 2026
1 check passed
@chammoru chammoru deleted the feature/comparer-graph-click-seek branch May 27, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comparer: seek to a frame by clicking metric/frame views

1 participant