evo-egomotion-dynamic-analysis

SkillDev tools

For consecutive sampled frame pairs, computes sparse optical flow, estimates camera egomotion via partial affine transform, and detects dynamic objects via homography-based motion compensation and frame differencing.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the evo-egomotion-dynamic-analysis skill

What this skill tells your AI

The instructions your AI receives, as published by openlair/openskill in tasks-evolved/dynamic-object-aware-egomotion/environment/skills/evo-egomotion-dynamic-analysis/SKILL.md and read by ahel’s review.

Analyzes consecutive grayscale frame pairs to classify camera motion and detect dynamic objects.

Key Functions

  • compute_egomotion_labels(prev_gray, curr_gray, th_trans=2.0, th_scale=0.015, th_rot=0.01) Returns (labels, good_prev, good_curr) where labels is a list of motion strings.

  • detect_dynamic_objects(prev_gray, curr_gray, good_prev, good_curr) Returns boolean mask (H,W) where True = dynamic pixel.

  • analyze_frame_pairs(frames) Processes all consecutive pairs. Returns (motion_labels, dynamic_masks). motion_labels: list of (sample_idx_prev, sample_idx_curr, labels_list) dynamic_masks: list of boolean 2D arrays

Usage

import sys
sys.path.insert(0, '/app/environment/skills/evo-egomotion-dynamic-analysis/scripts')
from utils import analyze_frame_pairs

motion_labels, dynamic_masks = analyze_frame_pairs(grayscale_frames)

Motion Classification Rules

  • Dolly In/Out: scale deviation > 0.015 from 1.0
  • Roll Left/Right: rotation > 0.01 rad
  • Pan Left/Right: |tx| > 2.0 px AND |tx| >= |ty|. Positive tx = Pan Left.
  • Tilt Up/Down: |ty| > 2.0 px AND |ty| > |tx|. Positive ty = Tilt Up.
  • Stay: if no other label triggered

Pipeline

  1. Shi-Tomasi corners (goodFeaturesToTrack, maxCorners=300)
  2. Lucas-Kanade optical flow (calcOpticalFlowPyrLK)
  3. estimateAffinePartial2D with RANSAC for egomotion
  4. findHomography with RANSAC for motion compensation
  5. warpPerspective + absdiff + threshold(25) for dynamic mask
  6. Morphological open(3x3) + close(7x7) cleanup

Signals

GitHub stars
89
Forks
4
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
evo-egomotion-dynamic-analysis
Source
github.com/openlair/openskill