-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
camera.vugu
70 lines (64 loc) · 4.09 KB
/
camera.vugu
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
<div>
<main:TitleBar>
<button class="w3-bar-item w3-button w3-large w3-ripple w3-teal" @click='c.Navigate("/cameras", nil)'><i class="fas fa-arrow-left"></i></button>
<span class="w3-bar-item w3-large" vg-content='fmt.Sprintf("Camera %q (%s)", c.Name, c.Key())'></span>
</main:TitleBar>
<div class="w3-container w3-row-padding">
<div class="w3-third">
<label>Name</label>
<main:GeneralInputComponent InputType="text" :BindValue="GeneralInputStringPtr{&c.Name}"></main:GeneralInputComponent>
</div>
<div class="w3-third">
<label>Horizontal angle of view</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.HorizontalAOV" :BindLocked="&c.HorizontalAOVLocked"></main:GeneralInputComponent>
<label>Accuracy (pixels)</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.PixelAccuracy"></main:GeneralInputComponent>
</div>
<div class="w3-third">
<label>K1</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.DistortionKs[0]" :BindLocked="&c.DistortionKsLocked[0]"></main:GeneralInputComponent>
<label>K2</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.DistortionKs[1]" :BindLocked="&c.DistortionKsLocked[1]"></main:GeneralInputComponent>
<label>K3</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.DistortionKs[2]" :BindLocked="&c.DistortionKsLocked[2]"></main:GeneralInputComponent>
<label>K4</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.DistortionKs[3]" :BindLocked="&c.DistortionKsLocked[3]"></main:GeneralInputComponent>
<label>P1</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.DistortionPs[0]" :BindLocked="&c.DistortionPsLocked[0]"></main:GeneralInputComponent>
<label>P2</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.DistortionPs[1]" :BindLocked="&c.DistortionPsLocked[1]"></main:GeneralInputComponent>
<label>P3</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.DistortionPs[2]" :BindLocked="&c.DistortionPsLocked[2]"></main:GeneralInputComponent>
<label>P4</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.DistortionPs[3]" :BindLocked="&c.DistortionPsLocked[3]"></main:GeneralInputComponent>
<label>B1</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.DistortionBs[0]" :BindLocked="&c.DistortionBsLocked[0]"></main:GeneralInputComponent>
<label>B2</label>
<main:GeneralInputComponent InputType="number" :BindValue="&c.DistortionBs[1]" :BindLocked="&c.DistortionBsLocked[1]"></main:GeneralInputComponent>
<div class="w3-card">
<div class="w3-container w3-green w3-large" style="padding-bottom: 7px;">
Distortion center offset (pixels)
<main:ToggleInputComponent LabelText="Lock" :BindValue="&c.PrincipalPointOffsetLocked"></main:ToggleInputComponent>
</div>
<main:PixelCoordinateComponent :Editable="true" :HideZ="true" :BindValue="&c.PrincipalPointOffset"></main:PixelCoordinateComponent>
</div>
</div>
</div>
<div class="w3-container">
<span class="w3-large" vg-content='fmt.Sprintf("%d photos", len(c.Photos))'></span>
<button class="w3-large w3-button w3-teal" onclick="document.getElementById('photo-upload').click();"><i class="fas fa-plus"></i></button>
<input style="display:none;" type="file" id="photo-upload" @change="c.handleFileChange(event)">
<ul class="w3-ul w3-card">
<li vg-for="_, photo := range c.PhotosSorted()" class="w3-bar">
<span @click="photo.Delete()" class="w3-bar-item w3-button w3-large w3-right"><i class="far fa-trash-alt"></i></span>
<span @click='c.Navigate("/camera/" + c.Key() + "/photo/" + photo.Key(), nil)' class="w3-bar-item w3-button w3-large w3-right"><i class="far fa-edit"></i></span>
<img :src="photo.jsImageURL" class="w3-bar-item" style="height:100px">
<div class="w3-bar-item">
<span class="w3-large" vg-content="photo.Key()"></span><br>
<span vg-content='fmt.Sprintf("%d mappings", len(photo.Mappings))'></span><br>
<span vg-content='fmt.Sprintf("SSR: %.3f", photo.ResidualSqr())'></span>
</div>
</li>
</ul>
</div>
</div>