{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Black borders are removed from a page" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "from fusus.book import Book" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "B = Book(cd=\"~/github/among/fusus/example\")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# cd to the book directory\n", "!cd `pwd`" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "def checkBorder(pageNum):\n", " page = B.process(pageNum, batch=False, uptoLayout=True)\n", " page.show(\"gray,normalized\", width=400)\n", " return page" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " 0.00s Batch of 1 pages: 101\n", " 0.00s Start batch processing images\n", " | | | -0.00s 1 101.jpg \n", " 1.26s all done\n" ] }, { "data": { "text/html": [ "