Skip to content

Commit e20e9a1

Browse files
committed
Update stitching, make single script for all actions
1 parent c09d02c commit e20e9a1

File tree

2 files changed

+39
-8
lines changed

2 files changed

+39
-8
lines changed

panoramic_demo/make_demo.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
# Copyright 2021 Mobile Robotics Lab. at Skoltech
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo
17+
18+
# Split two videos to frames
19+
./extract.sh "$1" 1
20+
./extract.sh "$2" 2
21+
22+
# Find matching frames
23+
python ./get_match.py
24+
25+
# Stitch panoramas
26+
python stitch.py --matcher ./output/match.csv --target ./output
27+
28+
# Convert new images to video
29+
./stitching_demo/convert.sh

panoramic_demo/stitching_demo/stitch_two.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,26 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
set -evo pipefail
17+
1618
IMAGE_1=$1
1719
IMAGE_2=$2
1820
# TODO fix this
1921
NAME=$3
2022
PROJECT='./stitching_demo/project.pto'
2123
echo "$IMAGE_1" - "$IMAGE_2"
22-
pto_gen --projection=1 --fov=50 -o "$PROJECT" "$IMAGE_1" "$IMAGE_2"
24+
pto_gen --projection=0 --fov=50 -o "$PROJECT" "$IMAGE_1" "$IMAGE_2"
2325
pto_lensstack --new-lens i0,i1 -o "$PROJECT" "$PROJECT"
2426
cd "./stitching_demo" || exit
2527
PROJECT='project.pto'
26-
cpfind -o "$PROJECT" --multirow --celeste "$PROJECT"
27-
celeste_standalone -i project.pto -o project.pto
28-
cpclean -o "$PROJECT" "$PROJECT"
29-
linefind -o "$PROJECT" "$PROJECT"
28+
# cpfind -o "$PROJECT" --multirow --celeste "$PROJECT"
29+
# celeste_standalone -i project.pto -o project.pto
30+
# cpclean -o "$PROJECT" "$PROJECT"
31+
# linefind -o "$PROJECT" "$PROJECT"
3032
# --opt=v,a,b,c,d,e,g,t,y,p,r,TrX,TrY,TrZ,Tpy,Tpp
31-
pto_var --anchor=1 --opt="y0,p0,r0" -o "$PROJECT" "$PROJECT"
33+
pto_var --anchor=1 --opt=Vb0 --set=y0=37.086,p0=-0.295,r0=3.013,y1=0,p1=0,r1=0,TrX=0,TrY=0,TrZ=0,Tpy=0,Tpp=0 -o "$PROJECT" "$PROJECT"
3234
autooptimiser -n -o "$PROJECT" "$PROJECT"
33-
pano_modify --crop=600,2516,180,800 --canvas=2516x1042 --fov=100x29 -o "$PROJECT" "$PROJECT"
35+
pano_modify --crop=878,3000,39,710 --canvas=3000x750 --fov=120x30 -o "$PROJECT" "$PROJECT"
3436

35-
# vig_optimize -o "$PROJECT" "$PROJECT"
37+
vig_optimize -o "$PROJECT" "$PROJECT"
3638
hugin_executor --stitching --prefix="$NAME" "$PROJECT"

0 commit comments

Comments
 (0)