Created a barcode encoder and decoder Python tools.
The barcode encoder generates barcodes as PNG files, than converts them to YUV files, then stitches these into one YUV video file and finaly overlays this video over the base video to produce a YUV video of the base with encoded barcodes in the upper part of the video. The decoder gets a YUV video with overlaid barcodes and first splits it into PNG files, than decodes every file, and finally generates a stats file. The encoder and decoder use Zxing and its Java command-line tools for the encoding and decoding. They also use ffmpeg for the conversion between PNG and YUV and vice versa. BUG= TEST= The tools could be used from trunk as: ./tools/barcode_tools/barcode_encoder.py --barcode_height=32 --base_frame_width=352 --base_frame_height=288 --base_yuv=<path_nad_name_to_base_file> --output_yuv=<path_nad_name_to_output_file> ./tools/barcode_tools/barcode_decoder.py --yuv_file=<path_and_name_to_yuv_file> --yuv_frame_width=352 --yuv=frame_height=288 --barcode_height=32 --stats_file=<path_and_name_of_stats_file> By default the width of the barcodes is the same as the width of the base YUV frames. This could be changes with the command-line option --barcode_width Review URL: https://webrtc-codereview.appspot.com/679010 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2612 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
21
tools/barcode_tools/DEPS
Normal file
21
tools/barcode_tools/DEPS
Normal file
@@ -0,0 +1,21 @@
|
||||
# This is trimmed down version of the main tools DEPS file which is to be used
|
||||
# in Chromiums PyAuto WebRTC video quality measurement test. We will only
|
||||
# need the Zxing dependencies as we only use the barcode tools in this test.
|
||||
|
||||
deps = {
|
||||
# Used by tools/barcode_tools
|
||||
"third_party/zxing/core":
|
||||
"http://zxing.googlecode.com/svn/trunk/core@2349",
|
||||
|
||||
# Used by tools/barcode_tools
|
||||
"third_party/zxing/javase":
|
||||
"http://zxing.googlecode.com/svn/trunk/javase@2349",
|
||||
}
|
||||
|
||||
hooks = [
|
||||
{
|
||||
# A change to a .gyp, .gypi, or to GYP itself should run the generator.
|
||||
"pattern": ".",
|
||||
"action": ["python", "src/build/gyp_chromium", "--depth=.",
|
||||
"barcode_tools.gyp"],
|
||||
},
|
||||
Reference in New Issue
Block a user