Revision 37ebcc92afa8156e87baf04c049b6147f094096b authored by Software Heritage on 22 March 2017, 00:00:00 UTC, committed by Software Heritage on 24 April 2017, 00:00:00 UTC
0 parent
Raw File
README.txt
Midway Video Equalization
*************************

*******
SUMMARY
*******

This program implements the Midway Equalization method for videos. It assigns
an intermediate histogram to the images of a video. It is useful to reduce the
flickering of a sequence of images. 

This program is part of an IPOL publication (http://www.ipol.im/).

Reference article:

[1] Javier Sanchez, "Midway Video Equalization", Image Processing Online, 2017.

******
AUTHOR
******

Javier Sánchez Pérez <jsanchez@ulpgc.es> 
Centro de Tecnologías de la Imagen (CTIM) 
Universidad de Las Palmas de Gran Canaria

*******
VERSION
*******

Version 1, released on March 22, 2017

*******
LICENSE
*******

This program is free software: you can use, modify and/or redistribute it
under the terms of the simplified BSD License. You should have received a
copy of this license along this program. If not, see
<http://www.opensource.org/licenses/bsd-license.html>.

Copyright (C) 2017, Javier Sánchez Pérez <jsanchez@ulpgc.es>
All rights reserved.

***********
COMPILATION
***********

Required environment: Any unix-like system with a standard compilation
environment (make and C and C++ compilers)

Compilation instructions: run "make" to produce two executables:
 - "midway_video" the main algorithm
 - "generate_output" auxiliary program for the online demo

*****
USAGE
*****

The program reads an input video in raw format and produces an output raw
video with the midway equalization. The input videos need to be converted
to raw format. This can be done using the 'avconv' or 'ffmpeg' programs as:

  1. Converting an mpeg 4 video file to raw data:

    'avconv -i video.mp4 -f rawvideo -pix_fmt rgb24 -y raw_video.raw'
  
  2. Converting a raw video file to mpeg 4:
    
    'avconv -f rawvideo -pix_fmt rgb24 -video_size 640x360 -framerate
          30 -i output_video.raw -pix_fmt yuv420p output_video.mp4'
          
The program works with RGB images of 3 bytes (rgb24). It is necessary to
know the dimensions of the original video and its framerate. The 
accompanying script 'cmdline_execute.sh' facilitates the task of converting
the videos to/from raw data and calling the midway program.

Usage instructions of the midway program:

  Usage: midway_video raw_input_video width height nframes [OPTIONS]

  This program calculates the Midway Equalization for a video.
  'raw_input_video' is a video file in raw format (rgb24).
  'width' is the width of the images of the video in pixels.
  'height' is the height of the images of the video in pixels.
  'nframes' is the number of frames in the video.

  OPTIONS:
  --------
   -o name  output video name to write the computed raw video,
              default value 'output_video.raw'
   -m N     equalization method,
              0.histogram inversion; 1.image sorting;
              default value 1
   -s N     standard deviation for the Gaussian convolutions,
              default value 30.000000
   -d       use the dithering method. 
   -v       switch on verbose mode. 
   
   
Usage examples:

  1.Directly using the midway program:
    
  > avconv -i data/Chaplin.mp4 -f rawvideo -pix_fmt rgb24 -y video.raw 
  > bin/midway_video video.raw 768 576 130 -o output_video.raw -m 0 -s 30 -v
  > avconv -f rawvideo -pix_fmt rgb24 -video_size 768x576 -framerate 15/1 -i \
           output_video.raw -pix_fmt yuv420p -y out.mp4
  
  2.Using the script:
    
   > bin/cmdline_execute.sh data/Chaplin.mp4 Chaplin_equalized.mp4 0 30

   

*************
LIST OF FILES
*************
histogram.cpp: Functions to compute histograms and accumulated histograms
midway_video.cpp: Main function to be called from the command line
midway_video_equalization.cpp: Implements the Midway equalization for videos
utils.cpp: Functions to convert rgb videos to grayscale and add noise 
cmline_execute.sh: Script to be executed from the command line that facilitates
  the process of converting videos to/from raw data and calling the midway 
  algorithm
gaussian: Directory with the Deriche's fast recursive Gaussian convolution. 
  The implementation of this method is obtained from 
  http://www.ipol.im/pub/art/2013/87/
  
Complementary programs (used for the online demo only):
generate_output.cpp: Program to create videos of the histograms of the input
  and output videos
midway_video.sh: Script used from the IPOL demo to facilitate the process of 
  converting videos to/from raw data and calling the midway algorithm
back to top