-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path“计算分帧时间间隔”应用程序.html
105 lines (87 loc) · 2.63 KB
/
“计算分帧时间间隔”应用程序.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html>
<html>
<head>
<title>计算分帧时间间隔</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
background-color: #f4f4f4;
}
h1 {
color: #333;
}
fieldset {
border: 1px solid #ccc;
border-radius: 5px;
padding: 10px;
margin: 10px;
text-align: left;
}
legend {
font-weight: bold;
font-size: 18px;
color: #333;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="number"] {
width: 100%;
padding: 5px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
button {
background-color: #007bff;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
#result {
font-size: 20px;
font-weight: bold;
color: #333;
}
</style>
</head>
<body>
<h1>计算分帧时间间隔</h1>
<fieldset>
<legend>输入参数</legend>
<label for="f">相机焦距(mm):</label>
<input type="number" id="f">
<label for="a">画幅(mm):</label>
<input type="number" id="a">
<label for="H">相机与目标距离(m):</label>
<input type="number" id="H">
<label for="V">相机运动速度(m/s):</label>
<input type="number" id="V">
<label for="P">分帧照片重叠度(0-1):</label>
<input type="number" id="P">
</fieldset>
<button onclick="calculateT()">计算</button>
<p id="result"></p>
<script>
function calculateT() {
// 获取输入框的值
var P = parseFloat(document.getElementById("P").value);
var H = parseFloat(document.getElementById("H").value);
var a = parseFloat(document.getElementById("a").value);
var V = parseFloat(document.getElementById("V").value);
var f = parseFloat(document.getElementById("f").value);
// 计算 T
var t = (1 - P) * H * a / (V * f);
// 显示结果
document.getElementById("result").innerHTML = "T 的值为:" + t.toFixed(2) + " 秒";
}
</script>
</body>
</html>