资源简介
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
相关资源
- opencv3.3 自编译需要的xfeatures2d
- OpenCVdemo6by浅墨.rar
- 视频前景提取基于opencv的运动物体检
- 光流法运动跟踪
- KCF视频目标跟踪OPENCV+VS+WIN
- cv100.dll、cxcore100.dll、cxts001.dll、high
- OpenNI、OpenCV安装与开发环境配置
- opencv特征提取 颜色直方图、纹理
- 基于opencv的图像检索系统
- 基本opencv的粒子滤波目标跟踪
- OpenCV上目标跟踪和行人跟踪需要的视
- OpenCV图像视频采集 DirectShow 64位32位库
-
opencvHaar特征进行的分类器-所有xm
- 视觉词袋训练
- vgg_generated_48,vgg_generated_64,vgg_gene
-
opencv的xm
l文件 - openCV 车牌分割
- 基于OpenCV的模拟仪表指针读数识别系
- 指纹提取与识别系统VC源码opencv
-
Measuring size of ob
jects in an image with - opencv实现两幅图像的极线约束匹配
- Criminisi算法OpenCV程序
- Kinect2.0+Opencv人体骨骼捕捉及绘制Vis
- OPENCV实现相机标定程序
- opencv 实现 meanshift 的目标跟踪
- opencv 的knn的训练数据
- 单高斯背景建模opencv
- opencv高斯滤波模板及其滤波
- 基于OpenCV实现Retinex
- 虹膜识别VC2008+opencv2.3.1源码,改编自
评论
共有 条评论