HistConnect

版本 1.0.0.0 (2.4 KB) 作者: Dirk-Jan Kroon
Smooth histograms for sparse sampled signals and images, using low-frequency assumption.
746.0 次下载
更新时间 2011/2/21

查看许可证

This Function HistConnect will make a smooth histogram for a signal or image consisting of a few samples. The function assumes correlation between the samples, and implicitly generates new linear-interpolated samples between the originate samples. Thus makes the assumption of continuity between samples and low-frequency signal.

note : If your samples are spatial uncorrelated, use X=sort(X) before using this function

H=HistConnect(X,B,R)

X : A 1D vector or 2D matrix (image) with sample values
B : The number of histogram bins (default 256)
R : A vector [1 x 2], with the min and max histogram boundary,
(default R=getrangefromclass(X))

Example how it works,
- You want 3 bins
- Measured samples [0 0.3 0.7 1]
- Histogram edges [0 1/3] [1/3 2/3] [2/3 1];
A normal histogram function will return:
H= [2 0 2]

This histogram function makes histogram-blocks between two
values in the sample vector
sample value 0 connect with 0.3 : [1.33 0.00 0.00]
sample value 0.3 connect with 0.7 : [0.11 1.11 0.11]
sample value 0.7 connect with 1.0 : [0.00 0.00 1.33]
---------------------
H = [1.44 1.11 1.44]

引用格式

Dirk-Jan Kroon (2024). HistConnect (https://www.mathworks.com/matlabcentral/fileexchange/30480-histconnect), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2010b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0