Skip to main content
. 2025 Dec 19;28(1):3. doi: 10.3390/e28010003
Algorithm 1: Temporal Information Bottleneck (TIB)
  • 1:

    Input: Sequence of video frames F = {f1, f2, …, fn} frame rate fps

  • 2:

    Output: Pedagogically significant keyframes K = {k1, k2, …, kr}, moderate significance frames K’ = {k’1, k’2, …, k’s}

  • 3:

    // Step 1: Pedagogical Information Scoring

  • 4:

    for i2 to n do

  • 5:

          Compute MSEᵢ1Nk=1NIikIi1k2// structural saliency

  • 6:

          Compute SaliencyMapᵢComputeSaliencyMap(fᵢ)

  • 7:

          Compute SaliencyValueᵢMean (SaliencyMapᵢ) // content saliency

  • 8:

          Set weight α0.67

  • 9:

          Compute SignificanceScoreᵢα × MSEᵢ + (1 − α) × SaliencyValuei//pedagogical information score

  • 10:

    end for

  • 11:

    //Step 2: Instructional Transition Identification

    Apply ClustersDensityPeakClustering({SignificanceScore2, …, SignificanceScoren})

  • 12:

    Initialize candidate keyframes: K{fc|fc ∈ Clusters.Centroids}

  • 13:

    // Step 2: Domain-informed pruning

  • 14:

    Initialize K’ ←

  • 15:

    for each frame k∈ K do

  • 16:

          Compute durationComputeFrameDuration(k, fps)

  • 17:

          Compute personAreaComputePersonArea(k)

  • 18:

          Compute ssimComputeSSIM (k, previousKeyframe)

  • 19:

          Compute saliencyScoreMean (ComputeSaliencyMap(k))

  • 20:

          Compute nccBlankComputeNCC (k, templateblank)

  • 21:

          Compute nccLogoComputeNCC (k, templatelogo)

  • 22:

          if durationΔtshort then

  • 23:

                Remove k from K

  • 24:

          else if nccBlank > Threshold_Blank or nccLogo > Threshold_Logo then

  • 25:

                Remove k from K

  • 26:

          else if personArea > AreaThreshold and not HasContext(k) then

  • 27:

                Remove k from K

  • 28:

          else if ssim > SSIMThresholdHigh and duration > DurationThreshold then

  • 29:

                Remove k from K

  • 30:

          else if ssim > SSIMThresholdModerate and saliencyScore < SaliencyThresholdLow then

  • 31:

                Add k to K’

  • 32:

          end if

  • 33:

    end for

  • 34:

    return K, K’