本文主要是介绍基于直方图的图像曝光量分析FPGA实现,包含tb测试文件和MATLAB辅助验证,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
目录
1.算法运行效果图预览
2.算法运行软件版本
3.部分核心程序
4.算法理论概述
5.算法完整程序工程
1.算法运行效果图预览
正常图像:
checkb位于f192b和f250b之间
多度曝光图像:
checkb位于f192b和f250b之外,判决为曝光过度。
2.算法运行软件版本
vivado2019.2
matlab2022a
3.部分核心程序
`timescale 1ns / 1ps
//
// Company:
// Engineer:
// module test_image;reg i_clk;
reg i_rst;
reg i_ready;
reg [7:0] Tmp[0:100000];
reg [7:0] datas;
wire[15:0]o_histb;
wire o_f192b;
wire o_f250b;
wire o_checkb;
wire[23:0]o_hist996b;
wire[23:0]o_histcumb;
integer fids,jj=0,dat;//D:\FPGA_Proj\FPGAtest\code2initial
beginfids = $fopen("D:\\FPGA_Proj\\FPGAtest\\code2\\datab.bmp","rb");dat = $fread(Tmp,fids);$fclose(fids);
endinitial
begin
i_clk=1;
i_rst=1;
i_ready=0;
#1000;
i_ready=1;
i_rst=0;
#655350;
i_ready=0;
end always #5 i_clk=~i_clk;always@(posedge i_clk)
begindatas<=Tmp[jj];jj<=jj+1;
endim_hist im_hist_u(
.i_clk (i_clk),
.i_rst (i_rst),
.i_ready (i_ready),
.i_xin (datas),
.o_histb (o_histb),
.o_f192b (o_f192b),
.o_f250b (o_f250b),
.o_hist996b(o_hist996b),
.o_histcumb(o_histcumb),
.o_checkb (o_checkb)
);endmodule
0X_032m
4.算法理论概述
参考资料如下:
主要采用的方法为:
5.算法完整程序工程
OOOOO
OOO
O
这篇关于基于直方图的图像曝光量分析FPGA实现,包含tb测试文件和MATLAB辅助验证的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!