Advanced Computer Vision Formulas and Techniques

cmsc5711 formula sheet ch2 camera model essential n.w
1 / 8
Embed
Share

Explore essential formulas and techniques in computer vision, including edge detection, color models, stereo vision, and factorization. Delve into topics like camera models, image processing, and more with detailed explanations and examples.

  • Computer Vision
  • Formulas
  • Techniques
  • Edge Detection
  • Color Models

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. CMSC5711 Formula sheet: Ch2. Camera model: essential Formulas CMSC5711 Formula sheet: Ch2. Camera model: essential Formulas Ch3. Edge detection: essential Formulas, Ch3. Edge detection: essential Formulas, ???.?????? ?????? ??????? ?????????? ?? ?? ?? 1 1st order edge gradient , ?? ?? ?? = ????(3 4) edge if G(I(x,y)>> ? ??? ???. 3 1 2 2 (4 1) ?? ?,? ?? ?? ?,? ?? ?(?(?,?)) + ????(3 4)= ??(3 3)?3| ?? (3 4) ? ? ? ? ? (3 1) ?? ?? ?? 1 2nd order edge (Laplacian operator) ?2? ?,? =?2? ?,? ??2 = ?int(3 3) ????(3 4) +?2? ?,? ??2 = 0, (4 1) Rodrigues formula 0 ?? ?? 0 ?? ?? ?? 0 R=cos ?I+(I-cos ?)rrT+sin ? , 2 D Gaussian: G x,y = ?? 2 2??2? ? ??2+ ? ?? 1 2?2 Rcamx=[1 0 0 0 cos(theta_x) -sin(theta_x) 0 sin(theta_x) cos(theta_x) ]; Harris matrix (structure tensor):?(?,?) = Rcamy=[cos(theta_y) 0 sin(theta_y) 0 1 0 -sin(theta_y) 0 cos(theta_y)]; all x,y in N all x,y in N 2 ??(?,?) ?? ??(?,?) ?? ??(?,?) ?? Rcamz=[cos(theta_z) -sin(theta_z) 0 sin(theta_z) cos(theta_z) 0 0 0 1 ]; ?,? ?,? all x,y in N all x,y in ? 2 ??(?,?) ?? ??(?,?) ?? ??(?,?) ?? ?,? ?,? 1 Formulas v3. (250402a)

  2. Ch6: ---- Histogram equalization ------- ? Ch4: Normalized cross correlation coefficient ??,? = ?,? ???,? ? ?? ??,??=? 1 ?(??) = ?? ?? ?=0 ? ??,? -----Color model: RGB to HSV,HSL,HIS----- ????= 0, ?/?, ?? ?????? ?? ? = 0 2 ?,? ???,? 2 ? ?,? ???,? ? 0, ?? ? = 0 ?? ? 1/2 ?? ? 1/2 ?/2?, ?/(2 2?), ????= ? = ???_?????, ? = ????(?), ? = ????(? ) 0, ?? ? = 0 ? 5.???? ?????????: ? = ?? + ? ? = cos(?) sin(?) hence ??= cos(?) sin(?) so ? = sin(?)??+ cos(?)?? 1 ? ????= ? ?, ?? ?????? ,? = , sin(?) ? = ???(?,?,?) ? = ???(?,?,?) ? = ? ? ? = 13 ? = ? ? = 12 ? ??+ , sin(?) ? + ? + ? ? + ? 2 ? ?? 0 ? ?? 2 = ? 1 1 ? ?? Ch7: The Epanechnikov ?? otherwise 2 ? ?? ? ?? ? ?=1 ???? 2 ??,? ? ? ?=1 2??,? ? ?+2 ?=1 ? ?? ? ?? ? ? ?(?) = ? , ? ? = ?? ? 2 ? ?=1 ?? ? ?? otherwise 2 = ? if 0 1 ? ?? Where ?? Formulas v3. (250402a) 2

  3. Ch8. Stereo vision ?1 ?2 ?3 ? [??]???= ?? ?? by definition F*e1=0, where e1=epipole of left image ?1= ?1 ,?2= ?2 , ??= ??????|??, R=cam. rotation, T=cam. translation X=model point, x=image point projection matrices (?1,?2)of 2 cams 0 ?3 ?2 ?3 0 ?1 ?2 ?1 0 [?]?= = 2= ? 1+ ?, To rotate (R) and translate (T) a vector from X1 to X2. hence 2? ? 1= 0 ? ??? ????????? ?????x ? = ? ? 3? ?1 3? ?1 3? ?2 3? ?2 1? ?1?1 ?1?1 ?2?2 ?2?2 2? A = = 0, 1? For a stereo setup, a pixel at the reference (left) image is (u1,v2) , the right hand image point is (u2,v2), ,? ?? ? ? fundamental matrix, such that ?2 ?2 1 ? ?1 ?11 ?12 ?13 ?21 ?22 ?23 ?31 ?32 ?33 2? where ???= ?? row of P 1?= 0 ?1 , where ? = 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 ? = ,? = , 1 0 ?2?1?11+ ?2?1?12+ ?2?13+ ?2?1?21+ ?2?1?22 + ?2?23+ ?1?31+ ?1?32+ ?33= 0 [?,?,?] = ???(?) If Ax=0, [U,S,V]=SVD(A), last column of V is x. Normalization: Average distance of [u,v] around the center [0,0] is sqrt(2) [?]?= ???? ? = ???? Formulas v3. (250402a) 3

  4. Ch9. Factorization ?1 ?1 0 ?2 ?2 0 ?3 ?3 0 ?1 ?2 1 =?2 3 ?2 1 1 Affine ???????= 0 (u,v)=real pixel position, (u v )= affine translation eliminated pixel. (X Y Z) = model point, x= projected image. M = affine rotation , t=affine translation, ? ? ? ? ? 2 ?,?? (????) ? = = ? + ?,min ??,?? 1 1 1 ? 1 : ? 1 ? 1 : ? 1 ? 2 : ? 2 ? 2 : ? 2 ... : ... ... : ... ? ? : ? ? ? ? : ? ? ?(2 ?)= 1 1 1 (2 ?) where ?(2 ?)= ??= ?1,?=1 : ?1,?= ?1,?=1 : ?1,?= ?2,?=1 : ?2,?= ?2,?=1 : ?2,?= ?3,?=1 : ?3,?= ?3,?=1 : ?3,?= 2 3 = Formulas v3. (250402a) 4

  5. Ch10 linear pose estimation, Barycentric homogenous coord. ?? ????? ?= ?=1 ? ,with ?=1 4 4 Formulas v3. (250402a) ???= 1, 1 ? ? ? ? ? ? ? ??,?=1 ??,?=1 ??,?=1 1 ??,?=2 ??=2 ??,?=2 1 ??,?=3 ??,?=3 ??,?=3 1 ??,?=4 ??,?=4 ??,?=4 1 ??,?=1 ??,?=1 ??,?=1 1 ??,?=2 ??,?=2 ??,?=2 1 ??,?=? ??,?=? ??,?=? 1 ??=1,?=1 ??=1,?=2 ??=1,?=3 ??=1,?=4 ??=2,?=1 ??=2,?=2 ??=2,?=3 ??=2,?=4 ??=?,?=1 ??=?,?=2 ??=?,?=3 ??=?,?=4 ? ? ? ? ? ? ? .. = ? ? ? ? ? ? ? (4x?) (4x1) (4x?) ???= homogeneous barycentric coord. can be estimated 2D case ?,(? = 1,2,..,? and ? = 1,2,3,4). ? = camera intrinsic parameters 4 ?,where ??= ?? ??_?? ??_?? 1 ?? ??,? = ?? 1 ?= ? ?? = ??? ????? ,then ?? ?=1 ? ?? ?? ?? 4 ?? ??_?? ??_?? 1 ?? ?? 1 ? ?? = ??? , ?? ? ?=1 4 ?+ ?????_?? ???? ?= 0, ?=1 4 ?+ ?????_?? ???? ?= 0, ?=1 For feature i, a1=Alph(i,1); a2=Alph(i,2); a3=Alph(i,3); a4=Alph(i,4); where Alph=? See code compute_M_ver2.m of https://www.epfl.ch/labs/cvlab/wp-content/uploads/2018/08/EPnP_matlab.zip M_i(2x12)= [a1*fu, 0, a1*(u0-ui), a2*fu, 0, a2*(u0-ui), a3*fu, 0, a3*(u0-ui), a4*fu, 0, a4*(u0-ui); 0, a1*fv, a1*(v0-vi), 0, a2*fv, a2*(v0-vi), 0, a3*fv, a3*(v0-vi), 0, a4*fv, a4 *(u0-ui)] M(2nx12)=[M_i=1(2x12), M_i=2(2x12),..., M_i=n(2x12)]T M*???? ? =0, where ???? ? = ??=1 ??=1 ??=1 ??=2 ??=2 ??=2 ??????? ??????? https://www.epfl.ch/labs/cvlab/wp-content/uploads/2018/08/EPnP_matlab.zip ? 5 ? ? ? ? ? ? ? ? ? ? ? ? ? ??=3 ??=3 ??=3 ??=4 ??=4 ??=4 ?

  6. Ch11. Iterative pose estimation Ch12 Bundel adjustment ?? ??= ??11??+?12??+?13??+?1 ?31??+?32??+?33??+?3 ??= ??21??+?22??+?23??+?2 ?31??+?32??+?33??+?3 ?? ?,? =focal length ?? ?? ,? ?? ?? = ? ?11 ?21 ?31 ?12 ?22 ?32 ?13 ?23 ?33 1 ?3 1 ?1 ?2 ?1 1 Rotation is R = ?3 ?2 , ?1,?2,?3 are small angles rotate aginst ?,?,? axes resp. Translation T =[T1,T2,T3]T ?? ?? ,?? ,?? ] ?? ? 3? ?????,????? ?? ?? [?? Formulas v3. (250402a) 6

  7. Ch14: Camera calibration and Homography ? ?,? ? ?,? ? ?3,1 ?3,2 ?3,3 Formulas v3. (250402a) ?1,1 ?2,1 ?1,2 ?2,2 ?1,3 ?2,3 ?? ?? 1 ?? ?? 1 = , where [??, ??]T is on a planner surface, [u ,v ]T is the 2D projection ? ?,? ?= ?3,1 ??+?3,2 ??+?3,3 1 ? ?,? ?= ?3,1 ??+?3,2 ??+?3,3 1 ?1,1 ??+?1,2 ??+?1,3 1 ??,?= ?2,1 ??+?2,2 ??+?2,3 1 ??,?= Eliminate the term s ??,?(?3,1 ??+ ?3,2 ??+ ?3,3)-( ?1,1 ??+ ?1,2 ??+ ?1,3) = 0 ??,?(?3,1 ??+ ?3,2 ??+ ?3,3)- ?2,1 ??+ ?2,2 ??+ ?2,3 = 0 ?, Set = ?1,1,?1,2,?1,3,?2,1,?2,2,?2,2,?3,1,?3,2,?3,3 ??=1,? ??=1,? ??=2,? ?? =2,? ??=1,??? ??=1,??? ??=2??? ??=2,??? ??=1,??? ??=1,??? ??=2,??? ??=2,??? 0 0 ?? 0 ?? 0 ?? 0 ?? 0 1 0 1 0 0 1 0 1 : : 0 1 ?? 0 ?? ?? 0 ?? 0 0 : 02? 1 = ??=?,? ??=?,? ??=?,??? ??=?,??? ??=?,??? ??=?,??? 0 0 ?? 0 ?? 0 1 0 ?? ?? 7 2? 9

  8. Ch15 : Neural networks useful formulas A1 1 Indexed by i Weight Layer L w, Sigmoid_? ? = 1 + ? ? sinh(?) cosh(?)=?? ? ? k j i jx iu j u ix Tanh_(?) = ??+? ?, w = 1 = 1 , = i kx 1 j Relu_?(?) = max(0,?), 1 = is js exp(??) ?=1 w ??=SoftMax ?? = exp(??), , = i 2 j ? ix Case 1: neuron in between output and hidden layer ?? ???,? Case 2: neuron between a hidden and hidden layer. ?=? iu = 2 = 2 = is = ?? ??= ?? ?? ?(??) 1 ?(??) ?? 2 w = , j i I ?? = ?? ??,? ?(??) 1 ?(??) ?? ???,? ix= iu= ?=1 I I Ch18 :Radiance field rendering, Alpha composing (blending) Opacity=?, Density=?, Transmission=t, Color=? ? = 1 exp ? ?? ; =1 T ; ??=1 at sampling point j, otherwise =0 ?(???) = ?=1 At sampling point i=1,2, N of a ray, the color receiving at the viewing pixel is ??????= 1?1+ (1 1) 2?2+(1 1) (1 2) 3?3 (1 ? 1)?? is= I ?=1?? (1 exp( ????)) ??, where ??=exp( ?=1 ? 1????) Output layer 8 Formulas v3. (250402a)

More Related Content