Skip to main content

LBBNorm Project

Coming Soon...

Welcome to LBBNorm Project - your go-to solution from the Laboratory of Systems Biology and Bioinformatics (LBB).

How to use

Here is an implementation guide in Markdown format for using the LBBNorm library for image normalization in Python, focusing on the Reinhard method. This guide also mentions other available methods within the library.


Image Normalization Using LBBNorm in Python

This guide provides instructions on how to use the LBBNorm library for image normalization in Python, specifically utilizing the Reinhard normalization method. The LBBNorm library includes several normalization methods, including Reinhard, Macenko, Vahadane, AdaptiveColorDeconvolution, and ModifiedReinhard. This guide will focus on the Reinhard method.

Prerequisites

Ensure you have Python installed on your system and the necessary libraries, including LBBNorm and PIL for image processing. If you haven't installed these libraries yet, you can do so using pip:

pip install LBBNorm Pillow Numpy

Using the Reinhard Normalization Method

The following steps will guide you through the process of normalizing an image using the Reinhard method from the LBBNorm library.

Step 1: Import Required Libraries

First, import the necessary libraries in your Python script.

from LBBNorm import Reinhard
from PIL import Image
import numpy as np

Step 2: Initialize the Normalizer

Create an instance of the Reinhard normalizer.

normalizer = Reinhard()

Step 3: Fit the Normalizer to the Target Image

The fit method adjusts the normalizer based on a target image, which is the reference for normalization. Replace target with your target image array.

# Assuming 'target' is a NumPy array representing the target image
normalizer.fit(target)

Step 4: Normalize a Sample Image

Use the transform method to normalize a sample image, replacing sample with your sample image array.

# Assuming 'sample' is a NumPy array representing the sample image to normalize
normalized_image = normalizer.transform(sample)

Step 5: Save the Normalized Image

Finally, save the normalized image using the PIL library.

Image.fromarray(normalized_image).save('/content/normalized.png')

Other Normalization Methods

The LBBNorm library also offers other normalization methods, which can be used similarly by replacing Reinhard with any of the following:

  • Macenko
  • Vahadane
  • AdaptiveColorDeconvolution
  • ModifiedReinhard

For each method, you will initialize the normalizer accordingly, for example:

from LBBNorm import Macenko
normalizer = Macenko()

And then follow the same steps to fit the normalizer to your target image, transform your sample image, and save the normalized result.

Conclusion

This guide has introduced how to perform image normalization using the Reinhard method from the LBBNorm library in Python. By following the steps outlined, you can easily normalize images for your projects. Remember to explore other normalization methods available in the library to find the one that best suits your needs.

Sneak Peek

We're working behind the scenes to craft an exceptional product from LBB that addresses complex bioinformatics challenges. Stay tuned for updates and teasers on what we're creating!

Features to Anticipate

  • Efficient Data Normalization: Tailored algorithms for high-throughput data processing.
  • User-Friendly Interface: Designed with the end-user in mind, ensuring a seamless experience.
  • Advanced Analytical Tools: Cutting-edge tools for insightful data analysis.
  • ... and many more!

Get Notified!

Want to be the first to know when we go live? Drop us your email at amasoudin@ut.ac.ir, and we'll make sure you're in the loop.

Contribute

Eager to contribute or have ideas? We'd love to hear from you! Here's how you can help:

  • Star this repo: Starring helps to get more visibility and shows your support.
  • Share your ideas: Open an issue with your suggestions and feature requests.
  • Spread the word: Tell your friends and colleagues about us.

Stay Connected

Follow us for the latest buzz and updates. Don't miss out on any announcements!

Contact Us

Have questions? Reach out to us at amasoudin@ut.ac.ir, or drop us a message on our social platforms.

License

This project is in the process of being licensed - details will be shared soon.


We can't wait to show you what we're building at the Laboratory of Systems Biology and Bioinformatics (LBB). Stay tuned!


Release files for LBBNorm 1.6.0

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

Source distribution (sdist)

Source distribution for LBBNorm 1.6.0
File Size Uploaded
lbbnorm-1.6.0.tar.gz 92.6 kB Details

Built distribution (wheel)

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

Total release size: 217.7 kB

Release files / lbbnorm-1.6.0.tar.gz

Download URL lbbnorm-1.6.0.tar.gz
Size 92.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9018691caf91f1ac20301ab6666c97bc7836ad2b61b74f16858453516333c310
BLAKE2b-256 checksum
How to use checksums
26d8e4bc93ca68aea52f38156fec1df0682571df8d9ed302b26991a6ed0c80b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / LBBNorm-1.6.0-py3-none-any.whl

Download URL LBBNorm-1.6.0-py3-none-any.whl
Size 125.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d9b3d03004e541ed46db6aa2bd6aafeb94c1fb43a19cd20311b5b7293fe7a4f
BLAKE2b-256 checksum
How to use checksums
77b62ec7a322d87c8374e0534f4b11894c1dc98e9613706ecb53e951e2947c83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 release files

1.5.0

1 release file

1.4.0

2 release files

1.3.0

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

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