Giter Site home page Giter Site logo

video_scanner's Introduction

GPLv3 License

โญ A release on Windows and Ubuntu is updated: https://github.com/divertingPan/video_scanner/releases

video_scanner

Generate the scanning image from a video

sample

output preview

output preview

output preview

How to use the source code: run main.py within a python env

How to use the release software: run the executable 'scan_ver_0.3' in the main folder

v0.3.5:

  1. Fixed a bug where detection failed when adaptive sensitivity = 1.
  2. Added a video stabilizer to help smooth handheld shooting videos.

stabilizer

The algorithm utilizes the first frame as an 'anchor' frame and detects keypoints. Subsequent frames are aligned to the keypoints detected in the first frame.

Note: To achieve optimal results with the video stabilizer, the foreground and background of the moving object should not be too 'clean' (for providing enough keypoints to matching), and should not change too much during the video. To preview the stabilizer in the left canvas, mark the 'video stabilizer' option before loading the video. If you have already loaded a video, mark the option and reload the video. Additionally, if you wish to calculate the movement with the stabilizer, mark the option before clicking 'calculate move'.

Known problem: enabling the stabilizer significantly SLOWS DOWN the generation process.

v0.3.4:

The preview of the loaded video is optimized. Now the responding speed is faster when dragging the scrollbar.

v0.3.3:

main UI

  1. Now the movement detection results can be edited. First to click the 'calculate move' button to get the movement information. Then click 'process'. Of course you can modify the movement information in the textbox. (The first number of position frame is always '0', representing the start frame of detection position.)

For better understanding the parameters of splitting, referring to the following example.

parameters

  1. Add a 'stop' button to interrupt the process.

  2. update the save_img function, now it saves the jpeg file with 100% quality.

v0.3:

  1. The default save directory is the rootpath of the imported video.

  2. cv2.imwrite() is replaced by cv2.imencode() to support special characters in the save path.

  3. Add the prompt of segment width under 'adaptive' mode to check the moving detection results.

v0.2:

Add the adaptive movement detection.

Blog: https://divertingpan.github.io/post/moving_detection/

v0.1:

Blog: https://divertingpan.github.io/post/train_scanning/

Hardware Solution

See repo: https://github.com/divertingPan/Line_Scan_Camera

video_scanner's People

Contributors

divertingpan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

video_scanner's Issues

Invalid literal

Hi,

I'd love to get this going for some videos of locos I've taken myself. I download and have run the linux version (0.3.4) and run it. It shows the GUI and I give it the source file, position, images saving width, start frame and sensitivity. Then I click "calculate move" but it shows an error "Error: invalid literal for int() with base 10: ''`.

image

Any idea what is causing the issue?

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.