第一:下软件MATLAB,和插件SHINEtoolbox。安装路径最好不要有中文。

将插件复制到文件夹下见图片

注意:不用学习matlab的具体应用,会使用插件就行了,插件是已经做好的编程,仅需把插件的参数修改即可。

第二,加载插件,

进入matlab主页,点击设置路径。将路径设置为SHINE文件夹。设置路径后,记得点保存,才算加载成功。

在你在matlab命令窗口输入SHINE,当出现“SHINE options [1=default, 2=custom]: “

就说明调用成功(当然安装就成功了)。如果报错就不对。

第三,插件信息的修改。插件有很多函数,但是仅需要修改SHINE.m,需要你打开SHINE.m(双击即可)去手动设置。

具体修改的地方有

1.改为你处理的图片类型。如“png”

2.修改你要到处理图片的位置。

3.选用WholeIm=3时,要需要保证SHINE-INPUT和SHINE-TEMPLATE图片数量、格式、大小一致,否则报错。将处理的图片分别复制到两个文件夹下即可。

具体处理过程和参数设置

第四,处理图片

处理步骤:进入Matlab,加载“SHINEtoolbox”插件对图片的亮度、对比度和尺寸进行统一标准化批处理。

关键操作:输入SHINE→按Enter→输入1→按Enter。

图片处理成功会显示,图片会保存到SHINE-OUTPUT

附上图片库的处理参数设置:

【统一标准化批处理】

使用中国人面孔表情图片系统(罗跃嘉)的男正2.bmp图片作为模板(中国人面孔表情图片系统\bmp格式\正性\male\2.bmp)。

处理步骤:进入Matlab,加载“SHINEtoolbox”插件对图片的亮度、对比度和尺寸进行统一标准化批处理。

关键操作:输入SHINE→按Enter→输入1→按Enter。

>> SHINE

SHINE options [1=default, 2=custom]: 1

Number of images: 689

Option: Mean luminance matching separately for the foregrounds and backgrounds (background = all regions of lum 34)

Progress: lumMatch successful

RMSE: 2.327847e+01

SSIM: 8.104382e-01

默认模式(default)关键参数:图像背景分割(wholeIm = 3)+亮度匹配(mode = 1),程序代码如下:

% If desired, the default values can be changed here:

it = 1; % number of iterations (default = 1)

wholeIm = 3; % 1 = whole image (default)

% 2 = figure-ground separated (input images as templates)

% 3 = figure-ground separated (based on templates: 中国人面孔表情图片系统\bmp格式\正性\male\2.bmp)

mode = 1; % 1 = lumMatch only (no SSIM optimization)(原版婴儿图库的处理)

% 2 = histMatch only(整体过亮)

% 3 = sfMatch only (比7稍微暗)

% 4 = specMatch only (有雾气)

% 5 = histMatch & sfMatch (比7局部过亮)

% 6 = histMatch & specMatch (有雾气+雪花)

% 7 = sfMatch & histMatch (整体较暗)

% 8 = specMatch & histMatch (default)(有雾气+雪花)

background = 300; % background lum of template, or 300=automatic (default)

% (automatically, the luminance that occurs most

% frequently in the image is used as background lum);

% basically, all regions of that lum are treated as

% background

rescaling = 1; % 0 = no rescaling

% 1 = rescale absolute values (default)

% 2 = rescale average values

optim = 1; % 0 = no SSIM optimization

% 1 = SSIM optimization (Avanaki, 2009; to change the

% number if iterations (default = 10) and adjust step

% size (default = 67), see histMatch.m)

【背景处理】

完成统一标准化批处理后,先将图片位深度调为24,然后在画图工具中对非面孔区域的背景进行黑色(RGB:0, 0, 0)填充,最后使用SHINEtoolbox对每张图片逐张标准化处理。

处理步骤:进入Matlab,加载“SHINEtoolbox”插件逐张对图片的亮度、对比度和尺寸进行标准化处理。

关键操作:输入SHINE→按Enter→输入1→按Enter。

>> SHINE

SHINE options [1=default, 2=custom]: 1

Number of images: 1

Option: Mean luminance matching on the whole images

Progress: lumMatch successful

RMSE: 0

SSIM: 1

默认模式(default)关键参数:图像背景分割(wholeIm = 1)+亮度匹配(mode = 1),程序代码如下:

% If desired, the default values can be changed here:

it = 1; % number of iterations (default = 1)

wholeIm = 1; % 1 = whole image (default)

% 2 = figure-ground separated (input images as templates)

% 3 = figure-ground separated (based on templates)

mode = 1; % 1 = lumMatch only (no SSIM optimization)

% 2 = histMatch only

% 3 = sfMatch only

% 4 = specMatch only

% 5 = histMatch & sfMatch

% 6 = histMatch & specMatch

% 7 = sfMatch & histMatch

% 8 = specMatch & histMatch (default)

background = 300; % background lum of template, or 300=automatic (default)

% (automatically, the luminance that occurs most

% frequently in the image is used as background lum);

% basically, all regions of that lum are treated as

% background

rescaling = 1; % 0 = no rescaling

% 1 = rescale absolute values (default)

% 2 = rescale average values

optim = 1; % 0 = no SSIM optimization

% 1 = SSIM optimization (Avanaki, 2009; to change the

% number if iterations (default = 10) and adjust step

% size (default = 67), see histMatch.m)

【统一标准化批处理】

使用中国人面孔表情图片系统(罗跃嘉)的男正2.bmp图片作为模板(中国人面孔表情图片系统\bmp格式\正性\male\2.bmp)。

处理步骤:进入Matlab,加载“SHINEtoolbox”插件对图片的亮度、对比度和尺寸进行统一标准化批处理。

关键操作:输入SHINE→按Enter→输入1→按Enter。

>> SHINE

SHINE options [1=default, 2=custom]: 1

Number of images: 689

Option: Mean luminance matching separately for the foregrounds and backgrounds (background = all regions of lum 34)

Progress: lumMatch successful

RMSE: 2.327847e+01

SSIM: 8.104382e-01

默认模式(default)关键参数:图像背景分割(wholeIm = 3)+亮度匹配(mode = 1),程序代码如下:

% If desired, the default values can be changed here:

it = 1; % number of iterations (default = 1)

wholeIm = 3; % 1 = whole image (default)

% 2 = figure-ground separated (input images as templates)

% 3 = figure-ground separated (based on templates: 中国人面孔表情图片系统\bmp格式\正性\male\2.bmp)

mode = 1; % 1 = lumMatch only (no SSIM optimization)(原版婴儿图库的处理)

% 2 = histMatch only(整体过亮)

% 3 = sfMatch only (比7稍微暗)

% 4 = specMatch only (有雾气)

% 5 = histMatch & sfMatch (比7局部过亮)

% 6 = histMatch & specMatch (有雾气+雪花)

% 7 = sfMatch & histMatch (整体较暗)

% 8 = specMatch & histMatch (default)(有雾气+雪花)

background = 300; % background lum of template, or 300=automatic (default)

% (automatically, the luminance that occurs most

% frequently in the image is used as background lum);

% basically, all regions of that lum are treated as

% background

rescaling = 1; % 0 = no rescaling

% 1 = rescale absolute values (default)

% 2 = rescale average values

optim = 1; % 0 = no SSIM optimization

% 1 = SSIM optimization (Avanaki, 2009; to change the

% number if iterations (default = 10) and adjust step

% size (default = 67), see histMatch.m)

【背景处理】

完成统一标准化批处理后,先将图片位深度调为24,然后在画图工具中对非面孔区域的背景进行黑色(RGB:0, 0, 0)填充,最后使用SHINEtoolbox对每张图片逐张标准化处理。

处理步骤:进入Matlab,加载“SHINEtoolbox”插件逐张对图片的亮度、对比度和尺寸进行标准化处理。

关键操作:输入SHINE→按Enter→输入1→按Enter。

>> SHINE

SHINE options [1=default, 2=custom]: 1

Number of images: 1

Option: Mean luminance matching on the whole images

Progress: lumMatch successful

RMSE: 0

SSIM: 1

默认模式(default)关键参数:图像背景分割(wholeIm = 1)+亮度匹配(mode = 1),程序代码如下:

% If desired, the default values can be changed here:

it = 1; % number of iterations (default = 1)

wholeIm = 1; % 1 = whole image (default)

% 2 = figure-ground separated (input images as templates)

% 3 = figure-ground separated (based on templates)

mode = 1; % 1 = lumMatch only (no SSIM optimization)

% 2 = histMatch only

% 3 = sfMatch only

% 4 = specMatch only

% 5 = histMatch & sfMatch

% 6 = histMatch & specMatch

% 7 = sfMatch & histMatch

% 8 = specMatch & histMatch (default)

background = 300; % background lum of template, or 300=automatic (default)

% (automatically, the luminance that occurs most

% frequently in the image is used as background lum);

% basically, all regions of that lum are treated as

% background

rescaling = 1; % 0 = no rescaling

% 1 = rescale absolute values (default)

% 2 = rescale average values

optim = 1; % 0 = no SSIM optimization

% 1 = SSIM optimization (Avanaki, 2009; to change the

% number if iterations (default = 10) and adjust step

% size (default = 67), see histMatch.m)

matlab修改图片位深度_如何利用matlab统一处理照片亮度对比度相关推荐

  1. matlab修改图片位深度_MATLAB 图像处理

    MATLAB 图像处理 基础 简介 图像类型 灰度图像 二值图像 RGB图像 索引图像 颜色图 colorcube 获取颜色图 colormap 更改颜色图 HSV彩色空间 rgb2hsv 将RGB颜 ...

  2. matlab修改图片位深度_Matlab 图像处理基本操作

    http://blog.sina.com.cn/s/blog_4a93ccea0100d1lw.html 一.图像基本操作 1.读取图像并显示: >> clear;close all    ...

  3. matlab修改图片位深度_BMP位图32位转为24位深度

    帮朋友做一个视频采集和基本处理功能,要求的是.bmp格式 几天下来,通过directshow进行视频采集,并抓去图片保存,按照要求进行业务处理,以前的处理程序是基于RGB24 而显示器是32位真彩色, ...

  4. matlab 度分秒转换成度_如何利用matlab统一处理照片亮度对比度

    第一:下软件MATLAB,和插件SHINEtoolbox.安装路径最好不要有中文. 将插件复制到文件夹下见图片 注意:不用学习matlab的具体应用,会使用插件就行了,插件是已经做好的编程,仅需把插件 ...

  5. 【图片位深度改变】24位深度转8位深度

    代码如下: """ 2020.09.26:alian 改变图片的位深度 """ from PIL import Image import n ...

  6. 如何利用matlab做BP神经网络分析(包括利用matlab神经网络工具箱)

    如何利用matlab做BP神经网络分析(包括利用matlab神经网络工具箱) 转载:https://blog.csdn.net/xgxyxs/article/details/53265318 最近一段 ...

  7. stem什么意思matlab,matlab中stem函数用法_常见问题解析,matlab

    matlab中如何自定义图例_常见问题解析 matlab中自定义图例的方法:首先打开matlab软件:然后点击勾选按钮,新建一个文件并输入代码为"x = 0:pi/50:2*pi;" ...

  8. 关于修改ico图片位深度的方法

    在vs08中载入待修改的图片,并打开,右键选择新建图片类型,然后选择自定义,定义自己需要的位深度的图片.再把以前的那个类型删掉就好了

  9. 32位java怎么改_java修改24位深度png图片为32位深度

    前言 在做图片切割时,发现切除来的图片空白部分变成了黑色背景,发现属性是24位深度 解决方案 1.先上代码 BufferedImage image = readImage(url); Buffered ...

最新文章

  1. [常见错误]-bash: pg_config: command not found
  2. 聚合函数的计算机控件,使用Kendo UI MVC Grid包装器的聚合函数
  3. 【面试练习题】使用“暴力”的方法将字符串时间转化为秒数
  4. Scala Akka网络编程:Client Server网络通信(你问我答)案例
  5. 内存管理1retain和release
  6. HDU 4607 Park Visit(树的直径)
  7. PS网页设计教程V——如何在Photoshop中创建一个商业网站布局
  8. Delphi Open Tools Api实例研究(一)
  9. Review JDBC
  10. 基于matlab的高等数学,基于matlab的高等数学实验详解.ppt
  11. 关联分析购物篮案例python_多角度看数据挖掘经典案例-购物篮分析
  12. 怎么安装64位JAVA,大师来详解
  13. 图解通信原理与案例分析-13:无线对讲机案例--频率调制实现语音点对点无线通信
  14. Android多媒体开发框架
  15. lisp编程 滑动轴承的auto_「autolisp」Autolisp:利用AuoCAD之Lisp编程案例之智能加工齿轮的演示程序 - seo实验室...
  16. 主成成分分析(Principal Component Analysis)
  17. Windows 11的Android虚拟机
  18. ospf及lsa总结
  19. c#后台如何导出excel到本地_C#实现导出Excel
  20. 解决驱动问题导致的浏览器频繁出现闪烁

热门文章

  1. Java,使用泛型构建自己的工具包——包装System.out
  2. SQL 行转列,列分行,行合并列(转)
  3. 联想y7000p怎么连接显示器_惠普暗影精灵6和联想拯救者y7000p 2020款如何选?这里详细对比...
  4. python手写数字识别实验报告_python实现识别手写数字 python图像识别算法
  5. 计算机丢失binkw32会怎么样,binkw32.dll 丢失 binkw32dll安装在哪
  6. python api加快交易速度_使用Python3的pipedriveapi将交易输出限制为1000个交易
  7. linux 解压 视频插件,linux下压缩解压缩命令
  8. 抓住眼球的美食海报模板|总有设计技法,吸引住你
  9. 电商C4D素材,玩转立体作品不是问题
  10. 计算机组装与维护报告论文,计算机组装与维护实习报告范文