https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1017490/tda4vm-ldc-tuning
器件型号:TDA4VM我想获得一些有关 LDC 调优的支持。 如何 使用 LDC LUT 获得更好的失真校正。
输入图像尺寸为1280x960、 输出图像尺寸相同。 我想使用 LDC LUT 执行失真校正。
我已
3μm 透镜供应商提供失真功能,即 HFOV > 190°,VFOV > 135°,焦距= 0.89mm,传感器像素大小=μ m。 我使用以下脚本生成了网格 LUT 文件。
function ldc
gen_lut('/home/vvn/Documents/ldc_spec.txt', 3/1000, 1.78, 1280, 960, 640, 480, 4, 2);
end
% read the distortion specification table(angle and height)
function lut = read_spec(spec_file, pitch_in_mm)
lut0 = dlmread(spec_file);
theta = lut0(:,1)/180*pi;
lut = [theta, lut0(:,2)/pitch_in_mm];
end
% back map
function [h_d, v_d] = xyz2distorted(x, y, z, hc, vc, spec_file, pitch_in_mm)
xt = x-hc; yt = y-vc; zt = z*ones(size(xt));
[phi, r] = cart2pol(xt, yt);
theta = atan2(r, zt);
lut = read_spec(spec_file, pitch_in_mm);
r_d = interp1(lut(:,1), lut(:,2), theta);
[h_d, v_d] = pol2cart(phi, r_d);
h_d = h_d + hc; v_d = v_d + vc;
end
function [] = gen_lut(spec_file, pitch_in_mm, f_in_mm, W, H, hc, vc, s, m)
f = f_in_mm/pitch_in_mm;
[h_p, v_p] = meshgrid(0:W, 0:H);
[h_d, v_d] = xyz2distorted(h_p, v_p, f/s, hc, vc, spec_file, pitch_in_mm);
h_delta = round((h_d - h_p)*8);
v_delta = round((v_d - v_p)*8);
mh=h_delta(1:2^m:end, 1:2^m:end)';
mv=v_delta(1:2^m:end,1:2^m:end)';
dlmwrite('/home/vvn/Documents/ldc_mesh.txt', [mh(:), mv(:)], 'delimiter', ' ');
end
原始图像:

然后、我将网格 LUT 文件导入到 DCC 工具中、并使用 DCC 工具生成 LDC 表。
DCC 设置:
但我发现输出图像太差。
输出图像:

在此感谢您的指导。



