# SIHR: a MATLAB/GNU Octave toolbox for single image highlight removal
[![DOI](https://joss.theoj.org/papers/10.21105/joss.01822/status.svg)](https://doi.org/10.21105/joss.01822)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3381328.svg)](https://doi.org/10.5281/zenodo.3381328)
[![license](https://img.shields.io/github/license/vitorsr/SIHR)](https://github.com/vitorsr/SIHR/blob/master/LICENSE)
## Citation
```BibTeX
@article{Ramos2020,
doi = {10.21105/joss.01822},
url = {https://doi.org/10.21105/joss.01822},
year = {2020},
month = jan,
publisher = {The Open Journal},
volume = {5},
number = {45},
pages = {1822},
author = {V{\'{\i}}tor Ramos},
title = {{SIHR}: a {MATLAB}/{GNU} {Octave} toolbox for single image highlight removal},
journal = {Journal of Open Source Software}
}
```
## Summary
An ongoing effort of developing new and implementing established single image highlight removal (SIHR) methods on MATLAB/GNU Octave.
Highlight, specularity, or specular reflection removal (see <sup>1</sup> for a proper Web of Science expression, see [1] for a reference work entry, see [2], [3] for survey on this problem) concerns the following decomposition.
[![Dichromatic Reflection Model](paper/figures/drm.jpg)](https://link.springer.com/referenceworkentry/10.1007%2F978-0-387-31439-6_532)
I welcome and encourage contributions to this project upon review. Please check [`CONTRIBUTING.md`](CONTRIBUTING.md) for more details.
*Disclaimer 1: this repository is intended for research purposes only.*
*Disclaimer 2: ~~some~~ most of these methods are based on chromaticity analysis, they fail **miserably** for grayscale images.*
<sup>1</sup> `((remov* NEAR/1 (highlight* OR specular*)) OR (separat* NEAR/1 (reflect* OR specular*)))`
### *Raison d'être*
I started out this repository by implementing, translating and collecting code snippets from the *rare* available<sup>2,3,4,5</sup> codes. Oftentimes papers are cryptical, codes are in C/C++ (requires compilation and major source code modification for general testing), or are just unavailable. See, e.g. this CSDN post<sup>6</sup> that has no valid links at all.
In this context, this repository aims to be a continous algorithmic aid for ongoing research and development of SIHR methods.
<sup>2</sup> Tan and Ikeuchi. [Online]. Available: <http://tanrobby.github.io/code/highlight.zip>
<sup>3</sup> Shen *et al.* [Online]. Available: <http://ivlab.org/publications/PR2008_code.zip>
<sup>4</sup> ~~Yang *et al.* [Online]. Available: <http://www6.cityu.edu.hk/stfprofile/qiyang.htm>~~
<sup>5</sup> Shen and Zheng. [Online]. Available: <http://ivlab.org/publications/AO2013_code.zip>
<sup>6</sup> ~~https://blog.csdn.net/nvidiacuda/article/details/8078167~~
## Usage (API)
Calling this toolbox's functions is **very** straightforward:
```MATLAB
I_d = AuthorYEAR(I); % I is a double-valued input image of dimension
% m×n×3 containing linear RGB values and
% I_d is the calculated diffuse reflection
% using AuthorYEAR method.
% The specular component is simply
% I_s = I - I_d;
```
### Methods
The following methods are available.
|Year| Method | Function |
|:--:|----------------------------|----------------|
|2005| Tan and Ikeuchi [4] | `Tan2005` |
|2006| Yoon *et al.* [5] | `Yoon2006` |
|2008| Shen *et al.* [6] | `Shen2008` |
|2009| Shen and Cai [7] | `Shen2009` |
|2010| Yang *et al.* [8] | `Yang2010` |
|2013| Shen and Zheng [9] | `Shen2013` |
|2016| Akashi and Okatani [10] | `Akashi2016` |
The following improvement is available.
|Year| Method | Function |
|:--:|----------------------------|----------------|
|2019| Yamamoto and Nakazawa [11] | `Yamamoto2019` |
### Environment
The environment this repository is being developed is:
* [MATLAB](https://www.mathworks.com/products/matlab.html)
* [Image Processing Toolbox](https://www.mathworks.com/products/image.html)
* [GNU Octave](https://www.gnu.org/software/octave/)
* [Image package](https://octave.sourceforge.io/image/index.html)
* `pkg install -forge image`
#### Tested environments
Octave 4.2 Ubuntu 18.04
Octave 5.1 (latest) Windows 10 1903
MATLAB 9.1 (R2016b) Windows 10 1903
MATLAB 9.6 (R2019a) Windows 10 1903 Ubuntu 16.04 (MATLAB Online)
### Installation
1. `git clone https://github.com/vitorsr/SIHR.git` or [download](https://github.com/vitorsr/SIHR/archive/master.zip) a copy of the repository.
1. Start Octave or MATLAB.
1. `cd('path/to/SIHR')`, i.e. change current folder to `SIHR` root (where `SIHR.m` is located).
1. `run SIHR.m` for session path setup.
1. `help SIHR` or `doc SIHR` provides a summary of the methods available.
#### Additional Debian/Ubuntu installation
To install the [`image`](https://octave.sourceforge.io/image/index.html) package from Octave Forge, `build-essential` and `liboctave-dev` need to be present. Install them via `apt`, then proceed with package installation.
```bash
sudo apt-get install -qq -y build-essential liboctave-dev
octave --eval "pkg install -forge image"
```
## Performance
This section aims to clarify how well (or not) the methods reproduced in this project were at reproducing results in literature.
Note: Akashi and Okatani's [10] method has highly fluctuating results because of random initialization.
### Dataset
In technical literature, there exist two ground truth datasets commonly used right now. One by Shen and Zheng [9] which is distributed alongside their code, and one by Grosse *et al.* [12] in a dedicated page<sup>7</sup>.
Other test images are included alongside the code for Shen *et al.* [6] and Yang *et al.* [8].
Follow the instructions in [`images`](https://github.com/vitorsr/SIHR/tree/master/images) in order to download a local copy of these images from the respective authors' pages.
<sup>7</sup> Grosse *et al.* [Online]. Available: <http://www.cs.toronto.edu/~rgrosse/intrinsic/>
### Quality
Quantitative results reported are usually regarding the quality of the recovered diffuse component with respect to the ground truth available in the Shen and Zheng [9] test image set.
#### Automated testing
Reproduced results below are available in the [`utils/automated_testing.m`](https://github.com/vitorsr/SIHR/blob/master/utils/automated_testing.m) script.
Note: `ssim` is not available in Octave Forge `image`.
#### Highest (self and peer-reported | reproduced) PSNR results (in dB)
|Year| Method | *animals* | *cups* | *fruit* | *masks* | Reproduced | *animals* | *cups* | *fruit* | *masks* |
|:--:|--------------------|:---------:|:---------:|:---------:|:---------:|--------------|:---------:|:------:|:-------:|:-------:|
|2005| Tan and Ikeuchi | 30.2 | 30.1 | 29.6 | 25.6 | `Tan2005` | 30.4 | 31.6 | 30.4 | 25.8 |
|2006| Yoon *et al.* | - | - | - | - | `Yoon2006` | 32.9 | 33.3 | 36.6 | 34.1 |
|2008| Shen *et al.* | 34.6 | 37.7 | 37.6 | 31.7 | `Shen2008` | 34.2 | 37.5 | 38.0 | 32.1 |
|2009| Shen and Cai | 34.8 | 37.6 | 36.9 | 34.0 | `Shen2009` | 34.9 | 37.6 | 36.7 | 34.0 |
|2010| Yang *et al.* | *37.2* | 38.0 | 37.6 | 32.2 | `Yang2010` | 36.5 | 37.5 | 36.2 | 33.5 |
|2013| Shen and Zheng | **37.3** | **39.3** | *38.9* | 34.1 | `Shen2013` | 37.5 | 38.3 | 38.2 | 32.7 |
|2015| Liu *et al.* | 33.4 | 37.6 | 35.1 | **34.5** | -
没有合适的资源?快使用搜索试试~ 我知道了~
图片灰度化处理代码matlab-SIHR:MATLAB/GNUOctave中快速/无数据辅助的单个图像高光去除方法
共30个文件
m:22个
md:4个
bib:1个
需积分: 48 9 下载量 52 浏览量
2021-05-21
08:41:24
上传
评论 1
收藏 294KB ZIP 举报
温馨提示
图片灰色化处理代码matlab SIHR:用于去除单个图像高光的MATLAB / GNU Octave工具箱 引文 @article { Ramos2020 , doi = { 10.21105/joss.01822 } , url = { https://doi.org/10.21105/joss.01822 } , year = { 2020 } , month = jan, publisher = { The Open Journal } , volume = { 5 } , number = { 45 } , pages = { 1822 } , author = { V{\'{\i}}tor Ramos } , title = { {SIHR}: a {MATLAB}/{GNU} {Octave} toolbox for single image highlight removal } , journal = { Journal of Open Source Software } } 概括 在MATLAB / GNU Octave上开发新的和实施已建立的单图像高光去除(SIH
资源详情
资源评论
资源推荐
收起资源包目录
SIHR-master.zip (30个子文件)
SIHR-master
paper
paper.bib 5KB
figures
drm.jpg 78KB
example.png 184KB
example.m 578B
paper.md 4KB
utils
bilateralFilter.m 8KB
automated_testing.m 1KB
my_normc.m 140B
my_clip.m 64B
images
README.md 1KB
CONTRIBUTING.md 7KB
SIHR.m 3KB
Yoon2006
Yoon2006.m 3KB
Shen2013
Shen2013.m 5KB
LICENSE 1KB
Yang2010
Yang2010.m 2KB
README.md 14KB
Shen2008
Shen2008.m 6KB
Akashi2016
Akashi2016.m 2KB
Shen2009
Shen2009.m 2KB
Tan2005
zResetLabels.m 75B
zHighlightRemoval.m 359B
zRemoveHighlights.m 468B
zSpecular2Diffuse.m 326B
zSpecularFreeImage.m 410B
zInit.m 1KB
Tan2005.m 1KB
z.m 2KB
zIteration.m 3KB
Yamamoto2019
Yamamoto2019.m 4KB
共 30 条
- 1
weixin_38557838
- 粉丝: 2
- 资源: 898
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0