伽马校正:FPGA

参考资料:

Tone Mapping 与 Gamma Correction - 知乎 (zhihu.com)

Book_VIP: 《基于MATLAB与FPGA的图像处理教程》此书是业内第一本基于MATLAB与FPGA的图像处理教程,第一本真正结合理论及算法加速方案,在Matlab验证,以及在FPGA上加速实现的书籍,填补了行业的空缺,书中选择了几十个图像处理算法进行硬件加速,希望真正能够让从业者了解如何采用FPGA进行加速,如何掌握精髓,改变未来。 这里,借用Gitee,托管本书相关的图像算法代码及相关资料等,与您共享。icon-default.png?t=N7T8https://gitee.com/crazybingo/Book_VIP* 代码是从这里拿来的程序改的。

目的:把图片变亮或变暗。

实现方法:查找表。

Gamma值0.6:

//Curve of Gamma = 0.6
module Gamma_06
(input		[7:0]	Pre_Data,output	reg	[7:0]	Post_Data
);always@(*)
begincase(Pre_Data)8'h00 : Post_Data = 8'h00; 8'h01 : Post_Data = 8'h09; 8'h02 : Post_Data = 8'h0E; 8'h03 : Post_Data = 8'h12; 8'h04 : Post_Data = 8'h15; 8'h05 : Post_Data = 8'h18; 8'h06 : Post_Data = 8'h1B; 8'h07 : Post_Data = 8'h1D; 8'h08 : Post_Data = 8'h20; 8'h09 : Post_Data = 8'h22; 8'h0A : Post_Data = 8'h25; 8'h0B : Post_Data = 8'h27; 8'h0C : Post_Data = 8'h29; 8'h0D : Post_Data = 8'h2B; 8'h0E : Post_Data = 8'h2D; 8'h0F : Post_Data = 8'h2F; 8'h10 : Post_Data = 8'h30; 8'h11 : Post_Data = 8'h32; 8'h12 : Post_Data = 8'h34; 8'h13 : Post_Data = 8'h36; 8'h14 : Post_Data = 8'h37; 8'h15 : Post_Data = 8'h39; 8'h16 : Post_Data = 8'h3B; 8'h17 : Post_Data = 8'h3C; 8'h18 : Post_Data = 8'h3E; 8'h19 : Post_Data = 8'h3F; 8'h1A : Post_Data = 8'h41; 8'h1B : Post_Data = 8'h42; 8'h1C : Post_Data = 8'h44; 8'h1D : Post_Data = 8'h45; 8'h1E : Post_Data = 8'h47; 8'h1F : Post_Data = 8'h48; 8'h20 : Post_Data = 8'h49; 8'h21 : Post_Data = 8'h4B; 8'h22 : Post_Data = 8'h4C; 8'h23 : Post_Data = 8'h4D; 8'h24 : Post_Data = 8'h4F; 8'h25 : Post_Data = 8'h50; 8'h26 : Post_Data = 8'h51; 8'h27 : Post_Data = 8'h53; 8'h28 : Post_Data = 8'h54; 8'h29 : Post_Data = 8'h55; 8'h2A : Post_Data = 8'h56; 8'h2B : Post_Data = 8'h58; 8'h2C : Post_Data = 8'h59; 8'h2D : Post_Data = 8'h5A; 8'h2E : Post_Data = 8'h5B; 8'h2F : Post_Data = 8'h5C; 8'h30 : Post_Data = 8'h5E; 8'h31 : Post_Data = 8'h5F; 8'h32 : Post_Data = 8'h60; 8'h33 : Post_Data = 8'h61; 8'h34 : Post_Data = 8'h62; 8'h35 : Post_Data = 8'h63; 8'h36 : Post_Data = 8'h64; 8'h37 : Post_Data = 8'h66; 8'h38 : Post_Data = 8'h67; 8'h39 : Post_Data = 8'h68; 8'h3A : Post_Data = 8'h69; 8'h3B : Post_Data = 8'h6A; 8'h3C : Post_Data = 8'h6B; 8'h3D : Post_Data = 8'h6C; 8'h3E : Post_Data = 8'h6D; 8'h3F : Post_Data = 8'h6E; 8'h40 : Post_Data = 8'h6F; 8'h41 : Post_Data = 8'h70; 8'h42 : Post_Data = 8'h71; 8'h43 : Post_Data = 8'h72; 8'h44 : Post_Data = 8'h73; 8'h45 : Post_Data = 8'h74; 8'h46 : Post_Data = 8'h75; 8'h47 : Post_Data = 8'h76; 8'h48 : Post_Data = 8'h77; 8'h49 : Post_Data = 8'h78; 8'h4A : Post_Data = 8'h79; 8'h4B : Post_Data = 8'h7A; 8'h4C : Post_Data = 8'h7B; 8'h4D : Post_Data = 8'h7C; 8'h4E : Post_Data = 8'h7D; 8'h4F : Post_Data = 8'h7E; 8'h50 : Post_Data = 8'h7F; 8'h51 : Post_Data = 8'h80; 8'h52 : Post_Data = 8'h81; 8'h53 : Post_Data = 8'h82; 8'h54 : Post_Data = 8'h83; 8'h55 : Post_Data = 8'h84; 8'h56 : Post_Data = 8'h85; 8'h57 : Post_Data = 8'h86; 8'h58 : Post_Data = 8'h87; 8'h59 : Post_Data = 8'h88; 8'h5A : Post_Data = 8'h89; 8'h5B : Post_Data = 8'h89; 8'h5C : Post_Data = 8'h8A; 8'h5D : Post_Data = 8'h8B; 8'h5E : Post_Data = 8'h8C; 8'h5F : Post_Data = 8'h8D; 8'h60 : Post_Data = 8'h8E; 8'h61 : Post_Data = 8'h8F; 8'h62 : Post_Data = 8'h90; 8'h63 : Post_Data = 8'h91; 8'h64 : Post_Data = 8'h91; 8'h65 : Post_Data = 8'h92; 8'h66 : Post_Data = 8'h93; 8'h67 : Post_Data = 8'h94; 8'h68 : Post_Data = 8'h95; 8'h69 : Post_Data = 8'h96; 8'h6A : Post_Data = 8'h97; 8'h6B : Post_Data = 8'h97; 8'h6C : Post_Data = 8'h98; 8'h6D : Post_Data = 8'h99; 8'h6E : Post_Data = 8'h9A; 8'h6F : Post_Data = 8'h9B; 8'h70 : Post_Data = 8'h9C; 8'h71 : Post_Data = 8'h9C; 8'h72 : Post_Data = 8'h9D; 8'h73 : Post_Data = 8'h9E; 8'h74 : Post_Data = 8'h9F; 8'h75 : Post_Data = 8'hA0; 8'h76 : Post_Data = 8'hA1; 8'h77 : Post_Data = 8'hA1; 8'h78 : Post_Data = 8'hA2; 8'h79 : Post_Data = 8'hA3; 8'h7A : Post_Data = 8'hA4; 8'h7B : Post_Data = 8'hA5; 8'h7C : Post_Data = 8'hA5; 8'h7D : Post_Data = 8'hA6; 8'h7E : Post_Data = 8'hA7; 8'h7F : Post_Data = 8'hA8; 8'h80 : Post_Data = 8'hA9; 8'h81 : Post_Data = 8'hA9; 8'h82 : Post_Data = 8'hAA; 8'h83 : Post_Data = 8'hAB; 8'h84 : Post_Data = 8'hAC; 8'h85 : Post_Data = 8'hAD; 8'h86 : Post_Data = 8'hAD; 8'h87 : Post_Data = 8'hAE; 8'h88 : Post_Data = 8'hAF; 8'h89 : Post_Data = 8'hB0; 8'h8A : Post_Data = 8'hB0; 8'h8B : Post_Data = 8'hB1; 8'h8C : Post_Data = 8'hB2; 8'h8D : Post_Data = 8'hB3; 8'h8E : Post_Data = 8'hB3; 8'h8F : Post_Data = 8'hB4; 8'h90 : Post_Data = 8'hB5; 8'h91 : Post_Data = 8'hB6; 8'h92 : Post_Data = 8'hB6; 8'h93 : Post_Data = 8'hB7; 8'h94 : Post_Data = 8'hB8; 8'h95 : Post_Data = 8'hB9; 8'h96 : Post_Data = 8'hB9; 8'h97 : Post_Data = 8'hBA; 8'h98 : Post_Data = 8'hBB; 8'h99 : Post_Data = 8'hBC; 8'h9A : Post_Data = 8'hBC; 8'h9B : Post_Data = 8'hBD; 8'h9C : Post_Data = 8'hBE; 8'h9D : Post_Data = 8'hBF; 8'h9E : Post_Data = 8'hBF; 8'h9F : Post_Data = 8'hC0; 8'hA0 : Post_Data = 8'hC1; 8'hA1 : Post_Data = 8'hC2; 8'hA2 : Post_Data = 8'hC2; 8'hA3 : Post_Data = 8'hC3; 8'hA4 : Post_Data = 8'hC4; 8'hA5 : Post_Data = 8'hC4; 8'hA6 : Post_Data = 8'hC5; 8'hA7 : Post_Data = 8'hC6; 8'hA8 : Post_Data = 8'hC7; 8'hA9 : Post_Data = 8'hC7; 8'hAA : Post_Data = 8'hC8; 8'hAB : Post_Data = 8'hC9; 8'hAC : Post_Data = 8'hC9; 8'hAD : Post_Data = 8'hCA; 8'hAE : Post_Data = 8'hCB; 8'hAF : Post_Data = 8'hCB; 8'hB0 : Post_Data = 8'hCC; 8'hB1 : Post_Data = 8'hCD; 8'hB2 : Post_Data = 8'hCE; 8'hB3 : Post_Data = 8'hCE; 8'hB4 : Post_Data = 8'hCF; 8'hB5 : Post_Data = 8'hD0; 8'hB6 : Post_Data = 8'hD0; 8'hB7 : Post_Data = 8'hD1; 8'hB8 : Post_Data = 8'hD2; 8'hB9 : Post_Data = 8'hD2; 8'hBA : Post_Data = 8'hD3; 8'hBB : Post_Data = 8'hD4; 8'hBC : Post_Data = 8'hD4; 8'hBD : Post_Data = 8'hD5; 8'hBE : Post_Data = 8'hD6; 8'hBF : Post_Data = 8'hD6; 8'hC0 : Post_Data = 8'hD7; 8'hC1 : Post_Data = 8'hD8; 8'hC2 : Post_Data = 8'hD8; 8'hC3 : Post_Data = 8'hD9; 8'hC4 : Post_Data = 8'hDA; 8'hC5 : Post_Data = 8'hDA; 8'hC6 : Post_Data = 8'hDB; 8'hC7 : Post_Data = 8'hDC; 8'hC8 : Post_Data = 8'hDC; 8'hC9 : Post_Data = 8'hDD; 8'hCA : Post_Data = 8'hDE; 8'hCB : Post_Data = 8'hDE; 8'hCC : Post_Data = 8'hDF; 8'hCD : Post_Data = 8'hE0; 8'hCE : Post_Data = 8'hE0; 8'hCF : Post_Data = 8'hE1; 8'hD0 : Post_Data = 8'hE2; 8'hD1 : Post_Data = 8'hE2; 8'hD2 : Post_Data = 8'hE3; 8'hD3 : Post_Data = 8'hE4; 8'hD4 : Post_Data = 8'hE4; 8'hD5 : Post_Data = 8'hE5; 8'hD6 : Post_Data = 8'hE6; 8'hD7 : Post_Data = 8'hE6; 8'hD8 : Post_Data = 8'hE7; 8'hD9 : Post_Data = 8'hE7; 8'hDA : Post_Data = 8'hE8; 8'hDB : Post_Data = 8'hE9; 8'hDC : Post_Data = 8'hE9; 8'hDD : Post_Data = 8'hEA; 8'hDE : Post_Data = 8'hEB; 8'hDF : Post_Data = 8'hEB; 8'hE0 : Post_Data = 8'hEC; 8'hE1 : Post_Data = 8'hED; 8'hE2 : Post_Data = 8'hED; 8'hE3 : Post_Data = 8'hEE; 8'hE4 : Post_Data = 8'hEE; 8'hE5 : Post_Data = 8'hEF; 8'hE6 : Post_Data = 8'hF0; 8'hE7 : Post_Data = 8'hF0; 8'hE8 : Post_Data = 8'hF1; 8'hE9 : Post_Data = 8'hF2; 8'hEA : Post_Data = 8'hF2; 8'hEB : Post_Data = 8'hF3; 8'hEC : Post_Data = 8'hF3; 8'hED : Post_Data = 8'hF4; 8'hEE : Post_Data = 8'hF5; 8'hEF : Post_Data = 8'hF5; 8'hF0 : Post_Data = 8'hF6; 8'hF1 : Post_Data = 8'hF7; 8'hF2 : Post_Data = 8'hF7; 8'hF3 : Post_Data = 8'hF8; 8'hF4 : Post_Data = 8'hF8; 8'hF5 : Post_Data = 8'hF9; 8'hF6 : Post_Data = 8'hFA; 8'hF7 : Post_Data = 8'hFA; 8'hF8 : Post_Data = 8'hFB; 8'hF9 : Post_Data = 8'hFB; 8'hFA : Post_Data = 8'hFC; 8'hFB : Post_Data = 8'hFD; 8'hFC : Post_Data = 8'hFD; 8'hFD : Post_Data = 8'hFE; 8'hFE : Post_Data = 8'hFE; 8'hFF : Post_Data = 8'hFF; endcase
endendmodule

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/291676.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

人工智能可以战胜人类智慧大脑么?

引言 在当今快速发展的科技时代,人工智能的进步日新月异,引发了一场深刻的讨论:能否有一天,人工智能能够超越甚至战胜人类智慧?这个问题涉及到人类认知的广泛领域,牵涉到人类思维的深层次特质以及AI技术在…

产业园区运营管理方案的六大核心要素

产业园区是我国区域经济的重要载体,是一个集产业、技术、服务、管理等于一体的经济组织形态。随着我国经济的高速发展,各地园区快速扩张,彼此间竞争日益激烈,在这样的大环境下,如何做好园区的运营管理,保障…

[CVPR 2023:3D Gaussian Splatting:实时的神经场渲染]

文章目录 前言小结 原文地址:https://blog.csdn.net/qq_45752541/article/details/132854115 前言 mesh 和点是最常见的3D场景表示,因为它们是显式的,非常适合于快速的基于GPU/CUDA的栅格化。相比之下,最近的神经辐射场&#xf…

计算机网络实验速成

目录 网络实验速成 自动连接类型: 指示灯状态说明: 显示接口: 放置注释信息: 配置计算机: 同理,配置服务器: 配置路由器: router0 配置: router1 配置&…

技术分享-Jenkins

持续集成及Jenkins介绍 软件开发生命周期叫SDLC(Software Development Life Cycle),集合了计划、开发、测试、部署过程。 在平常的开发过程中, 需要频繁地(一天多次)将代码集成到主干,这个叫持…

助力智能车辆检测计数,基于官方YOLOv8全系列[n/s/m/l/x]开发构建道路交通场景下不同参数量级车流检测计数系统

在很多道路交通卡口都有对车流量的统计计算需要,有时候一些特殊时段、特殊节日等时间下对于车流的监测预警更为重要,恶劣特殊天气下的提早监测、预警、限流对于保证乘客、驾驶员的安全是非常重要的措施,本文的主要目的就是想要开发构建道路交…

计算机基础之U盘重装系统

一. 如何选择操作系统 对于Windows操作系统来说,大家选择困难主要集中在Windows 7和Windows 10上;至于XP和Win8,一个是老古董一个是过渡产品都不用考虑;喜欢Win7可能更多的是使用习惯,当然优点也有很多,比…

【银行测试】银行金融测试+金融项目测试点汇总...

目录:导读 前言一、Python编程入门到精通二、接口自动化项目实战三、Web自动化项目实战四、App自动化项目实战五、一线大厂简历六、测试开发DevOps体系七、常用自动化测试工具八、JMeter性能测试九、总结(尾部小惊喜) 前言 1、银行金融测试是…

论文阅读<MULTISCALE DOMAIN ADAPTIVE YOLO FOR CROSS-DOMAIN OBJECT DETECTION>

论文链接:https://arxiv.org/pdf/2106.01483v2.pdfhttps://arxiv.org/pdf/2106.01483v2.pdf 代码链接:GitHub - Mazin-Hnewa/MS-DAYOLO: Multiscale Domain Adaptive YOLO for Cross-Domain Object DetectionMultiscale Domain Adaptive YOLO for Cross…

Git 配置多个 SSH-Key

Git 配置多个 SSH-Key (两个都是gitee) 先看图,官网固然重要,但是不完全行(因为官网示例是一个gitee一个github),现在想是想多个都是gitee在他上面稍微更改即可 一般不对遇到这种问题&#xf…

5 分钟内搭建一个免费问答机器人:Milvus + LangChain

搭建一个好用、便宜又准确的问答机器人需要多长时间? 答案是 5 分钟。只需借助开源的 RAG 技术栈、LangChain 以及好用的向量数据库 Milvus。必须要强调的是,该问答机器人的成本很低,因为我们在召回、评估和开发迭代的过程中不需要调用大语言…

R语言【cli】——cli_warn可以更便捷的在控制台输出警告信息

Package cli version 3.6.2 cli_warn(message, ..., .envir parent.frame()) 参数【message】:它是通过调用 cli_bullets() 进行格式化的。进一步地,还需要调用 inline-makeup(内联标记)。 参数【...】:传递给 rlan…