1

我有一个可执行文件来处理照片,称为 GFA-LIN。您可以正常运行可执行文件,例如:

$./GFA-LIN

**********************************************************************
***                                                                ***
***         G A P    F R A C T I O N    A N A L Y S I S            ***
***                                                                ***
**********************************************************************
 --- GNU Copyright (C) 1982-2014 by Jean-Michel Walter. Contributors: Alemu Gonsamo. --- 

Enter the name of the *.bmp file: 

现在,您必须输入 .bmp 文件的名称。假设我有两个文件 DHP01.bmp 和 DHP02.bmp。

1)我想通过shell中的循环自动输入,例如:

for i in *.bmp; do

echo $i | GFA-LIN

done

但是,当可执行文件继续时出现问题:

Loading BMP: DSCN0001(test).bmp

Geometric distortion of the fish-eye lens: 
1: Equidistant (or polar)
2: Orthographic
?  

2)我的可执行文件的所有其他输入不是文件,而是单个数字,例如:

鱼眼镜头的几何畸变: 1:等距(或极坐标) 2:正交?{1}

BMP: DSCN0001(test).bmp Loaded

To extract the image from the background
Enter the coordinates of 3 points on the horizon circle of the image:
Point 1 (X integer  Y integer): {806 705}
Point 2 (X integer  Y integer): {1507 325}
Point 3 (X integer  Y integer): {428 456}
Center: 932 , 101
Radius: 616.475

Is the working image classified or grey-toned (c/g) ? {c}

3) 等等......就像文件、数字和字符之间的混合。

在这种情况下我该如何进行?我试过类似的东西

#!/bin/bash
for i in *.bmp; do
echo "$i 
1
806 133
700 1507
1941 714
c
y
0.0
90.0 
9.0"  | GFA-LIN

done

没用=(

对不起,如果这个问题之前回答过,或者如果它是超级愚蠢的。我是新来的。

非常感谢!

4

0 回答 0