Skip to main content

AScheck

This script can easily load and perform calculations on a directory of images.

Functionality can be added to the core.ascheck.Image class. This can then be called from the ascheck script.

The script can find the biggest assumed object in an image by binarizing it in the object and the background. The contour of the object can then easily be found.

Currently, the script can compute the asymmetry index of the biggest assumed object in an image and it can compute the width of the object at a given set of intervals along its longest dimension.

The asymmetry of the object can be computed by flipping it along its longest axis. The difference in pixels between the minimum and the maximum symmetric outline defines the asymmetric pixels. Dividing this number by the total number of pixels in the object, gives the asymmetry index.

Installation

Using pip

ascheck is available on PyPI, install using

pip install ascheck --upgrade

After installing, simply open a terminal and type the following command

ascheck

Github

The package can be installed from Github by running the following commands in the preferred installation location:

git clone https://github.com/StijnDebackere/AScheck
cd AScheck
python3 setup.py install

After installing, simply open a terminal and type the following command

ascheck

Usage

After installing the package, you should be able to run it from anywhere within the terminal alt text

A dialog will open asking you for the folder that contains your images.

alt text

Choose the folder and the program will ask some questions: do you want to compute the asymmetry?

alt text

Optionally, diagnostic images can also be saved to check whether anything went wrong in the automatic object detection.

alt text

We also ask whether you want to compute the slices

alt text

and how many

alt text

again, with optional diagnostics.

Outputs

The asymmetry calculation creates a folder bw/ in the selected folder where it saves the black and white outlines and it will save the asymmetry indices in a file called ascheck_results.txt. This text file contains the image filename, its asymmetry index and a flag for the trustworthiness of the result.

As diagnostic, the following images are saved:

  • image_name_asym.ext: black and white image of the asymmetric pixels
  • image_name_contour.ext: grayscale image with the contour filled in red

alt text alt text

The object widths calculation creates a folder slices/ in the selected folder where it saves .csv files with the coordinates of each interval and the lower and upper intersections with the object outline. It also provides the coordinates in normalized form, where the widths are divided by the geometric mean of the widths of all intervals.

As diagnostic, the object and all the coordinates are saved in

  • image_name_slices.ext: grayscale image with contour filled in red, the central intervals indicated with crosses, and the intersections with dots.

alt text

Example

We start out with the image of a biface.

alt text

This image is then converted into a grayscale and the object is separated from the background. Now we have a black and white image of the biface for which we can find the contour.

alt text

The contour can then be flipped around the longest axis of the biface, which is assumed to be the axis of symmetry. By taking the difference between the minimum and maximum symmetric outlines, we find the number of asymmetric pixels.

alt text

Computing the intervals along the longest axis, the intersections with the contour can then be found.

alt text

Issues

The object detection in the script is automatic and it assumes that the foreground object is clearly marked against the background. Do not put the object on a background with similar colours, since the script will fail in that case. Diagnostic images should enable you to see whether everything went OK.

Metadata

Release files for ascheck 0.0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ascheck 0.0.3.2
File Size Uploaded Provenance
ascheck-0.0.3.2.tar.gz 11.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ascheck 0.0.3.2
File Interpreter ABI Platform
ascheck-0.0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 29.7 kB

Release files / ascheck-0.0.3.2.tar.gz

Download URL ascheck-0.0.3.2.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b79b53e77d4196b1011cc3ed1501ce3cc7badc563b225b96ec7ffa0a20da781e
BLAKE2b-256 checksum
How to use checksums
3ef52bfe02401d4cbd9f2af69c11a5954ceb1e8bf4963dff20c77cbb30831ef0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3

Release files / ascheck-0.0.3.2-py3-none-any.whl

Download URL ascheck-0.0.3.2-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c4ff65aab9233f119af80a1ac9a725aaa7cdb1eb758c5ee4fe87d9fa4bcc79f
BLAKE2b-256 checksum
How to use checksums
b511513eac058e42d5f69883c05aacb12f96337ae21637b1079a3c2970f73101
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3

Security for ascheck 0.0.3.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page