3.2.3 实现效果分析
通过Matlab显示Verilog处理后的image_out.txt文件:
%**********************************************************************
% ——————————————————————-
% Company: Cascatrix
% Engineer: Carson
%
% Create Date: 2023/02/13
% Design Name: gray_display
% Module Name: gray_display
% Tool Versions: v1.0
% Description: Display Gray Image
%——————————————————————-
%*********************************************************************/
clear;clear all;clc;
% Image resolution
row = 1080;
col = 1920;
% Create output image
image_out = uint8(zeros(row,col));
% Write data into output image
FileImage = fopen(image_out.txt,r);
for x = 1:row
for y = 1:col
Gray = fscanf(FileImage,%s,1);
image_out(x,y) = uint8(hex2dec(Gray(1:2)));
end
end
fclose(FileImage);
% Show the output image
imshow(image_out),title(Image output);
% Create image in .jpg format
imwrite(image_out,cascatrix_output.jpg);
Matlab图像显示结果:

审核编辑:汤梓红
免责声明:文章内容来自互联网,本站不对其真实性负责,也不承担任何法律责任,如有侵权等情况,请与本站联系删除。
转载请注明出处:FPGA数字图像处理基础:色彩空间转换(Verilog)-fpga颜色识别 https://www.yhzz.com.cn/a/4507.html