Skip to content

Dear Internet Explorer user: Your browser is no longer supported

Please switch to a modern browser such as Microsoft Edge, Mozilla Firefox or Google Chrome to view this website's content.

Python logo

Blob analysis with OpenCV in Python

Posted 10th December 2021

No comments

Here’s my methodology for performing a blob analysis from binary images in OpenCV using Python code.

Read the full story...

Python logo

Fit an inscribing circle to a shape in OpenCV

Posted 30th October 2021

No comments

The largest possible circle that can be drawn interior to a plane figure is called an inscribing circle. This can easily be fitted to a binary shape in OpenCV.

Read the full story...

Skip cells when running Jupyter Notebook scripts

Posted 27th September 2021

1 comment

There is a surprisingly simple way to turn off specific cells in Jupyter Notebook without having to manually comment-out chunks of code.

Read the full story...

Python logo

Bounding rectangles in Python OpenCV

Posted 20th July 2021

No comments

There are two methods in OpenCV to derive a bounding rectangle and extract the relevant values of an object or series of objects in an image.

Read the full story...

Python logo

Managing RAW photos with Python

Posted 23rd April 2021

No comments

Use Python to recursively scan directories and remove unused and redundant CR2 files.

Read the full story...

Python logo

Convert RGB to CMYK in Python

Posted 26th March 2021

1 comment

Efficient Python code for taking a RGB image and converting it to CMYK before splitting the relevant channels out.

Read the full story...

Python logo

Structural Similarity Index (SSIM) in Python

Posted 19th February 2021

No comments

Quantitatively check the quality of a compressed image using a simple Python code for calculating the Structural Similarity Index (SSIM) and Mean Square Errors (MSE) between two images.

Read the full story...

Python logo

Peak Signal-to-Noise Ratio (PSNR) in Python

Posted 12th February 2021

No comments

Quantitatively check the quality of a compressed image using a simple Python code for calculating the Peak Signal-to-Noise Ratio (PSNR) between two images.

Read the full story...

Python logo

Reading EXIF data in Python

Posted 2nd February 2021

2 comments

In order to review the properties of various common-format image files, I wrote a command-prompt script in Python that will display EXIF data and other properties of JPG, PNG, TIF, CR2 and NEF files.

Read the full story...

Python logo

Query a PostgreSQL database via Python

Posted 11th December 2020

No comments

Use this simple template script created in Python to connect to your PostgreSQL database and run a query.

Read the full story...