资源简介
IQA是一个计算图像/视频质量的基于C语言的库。
里面包含了源代码。
代码片段和文件信息
/*
* Copyright (c) 2011 Tom Distler (http://tdistler.com)
* All rights reserved.
*
* The BSD License
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of the tdistler.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“
* AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR
* CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN
* CONTRACT STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include “convolve.h“
#include
float KBND_SYMMETRIC(const float *img int w int h int x int y float bnd_const)
{
if (x<0) x=-1-x;
else if (x>=w) x=(w-(x-w))-1;
if (y<0) y=-1-y;
else if (y>=h) y=(h-(y-h))-1;
return img[y*w + x];
}
float KBND_REPLICATE(const float *img int w int h int x int y float bnd_const)
{
if (x<0) x=0;
if (x>=w) x=w-1;
if (y<0) y=0;
if (y>=h) y=h-1;
return img[y*w + x];
}
float KBND_CONSTANT(const float *img int w int h int x int y float bnd_const)
{
if (x<0) x=0;
if (y<0) y=0;
if (x>=w || y>=h)
return bnd_const;
return img[y*w + x];
}
static float _calc_scale(const struct _kernel *k)
{
int iik_len;
double sum=0.0;
if (k->normalized)
return 1.0f;
else {
k_len = k->w * k->h;
for (ii=0; ii sum += k->kernel[ii];
if (sum != 0.0)
return (float)(1.0 / sum);
return 1.0f;
}
}
void _iqa_convolve(float *img int w int h const struct _kernel *k float *result int *rw int *rh)
{
int xykxkyuv;
int uc = k->w/2;
int vc = k->h/2;
int kw_even = (k->w&1)?0:1;
int kh_even = (k->h&1)?0:1;
int dst_w = w - k->w + 1;
int dst_h = h - k->h + 1;
i
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-07-06 11:48 iqa_1.1.2\build\
文件 998 2011-07-05 14:42 iqa_1.1.2\CHANGELOG.txt
目录 0 2011-07-06 11:48 iqa_1.1.2\doc\
文件 6080 2011-07-05 14:42 iqa_1.1.2\doc\algorithms.h
文件 2758 2011-07-05 14:42 iqa_1.1.2\doc\build.h
文件 478 2011-07-05 14:42 iqa_1.1.2\doc\footer.html
文件 3354 2011-07-05 14:42 iqa_1.1.2\doc\mainpage.h
文件 3298 2011-07-05 14:42 iqa_1.1.2\doc\sample_code.h
文件 74605 2011-07-05 14:42 iqa_1.1.2\Doxyfile
目录 0 2011-07-06 11:48 iqa_1.1.2\include\
文件 5238 2011-07-05 14:42 iqa_1.1.2\include\convolve.h
文件 2448 2011-07-05 14:42 iqa_1.1.2\include\decimate.h
文件 6175 2011-07-05 14:42 iqa_1.1.2\include\iqa.h
文件 2486 2011-07-05 14:42 iqa_1.1.2\include\iqa_os.h
文件 2409 2011-07-05 14:42 iqa_1.1.2\include\math_utils.h
文件 5966 2011-07-05 14:42 iqa_1.1.2\include\ssim.h
文件 2130 2011-07-05 14:42 iqa_1.1.2\iqa.sln
文件 7651 2011-07-05 14:42 iqa_1.1.2\iqa.vcproj
文件 607 2011-07-05 14:42 iqa_1.1.2\Makefile
文件 1231 2011-07-05 14:42 iqa_1.1.2\README.txt
目录 0 2011-07-06 11:48 iqa_1.1.2\resources\
文件 42236 2011-07-05 14:42 iqa_1.1.2\resources\iqa_logo.bmp
文件 4810 2011-07-05 14:42 iqa_1.1.2\resources\iqa_logo.jpg
文件 8980 2011-07-05 14:42 iqa_1.1.2\resources\mse_eq.jpg
文件 11380 2011-07-05 14:42 iqa_1.1.2\resources\psnr_eq.jpg
目录 0 2011-07-06 11:48 iqa_1.1.2\source\
文件 5813 2011-07-05 14:42 iqa_1.1.2\source\convolve.c
文件 2281 2011-07-05 14:42 iqa_1.1.2\source\decimate.c
文件 2686 2011-07-05 14:42 iqa_1.1.2\source\math_utils.c
文件 9540 2011-07-05 14:42 iqa_1.1.2\source\ms_ssim.c
文件 2135 2011-07-05 14:42 iqa_1.1.2\source\mse.c
............此处省略45个文件信息
- 上一篇:Socket文件传输
- 下一篇:MPEG2-TS格式分析工具 1.1 源代码
相关资源
- MPEG2-TS格式分析工具 1.1 源代码
- c++FTP上传程序源代码
- 运动控制卡API接口函数编程源代码
- C语言源代码精华集(大全)
- C++木马(源代码)
- C++ 推箱子 源代码
- 计算机图形学源代码
- mpeg4视频解码源码
- C++实验指导书以及个人源代码
- 职工信息管理系统 c++项目源代码
- vc文件捆绑器源代码
- 基于MFC对话框扫雷程序
- 数字图像处理 DIB的读取与显示VC源代
- UG开发源代码
- VC++防火墙源代码
- c++builder6.0开发的信息管理系统
- 数字签名 /C++/源代码
- 酒店管理系统源代码C++
- 基于OpenCV的步态能量图源代码GEI Gai
- VC++6.0小游戏--扫雷源代码
- C++考勤管理系统源代码
- 飞机飞行源代码VC6.0
- 数据库课程设计(教室管理信息系统
- 《无线通信系统仿真-c++使用模型》源
- 《C++ GUI Qt 4编程》第二版源代码
- c++课程设计模拟计算器含源代码、文
- Qt5.11.1+VS2017 X64 C++动态编译 串口通讯
- C++ BOOST::Asio库网络编程源代码
- c++ VS2013 mysql 源代码
- C/C++标准库源代码
评论
共有 条评论