Skip to main content

A module to help debugging visual workflows

Project description

Visual Debugger for Image Processing

The Visual Debugger module provides tools for visually debugging image processing workflows, allowing annotations like points, labels, rectangles, and more on images. It supports a variety of annotation types and includes functionality for merging multiple images into a composite image for comprehensive review.

Features

  • Multiple Annotation Types: Support for a variety of annotations such as points, labeled points, rectangles, circles, and orientation vectors based on pitch, yaw, and roll.
  • Image Concatenation: Capability to concatenate multiple debugged images into a single composite image, facilitating easier visualization of sequential image processing steps.
  • Dynamic Image Handling: Handles a wide range of image inputs including file paths, in-memory image arrays, base64 encoded images, and images from web links, integrating seamlessly with OpenCV.
  • Customizable Debugging: Debugging can be turned on or off, and the module supports generating merged debug images for a sequence of operations.
  • Orientation Drawing: Special functionality for visualizing orientation in 3D space, projecting pitch, yaw, and roll onto a 2D image plane. Automatic Naming: Automatically handles the naming of output images based on a customizable tag, the sequence number of the operation, and specific conditions of the debugging process. This ensures a clear and organized structure for saved images, making it easy to track and review the progress of image processing.

Installation

To use this module in your projects, install the pypi package by:

pip install visual_debugger

Usage

Here is a basic example of how to use the VisualDebugger class within your image processing workflow:

#import VisualDebugger and annotations
from visual_debugger import VisualDebugger, Annotation, AnnotationType
# (not necessary) import UniversalImageInputHandler to read the image file
from image_input_handler import  UniversalImageInputHandler

# Initialize the debugger
vd = VisualDebugger(tag="Example", debug_folder_path="./visualdebug",  active=True)

# Load your image  (this should be replaced with your actual image path or np.array image)
image_path = "path/to/your/image.jpg" 
uih = UniversalImageInputHandler(image_path, debug=False)
COMPATIBLE, img = uih.COMPATIBLE, uih.img

# Create annotations you want to show on the image
annotations = [
    Annotation(type=AnnotationType.RECTANGLE, coordinates=(10, 10, 50, 50)),
    Annotation(type=AnnotationType.POINT_AND_LABEL, coordinates=(100, 100), labels="Center Point")
]

# Process and debug the image.
# This will use "tag" and "process_step" variables to create a file name 
# And save the image into "debug_folder_path" 
vd.visual_debug(img, annotations=annotations, process_step="initial_check")

# Generate a merged image of all processed steps
vd.cook_merged_img()

Documentation

For more details on the methods and their parameters, please refer to the inline documentation within the module files.

Contributing

Contributions to enhance the functionality or improve the documentation are welcome. Please follow the standard GitHub pull request process to submit your contributions.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

visual_debugger-0.3.32.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

visual_debugger-0.3.32-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file visual_debugger-0.3.32.tar.gz.

File metadata

  • Download URL: visual_debugger-0.3.32.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for visual_debugger-0.3.32.tar.gz
Algorithm Hash digest
SHA256 3f943f9537000cc2239d90360ab71a3274fb0c363e0f852fb487eb399f8bc6fb
MD5 c8681d6bd37c6d21bb529fc493523fc6
BLAKE2b-256 fb2a338dab4fd0341921590b502b626ce095cc07d6d3f6d5813cdf8ef8d434e4

See more details on using hashes here.

File details

Details for the file visual_debugger-0.3.32-py3-none-any.whl.

File metadata

File hashes

Hashes for visual_debugger-0.3.32-py3-none-any.whl
Algorithm Hash digest
SHA256 5b553d9bde6dabb4dd558b34f11fc52bff3ccb9b126364653e8ad600885a26cf
MD5 27fd1f9c3d5f281e956411f242eff2d7
BLAKE2b-256 625a00b9e1f9cbb63e3f682b1c95663eafb0c013911a1de23a6fabac9064294a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page