matlab修改图片位深度_如何利用matlab统一处理照片亮度对比度
第一:下软件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统一处理照片亮度对比度相关推荐
- matlab修改图片位深度_MATLAB 图像处理
MATLAB 图像处理 基础 简介 图像类型 灰度图像 二值图像 RGB图像 索引图像 颜色图 colorcube 获取颜色图 colormap 更改颜色图 HSV彩色空间 rgb2hsv 将RGB颜 ...
- matlab修改图片位深度_Matlab 图像处理基本操作
http://blog.sina.com.cn/s/blog_4a93ccea0100d1lw.html 一.图像基本操作 1.读取图像并显示: >> clear;close all ...
- matlab修改图片位深度_BMP位图32位转为24位深度
帮朋友做一个视频采集和基本处理功能,要求的是.bmp格式 几天下来,通过directshow进行视频采集,并抓去图片保存,按照要求进行业务处理,以前的处理程序是基于RGB24 而显示器是32位真彩色, ...
- matlab 度分秒转换成度_如何利用matlab统一处理照片亮度对比度
第一:下软件MATLAB,和插件SHINEtoolbox.安装路径最好不要有中文. 将插件复制到文件夹下见图片 注意:不用学习matlab的具体应用,会使用插件就行了,插件是已经做好的编程,仅需把插件 ...
- 【图片位深度改变】24位深度转8位深度
代码如下: """ 2020.09.26:alian 改变图片的位深度 """ from PIL import Image import n ...
- 如何利用matlab做BP神经网络分析(包括利用matlab神经网络工具箱)
如何利用matlab做BP神经网络分析(包括利用matlab神经网络工具箱) 转载:https://blog.csdn.net/xgxyxs/article/details/53265318 最近一段 ...
- stem什么意思matlab,matlab中stem函数用法_常见问题解析,matlab
matlab中如何自定义图例_常见问题解析 matlab中自定义图例的方法:首先打开matlab软件:然后点击勾选按钮,新建一个文件并输入代码为"x = 0:pi/50:2*pi;" ...
- 关于修改ico图片位深度的方法
在vs08中载入待修改的图片,并打开,右键选择新建图片类型,然后选择自定义,定义自己需要的位深度的图片.再把以前的那个类型删掉就好了
- 32位java怎么改_java修改24位深度png图片为32位深度
前言 在做图片切割时,发现切除来的图片空白部分变成了黑色背景,发现属性是24位深度 解决方案 1.先上代码 BufferedImage image = readImage(url); Buffered ...
最新文章
- 显示intent的使用讲解
- 4测试命令_科普 | 最全的Filecoin测试网挖矿步骤解析
- nRF52832 — 连接指定name、UUID、addr的蓝牙设备
- Object类toString()和equals()方法剖析
- mysql 的命名管道_SQL Server中的命名管道(named pipe)及其使用
- python 调用dll中c或c++语言带指针,数组方法
- 教程-Delphi7 自带控件安装对应表
- makefile 编写
- matlab 神经识别取整数_Matlab取整
- php新手自学手册,PHP编程新手自学手册
- C51单片机实现流水灯的三种编程方法
- UE4 ACharacter部分方法介绍
- mac怎么更新python_mac上更新python的方法
- sed命令详解与示例
- win10电脑底下一排图标没了怎么办
- UE使用(UltraEdit)
- 前两天搞的东西 象棋棋谱字符转换
- 架构整洁之道-学习笔记
- 以太坊创世区块与链配置载入分析
- dpvs中fdir与sa_pool介绍
热门文章
- 17110 Divisible(basic)
- 四、CXF WebService中传递复杂类型对象
- Script - MapSubString()使用
- dmg镜像如何写入u盘_手把手教你制作Linux系统安装U盘,小白都能轻松上手
- 如何主动触发时间选择器弹窗_请合理使用Alert弹窗
- 中国风春节传统文化海报插画为载体的素材
- 字体设计灵感合集|字体决定了设计
- 设计素材psd分层模板|临摹搞定促销海报版式!
- java qq在线客服,Java获得腾讯QQ在线状态(.net webservice) | 学步园
- mysql 字符串截取_mysql数据库13种常用函数方法总结