intrinsiccam = ([CvMat.sup.*]) cvLoad(camerainfofile); _intrinsic_distort= ([CvMat.sup.*]) cvLoad(cameradi stortfile); _cam_map_x = cvCreateMat (cy, cx, CV_32F); _cam_map_y = cvCreateMat (cy, cx, CV_32F); //Calculate the distortion mapping cvInitUndistortMap ( intrinsiccam, _intrinsic_distort, _cam_map_x, _cam_map_y); // Read the calibration parameters and complete the delete of distorted image cvRemap (input, output, _cam_map_x, _cam_map_y); The point cloud data obtained by scanning is stored in a format in Files: dumpfile = fopen ("dumpjpt.asc", "w");
fprintf (dumpfile,"% d % d %.2f%.2f%.2f\n", currentpt.col, currentpt.row, px, py , pz ); 3.3 3D Rendering
It provides functions for file opening and closing (fopen and fclose), for unformatted I/O (fread and fwrite), for formatted I/O (fscanf,
fprintf, fgetl, and fgets), for file positioning (fseek, frewind, ftell, and ferror), and for string conversion (sprintf and sscanf).
We can very precisely quantify the intelligence that is required here: the compiler should specialize the library function
fprintf with respect to the control string, in effect transforming the one-liner above into the original three lines.
sampling rate Time Raw = Min; end EO Time = Time Raw(length)Time Raw)); % PAR Conversion Light Raw = conv2PAR('sunlight', Solar Raw, 'W/m2');
fprintf)'Vapor Pressure, Wet bulb Calculations....'); % Calculate humidity measurements: vapor pressure or humidity ratios % Calculate Saturation Vapor Pressures Sat VP Raw = p sat(Temp C); % Saturation Vapor Pressures % modify Sat VP to use Teten's formula (will run faster) % modify all to run with arrays; add *.