# Sprite Sheet
## Project Description
A sprite is a small raster graphic (a bitmap) that represents an object such as a character, a vehicle, a projectile, etc.
Sprites are a popular way to create large, complex scenes as you can manipulate each sprite separately from the rest of the scene. This allows for greater control over how the scene is rendered, as well as over how the players can interact with the scene.
Sprites are mainly used in 2D video games, such as Shoot’em up in which the hero combats a large number of enemies by shooting at them while dodging their fire.
## Project Goal
Waypoint 1: Find the Most Common Color in an Image
Waypoint 2: Write a Class Sprite
Waypoint 3: Find Sprites in an Image
Waypoint 4: Draw Sprite Label Bounding Boxes
Waypoint 5: Write a Class SpriteSheet
Waypoint 6: Package and Distribute the Python Library
## Project Benefit
Three main features of this project, more useful in Computer Vision:
Find the Most Common Color in an Image
Find Sprites in an Image
Draw Sprite Label Bounding Boxes
It can split your image with many sprites and you can improve it to work in Computer Vision.
## Technology
Python (PIL, Numpy)
## Project Team
Nhung LAI
## Feature
### Find the Most Common Color in an Image
Returns the pixel color that is the most used in this image.
### Find Sprites in an Image
Returns a tuple (sprites, label_map) where:
sprites: A collection of key-value pairs (a dictionary) where each key-value pair maps the key (the label of a sprite) to its associated value (a Sprite object);
label_map: A 2D array of integers of equal dimension (width and height) as the original image where the sprites are packed in. The label_map array maps each pixel of the image passed to the function to the label of the sprite this pixel corresponds to, or 0 if this pixel doesn’t belong to a sprite (e.g., background color).
### Draw Sprite Label Bounding Boxes
Draws the masks of the sprites at the exact same position that the sprites were in the original image. Draws each sprite mask with a random uniform color (one color per sprite mask). Also draws a rectangle (bounding box) around each sprite mask, of the same color used for drawing the sprite mask.
## Usage
### Install packages: pillow (PIL), numpy, python 3.7.4
You have to install packages above:
`bash pip install pillow `
and
`bash pip install numpy `
### Install New Python 3.7.4
Go to this link and download new python version: https://www.python.org/downloads/
### Install my package
`bash pip install SpriteSheet_Bella `
## Contact (Author & Maintainer)
Name: Nhung LAI
Email: nhungbella0511@gmail.com
Metadata
Release files for SpriteSheet-Bella 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| SpriteSheet_Bella-1.0.1.tar.gz | 3.4 kB | Without provenance | Details for SpriteSheet_Bella-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| SpriteSheet_Bella-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for SpriteSheet_Bella-1.0.1-py3-none-any.whl |
Total release size: 7.3 kB
Release files / SpriteSheet_Bella-1.0.1.tar.gz
| Download URL | SpriteSheet_Bella-1.0.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6051f4927f147149b0b5263658bd6609689e63f0f31cfeedf5758ece36ccdb97
|
|
BLAKE2b-256 checksum How to use checksums |
d5c294929a9fa79e5e2f9c9f13b1a66e960dd53b3a41d3c596ed55ea379d07a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
|
Release files / SpriteSheet_Bella-1.0.1-py3-none-any.whl
| Download URL | SpriteSheet_Bella-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6e765a107e017f4aea440eb5c2df9a4bea4fae08a5501c786eaa66412ad81ed
|
|
BLAKE2b-256 checksum How to use checksums |
de2f790e40e2571bcf233c88510e2c3aa2f49dea59abe8f798d5c92c257f2079
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
|
Security for SpriteSheet-Bella 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.