BoxToolBox is a simple python application built around the openCV library

Overview

BoxToolBox

BoxToolBox is a simple python application built around the openCV library. It is not a full featured application to guide you through the whole process. It is a missing piece in your toolchain between Lightroom and Photoshop. You still need to take you box pictures as straight as possible with the same camera settings and pre-process them to match the lighting.

It will help you to

  • correct perspective of the source photos
  • quickly test the layout and arrangement
  • place photos to correct location
  • generate grid to recolor or use as mask to hide the seams

It will not

  • unify brightness and colors of source photos
  • magically correct photos taken from bad perspective
  • assemble final picture

How to install (Linux)

Just clone or download this repository and run the main script. You will also need opencv installed.

pip install opencv-python
git clone https://github.com/fhorinek/BoxToolBox.git
cd BoxToolBox
python BoxToolBox.py

How to install (Windows)

Just download and execute pre-built exe file

It will trigger Windows protection, you need to click on more info and run anyway

How to use it

Here is a quick start video on youtube

BoxToolBox quick tutorial

Perspective editor

One window acts as input for defining box corners and the second window shows transformation previu. Controls on the second window sets transformed image width and height. The resolution for the final picture will be Width * Grid W x Height * Grid H. Margin define how much of the image will be preserved around the defined box. Preview scale will define size of the temporary pictures used in layout editor. Smaller scale will make the editor go faster, larger scale will provide better quality.

norm

Controls:

  • Mouse wheel - zoom
  • Left button - Pan
  • Middle button - Select point
  • N key and M key - Open previous and next image
  • Q - Close editor

Normally you only need to define a transformation box for the first photo. The transformation will be applied to all following pictures. If you bump the camera during the session you can find the first image that is affected and redefine the transformation box. All following images will use that correction.

Layout editor

You can use this window to compose the final image. Here you can change geometry for the final image. Set scaling and spacing for the images. You can use Transparent spacer to define a very precise scale.

layout

If the settings window is not visible press Ctrl-P.

Controls:

  • Mouse wheel - zoom
  • Left button - Pan
  • Drag picture - Swap images
  • N key and M key - set previous and next image
  • E key - Open perspective editor for image
  • C key - Toggle Crop or Full flag for image
  • S key - Show full image with marker lines
  • Q key - Close editor
  • Render - Show final image in full resolution
  • Output - Render final image in layers

Use different slots to experiment with multiple layouts and geometries.

Output

Output for the image will consist of multiple images placed inside the directory slot_n. Photos in images will be placed to correct location on transparent background. You will also find the generated grid image. Import these images as layers to any photo editor to compose the final image.

gimp

Disclaimer

This tool is my hobby project, done in my free time for my personal use. However I think that other people might find it useful so I made extra steps to make it more friendly and easier to install. If you found a bug or want something to add, feel free to open an issue. Pull requests are also welcomed!

If you found it useful and want to thank me, you can buy me a bear :-)

You might also like...
A simple demo program for using OpenCV on Android
A simple demo program for using OpenCV on Android

Kivy OpenCV Demo A simple demo program for using OpenCV on Android Build with: buildozer android debug deploy run Run (on desktop) with: python main.p

A pkg stiching around view images(4-6cameras) to generate bird's eye view.
A pkg stiching around view images(4-6cameras) to generate bird's eye view.

AVP-BEV-OPEN Please check our new work AVP_SLAM_SIM A pkg stiching around view images(4-6cameras) to generate bird's eye view! View Demo · Report Bug

python ocr using tesseract/ with EAST opencv detector

pytextractor python ocr using tesseract/ with EAST opencv text detector Uses the EAST opencv detector defined here with pytesseract to extract text(de

~1000 book pages + OpenCV + python = page regions identified as paragraphs, lines, images, captions, etc.
~1000 book pages + OpenCV + python = page regions identified as paragraphs, lines, images, captions, etc.

cosc428-structor I had an open-ended Computer Vision assignment to complete, and an out-of-copyright book that I wanted to turn into an ebook. Convent

LEARN OPENCV IN 3 HOURS USING PYTHON - INCLUDING EXAMPLE PROJECTS
LEARN OPENCV IN 3 HOURS USING PYTHON - INCLUDING EXAMPLE PROJECTS

LEARN OPENCV IN 3 HOURS USING PYTHON - INCLUDING EXAMPLE PROJECTS

Bu uygulamada Python ve Opencv kullanarak bilgisayar kamerasından yüz tespiti yapıyoruz.

opencv_yuz_bulma Bu uygulamada Python ve Opencv kullanarak bilgisayar kamerasından yüz tespiti yapıyoruz. Bilgisarın kendi kamerasını kullanmak için;

Developed an AI-based system to control the mouse cursor using Python and OpenCV with the real-time camera.

Developed an AI-based system to control the mouse cursor using Python and OpenCV with the real-time camera. Fingertip location is mapped to RGB images to control the mouse cursor.

Introduction to Augmented Reality (AR) with Python 3 and OpenCV 4.2.
Introduction to Augmented Reality (AR) with Python 3 and OpenCV 4.2.

Introduction to Augmented Reality (AR) with Python 3 and OpenCV 4.2.

Image Detector and Convertor App created using python's Pillow, OpenCV, cvlib, numpy and streamlit packages.
Image Detector and Convertor App created using python's Pillow, OpenCV, cvlib, numpy and streamlit packages.

Image Detector and Convertor App created using python's Pillow, OpenCV, cvlib, numpy and streamlit packages.

Owner
František Horínek
František Horínek
Opencv-image-filters - A camera to capture videos in real time by placing filters using Python with the help of the Tkinter and OpenCV libraries

Opencv-image-filters - A camera to capture videos in real time by placing filters using Python with the help of the Tkinter and OpenCV libraries

Sergio Díaz Fernández 1 Jan 13, 2022
An interactive document scanner built in Python using OpenCV

The scanner takes a poorly scanned image, finds the corners of the document, applies the perspective transformation to get a top-down view of the document, sharpens the image, and applies an adaptive color threshold to clean up the image.

Kushal Shingote 1 Feb 12, 2022
Fast image augmentation library and easy to use wrapper around other libraries. Documentation: https://albumentations.ai/docs/ Paper about library: https://www.mdpi.com/2078-2489/11/2/125

Albumentations Albumentations is a Python library for image augmentation. Image augmentation is used in deep learning and computer vision tasks to inc

null 11.4k Jan 2, 2023
An advanced 2D image manipulation with features such as edge detection and image segmentation built using OpenCV

OpenCV-ToothPaint3-Advanced-Digital-Image-Editor This application named ‘Tooth Paint’ version TP_2020.3 (64-bit) or version 3 was developed within a w

JunHong 1 Nov 5, 2021
A document scanner application for laptops/desktops developed using python, Tkinter and OpenCV.

DcoumentScanner A document scanner application for laptops/desktops developed using python, Tkinter and OpenCV. Directly install the .exe file to inst

Harsh Vardhan Singh 1 Oct 29, 2021
Opencv face recognition desktop application

Opencv-Face-Recognition Opencv face recognition desktop application Program developed by Gustavo Wydler Azuaga - 2021-11-19 Screenshots of the program

Gus 1 Nov 19, 2021
Steve Tu 71 Dec 30, 2022
A simple document layout analysis using Python-OpenCV

Run the application: python main.py *Note: For first time running the application, create a folder named "output". The application is a simple documen

Roinand Aguila 109 Dec 12, 2022
A simple Security Camera created using Opencv in Python where images gets saved in realtime in your Dropbox account at every 5 seconds

Security Camera using Opencv & Dropbox This is a simple Security Camera created using Opencv in Python where images gets saved in realtime in your Dro

Arpit Rath 1 Jan 31, 2022
Basic functions manipulating images using the OpenCV library

OpenCV Basic functions manipulating images using the OpenCV library. Reading Ima

Shatha Siala 3 Feb 17, 2022