资源简介
Retine算法,博客配套代码,详细算法及其效果请移步http://blog.csdn.net/bluecol/article/details/45675615
代码片段和文件信息
/*
* MSRCR:带彩色恢复的多尺度Retinex图像增强
* (Multi-Scale Retinex with Color Restoration)
* 改写自:2003 Fabien Pelisson 的
* GRetinex GIMP plug-in
*
* Copyright (C) 2009 MAO Y.B
* 2009. 3. 3
* Visual Information Processing (VIP) Group NJUST
*
* 算法细节请参考下面论文:
* D. J. Jobson Z. Rahman and G. A. Woodell. A multi-scale
* Retinex for bridging the gap between color images and the
* human observation of scenes. IEEE Transactions on Image Processing
* 1997 6(7): 965-976
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not write to the Free Software
* Foundation Inc. 675 Mass Ave Cambridge MA 02139 USA.
*
*/
# include
# include
# include
# include
# include
# include
# include
#ifdef _DEBUG
#pragma comment(lib“opencv_imgproc246d.lib“)
#pragma comment(lib“opencv_highgui246d.lib“)
#pragma comment(lib“opencv_core246d.lib“)
#else
#pragma comment(lib“opencv_imgproc246.lib“)
#pragma comment(lib“opencv_highgui246.lib“)
#pragma comment(lib“opencv_core246.lib“)
#endif
# define MAX_RETINEX_SCALES 8 /* Retinex最多可采用的尺度的数目 */
# define MIN_GAUSSIAN_SCALE 16 /* 最小Gaussian尺度 */
# define MAX_GAUSSIAN_SCALE 250 /* 最大Gaussian尺度 */
typedef struct
{
int scale; /* 最大Retinex尺度 */
int nscales; /* 尺度个数 */
int scales_mode; /* Retinex尺度计算模式,有3种:UNIFORM LOW HIGH */
float cvar; /* 用于调整色彩动态范围的方差的倍乘系数 */
} RetinexParams;
/* 3种Retinex尺度计算模式,均匀,低和高,它们决定RetinexScales中的尺度数据 */
# define RETINEX_UNIFORM 0
# define RETINEX_LOW 1
# define RETINEX_HIGH 2
/* 多尺度Retinex中需要的各个Retinex尺度保存在下面数组中 */
static float RetinexScales[MAX_RETINEX_SCALES];
typedef struct
{
int N;
float sigma;
double B;
double b[4];
} gauss3_coefs;
/*
* Private variables.
*/
static RetinexParams rvals =
{
240 /* Scale */
3 /* Scales */
RETINEX_UNIFORM /* Retinex processing mode */
1.2f /* A variant */
};
# define clip( val minv maxv ) (( val = (val < minv ? minv : val ) ) > maxv ? maxv : val )
/*
* calculate scale
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-05-14 15:34 Retinex\
文件 842370 2014-08-21 17:07 Retinex\13.jpg
目录 0 2015-05-14 15:32 Retinex\Debug\
文件 16459 2015-05-14 15:31 Retinex\msrcr.c
目录 0 2015-05-14 15:35 Retinex\Release\
文件 842370 2014-08-21 17:07 Retinex\Release\13.jpg
文件 11776 2015-05-14 15:31 Retinex\Release\Retinex.exe
文件 880 2015-05-10 10:16 Retinex\Retinex.sln
文件 15360 2015-05-14 15:34 Retinex\Retinex.suo
文件 4306 2015-05-10 10:51 Retinex\Retinex.vcxproj
文件 941 2015-05-10 10:40 Retinex\Retinex.vcxproj.filters
文件 143 2015-05-10 10:16 Retinex\Retinex.vcxproj.user
相关资源
- 基于OpenCV的数字识别468815
- 使用opencv去掉二值化图像中黑色面积
- opencv环境配置
- win10 64位下编译的opencv4.5.5库,opencv
- NVIDIAOpticalFlowSDK-79c6cee80a2df9a196f20afd6
- opencv_contrib-3.4.0.zip
- opencv2.4.9源码分析——SIFT
- 用两个摄像头实现,双目标定,双目
- opencv_traincascade训练分类器,手势识别
- opencv3.0交叉编译用parallel.cpp
- 基于opencv的图像识别识别图像中的色
- 基于openCV的识别特定颜色区域
- 基于OpenCV的分水岭算法实现
- QT+opencv+OCR 身份证号码,银行卡号识别
- opencv视频特定颜色区域识别
- 把RGB转换为HSV和HSI然后根据黄色和蓝
- opencv视觉测距
- 基于Qt和opencv的身份证号码识别系统
- opencv_ffmpeg249.dll
- SfM稀疏三维点云重建--完整工程文件
- 基于opencv的数人头程序源代码
- 利用OpenCV中的Stitcher类实现全景图像拼
- opencv实现的sift算法源码,包含了图像
- openCV 上的小波变换
- 基于OPENCV的车牌识别系统设计
- 617张国内车牌60-17bmp图片用于OpenCV正样
- hog特征提取,c版本代码
- 基于Qt5.8+OpenCV3.2的Basler多相机触发开
- 基于Opencv实现的图像纠偏
- ImageWatch2019.vsix
评论
共有 条评论