Metadata-Version: 2.4
Name: pySSHS
Version: 1.0.0.0
Summary: Scale-space histogram segmentation algorithm
Project-URL: Homepage, https://github.com/jegilles/pySSHS
Project-URL: Issues, https://github.com/jegilles/pySSHS/issues
Author-email: Jerome Gilles <jgilles@sdsu.edu>
License: MIT License
        
        Copyright (c) 2024 Jerome Gilles
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# pySSHS
 Python toolbox for the scale-space histogram segmentation

This toolbox implements the algorithm described in J.Gilles, K.Heal, "A parameterless scale-space approach to find meaningful modes in histograms - Application to image and spectrum segmentation". International Journal of Wavelets, Multiresolution and Information Processing, Vol.12, No.6, 1450044-1--1450044-17, December 2014

ArXiV: https://arxiv.org/abs/1401.2686

Note: this implementation uses sparse matrices for efficient memory storage of the scale-space plane, and uses a discrete Gaussian kernel based on Bessel functions to speed up the computation.

The main function is SSHS_GSS_BoundariesDetect(hist,type) where hist is a 1D array of the histogram to segment and type is method to be used to select the meaningful boundaries. This function calls two functions that can be used independently:
- SSHS_PlanGaussianScaleSpace which computes the scale-space representation of the given histogram
- SSHS_MeaningfulScaleSpace which extract the meaningful minima from a given scale-space representation

The resulting boundaries can be plotted on the histogram by using the function SSHS_PlotBoundaries

The file Test_1D.py performs the algorithm on a test histogram for the different methods.
The Jupyter notebook juSSHS.ipynb provides examples in 1D as well as for grayscale and color image segmentation.

Author: Jerome Gilles

Date: 12/13/2024
