Coder Social home page Coder Social logo

liuguoyou / video_stab Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lesialin/video_stab

0.0 1.0 0.0 21.22 MB

video stabilization implementation of "A Non-linear filter for gyroscope-based video stabalization"

Shell 1.80% Python 98.20%

video_stab's Introduction

Video Stabilization

This repo is to implementation video stabilization by gyroscope, which is based on paper A Non-Linear Filter for Gyroscope-Based Video Stabilization

You can refer the algo memo: https://github.com/lesialin/video_stab/blob/main/doc/algo_memo/Non_Linear_Filter_of_vid_stab/Non-Linear%20Filter%20for%20Video%20Stabilization.md

The simulation of vid_stab flow is as below,

configuration

The configuration in config/ folder, include:

debug_config.json

  • test_mode: in test_mode you can test log in test_frame_no
  • start_frame_no: run the video start from start_frame_no
  • preserve_margin: crop the outer margin or not
  • log_image: log result comparison frame
{
    "eis_pass1": true,
    "eis_pass2":false,
    "rs_correct_off": false,
    "test_mode":false,
    "test_frame_no": 100,
    "start_frame_no":0,
    "preserve_margin":false,
    "log_image":true   
    
  }

eis_config.json

  • crop_ratio: crop ratio, ex 0.1 means crop 10% height/width each side
  • alpha: low-pass filter coefficient, if use constant filter
  • alpha_min: the minimum low-pass filter coefficient, if use non-linear filter
  • alpha_max: the maximum low-pass filter coefficient, if use non-linear filter
  • beta: the low-pass filter response coefficient
  • gamma: the low-pass filter coefficient for the lookahead frame motion
  • inner_padding_ratio: the inner padding ratio of crop region
  • lookhead_no: the lookahead frame number
  • knee_point: knee point number for image warp
  • use_nonlinear_filter:use non-linear filter or not
{
    "crop_ratio": 0.1,
    "alpha": 0.9,
    "alpha_min": 0.75,
    "alpha_max": 0.95,
    "beta": 1.0,
    "gamma": 0.9,
    "damping": 0.95,
    "inner_padding_ratio": 0.0,
    "lookahead_no": 10,
    "knee_point": 39,
    "use_nonlinear_filter": true
  }

gyro_sensor_config.json

{
    "gyro_bias": [
        2.68081035e-04,
        -5.34824714e-04,
        -9.35238864e-05
    ],
    "sample_rate": 460
}

coord_trans_matrix.json

{
    "coordinate_trans_matrix":[
        [1,0,0],
        [0,1,0],
        [0,0,1]
    ]
}

video_config.json

{
    "preview_height": 720,
    "preview_width": 1280
}

cmos_sensor_config.json

  • blanking: the blanking number of the cmos frame

{
    "blanking": 68,
    "cmos_frame_height": 3000,
    "cmos_frame_width": 4000,
    "effective_height": 2256,
    "effective_width": 4000,
    "focal_in_mm": 4.74,
    "sensor_width_in_mm": 6.4
}

siggen_config.json

  • gyro_log_idx: the order in gyro log
  • gyro_time_scale_exp: the timestamp scale in exp
  • cmos_time_scale_exp: the timestamp scale in exp
{
    "gyro_log_idx": [0,1,2,3],
    "gyro_time_scale_exp": 7,
    "cmos_time_scale_exp": 7
    
}

video_stab's People

Contributors

lesialin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.