function obstacle_image = gp_stereo_hwk( left_image, right_image ) %========================================================================= % function obstacle_image = gp_stereo_hwk( left_image, right_image ) % - CSE398/012 Matlab Homework Template, JRS, 17 Apr 07 % - Takes left and right rectified stereo images as input % - Returns a modified left image where the detected obstacle pixels are % highlighted % ======================================================================== % Closes any opended figures close all; % Display the left_image left_fig = figure; imagesc(left_image); axis equal; % Convert to grayscale and display this left_gray_fig = figure; left_gray = rgb2gray(left_image); imagesc(left_gray); colormap gray; axis equal; % Camera parameters % Units are in meters and pixels camera.f = 808.358398 ; % This is the optical center for the camera camera.o_x = 320 ; camera.o_y = 240 ; camera.baseline = 0.12024 ; camera.rows = 480 ; camera.columns = 640 ; camera.height = 1.76 ; camera.centerline = 20 ; % What are the minimum and maximum depths that we want to look at? Z_min = 10; Z_max = 30;