function out_points = rok_fisheye_camera_distort_points (ocam_model, points, fc)
    % out_points = ROK_FISHEYE_CAMERA_DISTORT_POINTS (ocam_model, points, fc)
    %
    % Projects the points from undistorted image into original, distorted
    % image. Therefore, it effectively applies calibrated lens distortion
    % to points' coordinates.
    %
    % Input:
    %  - ocam_model = calibrated camera model, produced by OCamCalib
    %  - points = 2xN matrix of points in original (undistorted) image (x 
    %    and y coordinates)
    %  - fc = factor proportional to the distance of the camera to the 
    %    plane (must be same as the value used for image undistortion)
    %
    % Output:
    %  - out_points = 2xN matrix of "distorted" points (x and y
    %    coordinates)
    %
    % NOTE: this function requires OCamCalib's functions in path!
    %
    % Cpyright (C) 2012, Rok Mandeljc <rok.mandeljc@fe.uni-lj.si>
    
    % Note: y coordinates of original points become X and x coordinates of
    % original points become Y...
    x = points(2,:) - ocam_model.xc;
    y = points(1,:) - ocam_model.yc;
    z = ones(size(x)) * (-ocam_model.width/fc);
        
    out_points = world2cam_fast( [ x(:)'; y(:)'; z(:)'] , ocam_model );
    
    % out_points is [ rows; cols ], so we need to rearrange it
    out_points = out_points(end:-1:1,:);    
end
