# Get from

### Highlights from alexkreimer/rect_pollefeys

• F_transfer_l(H,l1)
• P_from_KRt(K,R,t)
FULL CALIBRATION from camera intrinsics (K) and rigid transformation (R,t)
• e2h(e)
Cartesian space is split into 9 parts as in the image below. This function
• get_pixel(im,p)
• h2e(h)
• im_pixel_points(l,e,dim)
line equations of image boundaries
• im_polar_cone(e,dim)
Consider polar coordinate system with origin at the epipole e; also
• im_project(im,ps,rr,dim)
• l_from_theta_p(theta,p)
• numcols(m)
• numrows(m)
• plot_line_in_image(l1)
read camera parameters and convert into 3 by 4 matrix
• rect_pollefeys(F,i1,i2)
function [i1_rect,i2_rect] = rect_pollefeys(i1,i2,F)
• vgg_F_from_P(P, P2)
F = vgg_F_from_P(P) Compute fundamental matrix from two camera matrices.
• xprodmat(a)
Matrix representation of a cross product
• rectify_sequence.m
• View all files
4.0
4.0 | 1 rating Rate this file 8 Downloads (last 30 days) File Size: 418 KB File ID: #42209 Version: 1.10

# alexkreimer/rect_pollefeys

### Alex Kreimer (view profile)

13 Jun 2013 (Updated )

M. Pollefeys, R. Koch and L. Van Gool, A simple and efficient rectification method for general motio

File Information
Description

Polar rectification

MATLAB release MATLAB 7.13 (R2011b)

Hello,
I would like to try your implementation. Unfortunately, if I call main method returns me an error (bellow). Could you please give me some hint what I am doing wrong.

Code:

blobs1 = detectSURFFeatures(i1, 'MetricThreshold', 2000);
blobs2 = detectSURFFeatures(i2, 'MetricThreshold', 2000);

[features1, validBlobs1] = extractFeatures(i1, blobs1);
[features2, validBlobs2] = extractFeatures(i2, blobs2);

indexPairs = matchFeatures(features1, features2, 'Metric', 'SAD', 'MatchThreshold', 5);

P1 = validBlobs1(indexPairs(:,1),:);
P2 = validBlobs2(indexPairs(:,2),:);

[F] = estimateFundamentalMatrix(P1,P2);

[i1_rect,i2_rect] = rect_pollefeys(i1,i2,F);

Error:
Undefined function 'svd' for input arguments of type 'uint8'.

Error in null (line 67)
[~,S,V] = svd(A,0);

Error in rect_pollefeys (line 23)
e1 = null(F);

Comment only
15 Oct 2013 Alex Kreimer

### Alex Kreimer (view profile)

Please ask your question on stackoverflow.com and send me the link to alex.kreimer at gmail. You'd probably need to provide more detail than you just did.

Comment only
15 Oct 2013 vipil vinod

### vipil vinod (view profile)

hey alex i need to find the depth map of roated and translated image.i have found out the epipolar line..since its not parrellel i cant find the corresponding points..can u pls help me??

Comment only
08 Jul 2013 Dave

### Dave (view profile)

Hi Alex,
Thanks for the update. I downloaded again but still can't see the get_ps( ) function. Which file is it meant to be in?

Thanks
Dave

Comment only
30 Jun 2013 Alex Kreimer

### Alex Kreimer (view profile)

Hi Dave, I've updated the submission with the missing file. I will take a look at the issue you're having, probably within a week or so.

Comment only
29 Jun 2013 Dave

### Dave (view profile)

Also seems to be missing a function get_ps which is invoked from rect_pollefeys at lines 54 and 55. Where can I find this one ?

Thanks
D

Comment only
29 Jun 2013 Dave

### Dave (view profile)

The issue seems to be with handling the epipole when it's in the image bounds, i.e. in quadrant 5. The error comes at the end of epip_quadrant when the bounding vertices are assigned to P.

It should be possible (in terms of the algorithm) to assign both bounds to the same vertex but not sure if the remainder of the code will handle this.
D

Comment only
29 Jun 2013 Dave

### Dave (view profile)

Hi Alex,

Thanks for posting this, I've built a C implementation of this code and have been looking for something to benchmark against for some time.

I'm having issues running the code at the moment and am about to try debugging but on the off chance you have already found the problem, I'm getting:

??? Attempted to access ii_c(1); index out of bounds because numel(ii_c)=0.

Error in ==> epip_quadrant at 62
p(:,1) = im_corners(:,ii_c(1));

Error in ==> get_theta at 8

Error in ==> get_theta_bounds at 3
[theta1,~] = get_theta(e1,dim);

Error in ==> rect_pollefeys at 29
thetas = get_theta_bounds(e1,e2,F,[w,h]);

My F is:
0.0000 -0.0001 0.0090
0.0001 0.0000 -0.0121
-0.0123 0.0094 0.4394

and image sizes are 320 rows x 180 columns

Will let you know if I find a fix.

Cheers
Dave

Comment only
15 Jun 2013 wj