首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
CSE 473代做、代写Python设计编程
项目预算:
开发周期:
发布时间:
要求地区:
University at Buffalo
Department of Computer Science and Engineering
CSE 473/573 - Computer Vision and Image Processing
Fall 2023
Project #1
Due Date: 10/16/2023, 11:59PM
1 Rotation Matrix (4 points)
Figure 1 illustrates the transformation from coordinate xyz to XYZ: 1) rotate around z axis with α
(the current coordinate is x’y’z’); 2) rotate around x′ axis with β (the current coordinate is x”y”z”);
3) rotate around z′′ axis with γ (the current coordinate is XYZ). α, β, and γ are all given in angles
(not radians), and 0◦ < α, β, γ < 90◦
.
• Design a program to get the rotation matrix from xyz to XYZ. (2 points)
• Design a program to get the rotation matrix from XYZ to xyz. (2 points)
Figure 1: Illustration of Eular angles
We may test your code using different α, β, and γs in grading.
2 Camera Calibration (6 points)
Preliminary.1.
The projection from world coordinate to image plane can be indicated by intrinsic parameters
/(Camera) and extrinsic parameters(World). From world coordinate to camera coordinate, the
extrinsic parameters can be used as
M = Min · Mex =
fx 0 ox
0 fy oy
0 0 1
·
r11 r12 r13 Tx
r21 r22 r23 Ty
r31 r32 r33 Tz
m11 m12 m13 m14
m21 m22 m23 m24
m31 m32 m33 m34
=
fxr11 + oxr31 fxr12 + oxr32 fxr13 + oxr33 fxTx + oxTz
fyr21 + oyr31 fyr22 + oyr32 fyr23 + oyr33 fyTy + oyTz
r31 r32 r33 Tz
.
(1)
Here, M is projection matrix. Let’s define m1 = (m11, m12, m13)
T
, m2 = (m21, m22, m23)
T
, m3 =
(m31, m32, m33)
T
, m4 = (m14, m24, m34)
T
. Also define r1 = (r11, r12, r13)
T
, r2 = (r21, r22, r23)
T
, r3 =
(r31, r32, r33)
T
. Observe that (r1, r2, r3) is the rotation matrix, then
(r1, r2, r3)
r
T
1
r
T
2
r
T
3
=
1 0 0
0 1 0
0 0 1
.
Then we have r
T
i
ri = 1, r
T
i
rj = 0 (i ̸= j). In other words, ||r3|| = ||m3|| = 1.
From M we have
mT
1 m3 = r31(fxr11 + oxr31) + r32(fxr12 + oxr32) + r33(fxr13 + oxr33)
= fx(r11r31 + r12r32 + r13r33) + ox(r
2
31 + r
2
32 + r
2
33)
= fx(r
T
1
r3) + ox(r
T
3
r3)
= ox
(2)
Similarly, Next, from M we have
mT
1 m1 = (fxr11 + oxr31)
2 + (fxr12 + oxr32)
2 + (fxr13 + oxr33)
2
= f
2
x
· r1
T
r1 + 2fxox · r1
T
r3 + o
2
x
· r3
T
r3 = f
2
x + o
2
x
(3)
So fx =
p
mT
1 m1 − o
2
x
. Similarly we have oy = mT
2 m3, fy =
q
mT
2 m2 − o
2
y
. Overall, we come to
the conclusion as follows
ox = mT
1 m3 oy = mT
2 m3 (4)
fx =
q
mT
1 m1 − o
2
x
fy =
q
mT
2 m2 − o
2
y
(5)
Preliminary.2.
Let XwYwZw be the world coordinate and xy be the image coordinate, we have the transformation
matrix M ∈ R
3×4
:
s
x
y
1
=
m11 m12 m13 m14
m21 m22 m23 m24
m31 m32 m33 m34
·
Xw
Yw
Zw
1
(6)
/sx = m11Xw + m12Yw + m13Zw + m14,
sy = m21Xw + m22Yw + m23Zw + m24,
s = m31Xw + m32Yw + m33Zw + m34.
(7)
We can solve mij with the equation below:
where the first matrix is with size 2n × 12 (n is the number of available points).
We apply Equation (9) to calculate m = {mij}. Specifically, x = λm denotes the direction of
m, where ∥x∥ = 1. If we know the values of λ and x, we can get m. To obtain the value of x,
applying Equation (9). To obtain the value of λ, we have ||m3|| = || 1
λ
x3|| = 1.
Preliminary.3.
Solve the homogeneous linear equation Ax = 0, where x is the vector of N unknowns, and A is the
matrix of M × N coefficients. A quick observation is that there are infinite solutions for Ax = 0,
since we can randomly scale x with a scalar λ such that A(λx) = 0. Therefore, we assume ∥x∥ = 1.
Solving the equation can be converted to
min ∥Ax∥ (9)
The minimization problem can be solved with Singular Value Decomposition (SVD). Assume that
A can be decomposed to UΣVT
, we have
min ∥Ax∥ = ∥UΣVT x∥ = ∥ΣVT x∥. (10)
Note that ∥VT x∥ = ∥x∥ = 1, then let y = VT x, so we have
min ∥Ax∥ = ∥Σy∥
Question
Figure 2 shows an image of the checkerboard, where XY Z is the world coordinate and xy is marked
as the image coordinate. The edge length of each grid on the checkerboard is 10mm in reality.
Suppose one pixel of the image is equivalent to 1mm. You can calculate the projection matrix from
world coordinate to image coordinate based on the 32 corners (marked points) on the checkerboard
(16 corners in each side of the checkerboard). From the projection matrix you can get the intrinsic
matrix which is indicated as
fx 0 ox
0 fy oy
0 0 1
(fx and fy are not necessarily be equal).
• Design a function to get the image coordinates of the 32 corners from the image. You can
decide the order of output points for yourself. (2 point)
• Manually (or design a program) to get the world coordinate of the 32 corners. Note that the
output order should be the SAME with the last question. (1 point)
• Design a function to get the intrinsic parameters fx, fy, ox, oy from the image coordinates
and world coordinates acquired above. (2 points)
• Design a function to get the extrinsic parameters R, T from the image coordinates and world
coordinates acquired above. (1 points)
Figure 2: Image of the checkerboard
Instructions (Please read this very carefully!):
• You are only allow to use OpenCV version 4.5.4 for this project.
/• Please implement all your code in file “UB Geometry.py”. Please do NOT make any
changes to any file except “UB Geometry.py”.
• To submit your code and result, Please run “pack submission.sh ” to pack your code and
result into a zip file. You can find the command line in “README.md” Note that when
packing your submission, the script would run your code before packing. The resulting zip
file is only file you need to submit. You should upload the resulting zip file in Brightspace
(UBlearns).
• The packed submission file should be named “submission < Y our UBIT name >.zip”,
and it should contain 3 files, named “result task1.json”, “result task2.json”, and
“UB Geometry.py”. If not, there is something wrong with your code/filename, please go
back and check.
• You are ONLY allowed to use the library that are already imported in the script.
• We grade this project based on the results we get from running your code. If you do not give
correct final results, you are very likely to get NO partial points for that step, even if it may
because you did the former parts wrong.
• Late submissions are NOT accepted.
• Anyone whose raise “RuntimeError”, your grade will be 0 for that task.
• Anyone whose code is evaluated as plagiarism, your grade will be 0 for this project.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代做 program、代写 c++设计程...
2024-12-23
comp2012j 代写、代做 java 设...
2024-12-23
代做 data 编程、代写 python/...
2024-12-23
代做en.553.413-613 applied s...
2024-12-23
代做steady-state analvsis代做...
2024-12-23
代写photo essay of a deciduo...
2024-12-23
代写gpa analyzer调试c/c++语言
2024-12-23
代做comp 330 (fall 2024): as...
2024-12-23
代写pstat 160a fall 2024 - a...
2024-12-23
代做pstat 160a: stochastic p...
2024-12-23
代做7ssgn110 environmental d...
2024-12-23
代做compsci 4039 programming...
2024-12-23
代做lab exercise 8: dictiona...
2024-12-23
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!