Coder Social home page Coder Social logo

nprapps / barr-redaction-pixels Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 1.0 5 KB

Some scripts for working with the image data from the redacted Mueller report

Home Page: https://www.npr.org/2019/04/18/713974980/see-how-much-of-the-mueller-report-is-redacted

Shell 61.23% JavaScript 38.77%

barr-redaction-pixels's Introduction

Some scripts for working with the image data from the redacted Mueller report

Prerequisite: You should have Tesseract, Imagemagick, and the Poppler tools installed. Put the report into the directory as report.pdf.

1_print.sh

Creates a directory named pages and extracts images of each page in the PDF into an individually numbered file.

2_measure.sh

Measures the number of colored pixels in each page, and dumps the results into a folder named histograms. Isn't actually useful, since only the text in each redaction bar is colored, not the bar itself.

3_parse.js

Takes the output of 2_measure.sh and generates a CSV with the count of colored pixels on each page.

4_ocr.sh

Requires extracted pages from step 1. Runs the report pages through Tesseract and generates an OCR text file with the report contents.

5_montage.sh

Requires extracted pages from step 1. Generates tiled images in a montages folder consisting of the pages for each major section of the report.

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.