Skip to content

yjlcoder/image-complexity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Complexity

This script will calculate the image complexity of every frame from a given video.

The script depends on OpenCV and some FFmpeg libraries (such as libavcodec-dev).

The way of calculating the image complexity is from PHOG-Derived Aesthetic Measures Applied to Color Photographs of Artworks, Natural Scenes and Objects by Redies et al.

Install

git clone https://github.com/yang-jace-liu/image-complexity
cd image-complexity
./build.sh

You may encounter some problems while linking OpenCV. Most of the problems can be solved by installing corresponding missing libraries: For example that your OS not having libavcodec, you can install it by using sudo apt install libavcodec-dev.

Usage

Usage: ./build/image-complexity <video path> <output path>

Analyze

$ ./analyze.py -h
usage: analyze.py [-h] [--html-format] [--output-cdf OUTPUT_CDF] input

This script is to analyze the output of the image complexity extracting program.

positional arguments:
  input                 The input file

optional arguments:
  -h, --help            show this help message and exit
  --html-format         Generate html format output for the convenience of copying/pasting to Excel/Google Sheet/Apple Numbers.
  --output-cdf OUTPUT_CDF
                        a file path shows the CDF of the data. PDF format is preferred.

Copy the analysis result to Excel / Google Sheets / Apple Numbers

For linux users:

$ ./analyze.py raw.txt --html-format | xclip -t text/html -selection clipboard

TODOs

  • Multithreading support

About

Calculate the image complexity of a given video.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published