SHINIER

Overview

  • README

User Guide

  • Documentation
    • ๐Ÿ“‹ Table of Contents
    • ๐ŸŽฏ Overview
      • Main Objectives
    • ๐Ÿ—๏ธ Package Architecture
      • Module Structure
      • Processing Flow
    • ๐Ÿ”ฌ MATLAB vs Python Differences
      • 1. Rounding Operators
        • MATLAB round()
        • Python numpy.round() - IEEE 754 Standard
        • SHINIER Solution - Compatibility vs Standards
      • 2. Integer Type Conversion
        • MATLAB uint8()
        • Python numpy.astype('uint8')
        • SHINIER Solution
      • 3. Standard Deviation Calculation
        • MATLAB std2()
        • Python numpy.std() - Statistical Best Practice
        • SHINIER Solution - Scientific Flexibility
      • 4. RGB to Grayscale Conversion
        • MATLAB rgb2gray() - Legacy Standard
        • SHINIER rgb2gray() - Modern Standards Support
    • โš™๏ธ Detailed Processing Modes
      • Mode 1: Luminance Matching Only
      • Mode 2: Histogram Matching Only
      • Mode 3: Spatial Frequency Matching Only
      • Mode 4: Spectrum Matching Only
      • Composite Modes (5-8)
        • Mode 5: Histogram + Spatial Frequency
        • Mode 6: Histogram + Spectrum
        • Mode 7: Spatial Frequency + Histogram
        • Mode 8: Spectrum + Histogram (Recommended)
      • Mode 9: Dithering Only
      • Border Artifacts and FFT Padding
    • ๐Ÿ›๏ธ Main Classes
      • Converter
      • GamutControl (Color gamut management)
      • Options
      • ImageDataset
      • ImageProcessor
    • Additional Resources
    • Visualization Functions
    • StimulusMasker
    • ๐Ÿงฎ Implemented Algorithms
      • 1. Exact Histogram Specification
      • 2. SSIM Optimization for Histogram
      • 3. Floyd-Steinberg Dithering
      • 4. Noisy Bit Dithering
    • ๐Ÿ’พ Memory Management and Performance
      • Memory Conservation Mode (conserve_memory=True)
    • ๐Ÿงช Testing and Validation
      • Unit Tests
      • MATLAB Validation
    • ๐Ÿ“š Usage Examples
    • ๐Ÿ”ง Troubleshooting and Optimization
      • Common Issues
  • Demos / How-to-use
    • Case 1 โ€“ Using the CLI
      • I. Calling the CLI
        • 1) Recommended: From terminal
        • 2) From Python (Not recommended)
      • II. CLI Use Cases
        • 1) Press Enter
        • 2) Press q
        • 3) Write custom input
      • III. CLI Profiles
    • Case 2 โ€“ Customizing Options
      • 1) Define the Options
      • Mode 1 โ€“ lum_match
      • Mode 2 โ€“ hist_match
      • Mode 3 โ€“ sf_match
      • Mode 4 โ€“ spec_match
      • Mode 5 โ€“ hist_match โ†’ sf_match
      • Mode 6 โ€“ hist_match โ†’ spec_match
      • Mode 7 โ€“ sf_match โ†’ hist_match
      • Mode 8 โ€“ spec_match โ†’ hist_match
      • Mode 9 โ€“ only dithering
      • Example 10 โ€“ Mode 2 + extra parameters
      • Example 11 โ€“ Preserve colors with constrain_image_chrominance
      • 2) Create the Dataset
        • (i) Recommended: from folders
        • (ii) Manual: from pre-loaded images (not recommended)
      • 3) Image Processing
        • Optional: display a processing overview
    • Thank you

Contributors Guide

  • Contributing to SHINIER
    • Table of Contents
    • Code of Conduct
    • Development Setup
    • Coding Standards
      • Git rules
      • To do before a PR
      • Language & typing
      • Docstrings
      • Read the Docs
      • Pydantic models
      • Exceptions
      • Unit-Tests and Validation Tests
        • ๐Ÿ›๏ธ Test README
  • Testing Guide
    • โš™๏ธ Pytest Configuration
    • ๐Ÿ“™ Markers
    • ๐Ÿงต Multi-Core Execution
    • โšก Validation Tests with Shards
      • Environment variables
    • ๐Ÿ› ๏ธ Running Shards in Parallel
    • ๐Ÿ”Ž Debugging Tests
      • Drop into debugger on failure
      • Step interactively inside test
      • Show full traceback
    • ๐Ÿ”„ Resume From a Given Combo
    • ๐Ÿค Replay a Dumped Failure
    • ๐Ÿ”น Tips
    • ๐Ÿ”ง Example Workflow

Project

  • Project Links
  • License

API Reference

  • API Reference
    • Core Classes
      • Options
      • ImageDataset
        • ImageDataset.close()
        • ImageDataset.initialize_dataset()
        • ImageDataset.post_init()
        • ImageDataset.print_log()
        • ImageDataset.save_images()
      • ImageProcessor
        • ImageProcessor.get_results()
        • ImageProcessor.hist_match()
        • ImageProcessor.lum_match()
        • ImageProcessor.process()
        • ImageProcessor.sf_match()
        • ImageProcessor.spec_match()
    • Color Processing
      • ColorConverter
        • ColorConverter.lab_to_sRGB()
        • ColorConverter.lab_to_xyz()
        • ColorConverter.linRGB_to_sRGB()
        • ColorConverter.linRGB_to_xyz()
        • ColorConverter.sRGB_to_lab()
        • ColorConverter.sRGB_to_linRGB()
        • ColorConverter.sRGB_to_xyY()
        • ColorConverter.sRGB_to_xyz()
        • ColorConverter.xyY_to_sRGB()
        • ColorConverter.xyY_to_xyz()
        • ColorConverter.xyz_to_lab()
        • ColorConverter.xyz_to_linRGB()
        • ColorConverter.xyz_to_sRGB()
        • ColorConverter.xyz_to_xyY()
      • ColorTreatment
        • ColorTreatment.backward_color_treatment()
        • ColorTreatment.forward_color_treatment()
      • GamutControl
        • GamutControl.apply_dataset()
        • GamutControl.apply_image()
        • GamutControl.apply_low_Y_desaturation()
        • GamutControl.get_max_luminance_map()
      • rgb2gray()
      • gray2rgb()
    • Utility Functions
      • Plotting
        • hist_plot()
        • imhist_plot()
        • imshow()
        • sf_plot()
        • spectrum_plot()
        • im_power_spectrum_plot()
        • show_processing_overview()
      • StimulusMasker
        • StimulusMasker
      • MatlabOperators
        • MatlabOperators
      • Functions
        • print_shinier_header()
        • get_field_values_from_pydantic_model()
        • generate_pydantic_key_value_dict()
        • sf_profile()
        • freq_axis()
        • get_radius_grid()
        • rotational_avg()
        • stretch()
        • convolve_1d()
        • convolve_2d()
        • has_duplicates()
        • n_unique()
        • strict_ordering()
        • exact_histogram()
        • apply_histogram_mapping()
        • floyd_steinberg_dithering()
        • error_diffusion_dither()
        • soft_clip()
        • noisy_bit_dithering()
        • uint_to_float01()
        • float01_to_uint()
        • pol2cart()
        • cart2pol()
        • separate()
        • image_spectrum()
        • gaussian_kernel()
        • center_surround_kernel()
        • laplacian_kernel()
        • tie_breaking_noise_level()
        • print_log()
        • strip_ansi()
        • colorize()
        • console_log()
        • beta_bounds_from_ssim()
        • ssim_sens()
        • hist_match_validation()
        • sf_match_validation()
        • spec_match_validation()
        • compute_rmse()
        • normalized_rmse()
        • get_images_spectra()
        • rescale_image()
        • load_images_from_folder()
        • load_np_array()
        • rescale_images255()
        • uint8_plus()
        • apply_median_blur()
        • hist2list()
        • im3D()
        • imhist()
        • rounded_target_hist()
        • compute_tvd_hist()
        • avg_hist()
    • CLI
      • SHINIER_CLI()
    • Others
      • Chroma Loss Metrics
        • ChromaMetrics
        • AggregateMetric
        • AggregateRow
        • ChromaInfoRetention
        • ChromaInfoLossResult
        • compute_chroma_metrics_for_image()
        • aggregate_chroma_metrics()
        • generate_chroma_loss_report()
        • chroma_info_loss_bits_per_pixel_vs_y1()
      • ImageListIO
        • ImageListIO
SHINIER
  • Search


© Copyright 2026, Nicolas Dupuis-Roy and Mathias Salvas-Hebert.

Built with Sphinx using a theme provided by Read the Docs.