Pascal/Delphi/Lazarus で書かれた逆透視変換が必要です。次の画像を参照してください。
デスティネーション ピクセルをウォークスルーしてから、ソース イメージ内の対応する位置を計算する必要があると思います (丸め誤差などの問題を回避するため)。
function redraw_3d_to_2d(sourcebitmap:tbitmap, sourceaspect:extended, point_a, point_b, point_c, point_d:tpoint, megapixelcount:integer):tbitmap;
var
destinationbitmap:tbitmap;
x,y,sx,sy:integer;
begin
destinationbitmap:=tbitmap.create;
destinationbitmap.width=megapixelcount*sourceaspect*???; // I dont how to calculate this
destinationbitmap.height=megapixelcount*sourceaspect*???; // I dont how to calculate this
for x:=0 to destinationbitmap.width-1 do
for y:=0 to destinationbitmap.height-1 do
begin
sx:=??;
sy:=??;
destinationbitmap.canvas.pixels[x,y]=sourcebitmap.canvas.pixels[sx,sy];
end;
result:=destinationbitmap;
end;
私は本当の式が必要です...したがって、OpenGLソリューションは理想的ではありません...