Skip to main content

A package for computer science education containing modules for image processing and chart creation.

Project description

Computer Science Education - Image Processing Module and Visualization of Distributions

Image Description

Description

This project consists of two modules for computer science education:

  • Image Processing: A module for simple editing and analysis of images. It allows loading, saving, and displaying images, calculating color depths, and converting palette-based images to RGB.

  • Visualization of Distributions: A module for visualizing two distributions side by side as line or bar charts. Ideal for presenting statistical data in educational settings.

Modules

imageprocessing

This module provides functions for simple processing and analysis of images. The main functions are:

  • load_image(path_and_filename): Loads an image and calculates its color depth.
  • transform_palette_image_to_rgb(np_image_array, palette): Transforms a palette-based image into an RGB image.
  • pillow_image(numpy_array, palette=None): Converts a NumPy array into a Pillow image.
  • save_image(path, np_image_array, palette=None): Saves an image to a file.
  • show(image_data, show_axes=True, label_data=None, palette_data=None, show_grid=False, grid_color='black', number_of_ticks=None, number_of_columns=1, figsize=None): Displays images in a plot.
  • plot_histogram(histogram, palette='inferno'): Plots a histogram of the brightness values of an image.

diagrams

This module provides a simple way to visualize two distributions. The main function is:

  • show_distributions(distribution1, distribution2, title1="", title2="", mode="Lines"): Visualizes two distributions as line or bar charts.

Example Usage

Image Processing

from imageprocessing import load_image, show, save_image

# Load image and calculate color depth
image, color_mode, color_depth, palette = load_image('path/to/image.png')
print(f"Color depth: {color_depth} Bit")

# Display image
show(image)

# Save image
save_image('path/to/output_image.png', image, palette)

License

This project is licensed under the MIT License with additional terms for attribution. See the LICENSE file for details.

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

csedu-0.1.0.tar.gz (479.8 kB view details)

Uploaded Source

Built Distribution

csedu-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file csedu-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for csedu-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d65725c579c8f088dc84336576f4302750a9169111b654a2763b2a6098d5021f
MD5 c93f97fd4b64cdc862574733fa1bf924
BLAKE2b-256 b6465ec687ca0be4dd1d5ae668654292cd78c3676dc451b40a33e6551448f9df

See more details on using hashes here.

File details

Details for the file csedu-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: csedu-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for csedu-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5c64b541f9e446cca5ee5c06a8c956ae303826699daa5f22b9317de437055dc
MD5 8ce1e5b2bba03fca3eb12e6d93c4babc
BLAKE2b-256 5c6d94f19873cd88cc1cab88ee76be589f3f092683436c2175c8cb3b5ad2b49c

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