Main Page | Class List | File List | File Members

main.c File Reference

A program to perform lens corrections. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
#include <ctype.h>
#include <limits.h>
#include <getopt.h>
#include "../include/jhead.h"
#include "../include/clens.h"
#include "../include/snip_str.h"

Functions

void display_help ()
 Display usage information for clens.

void print_database ()
 Display all information read from profile files.

int main (int argc, char **argv)
 main function for clens. Parses command line and controls flow of clens.


Variables

CamNode * pCamHdr
 Points to the first camera in the linked list of supported cameras.

LnsNode * pLnsHdr
 Points to the first lens in the linked list of supported lenses.

CoefType coef []
 Array of lens correction coefficient data types.

long coefIndex
 Next available slot in coef[]. Holds the total number of lens correction coefficients after all profiles are read.

prefType pref
 Data structure to hold program preferences.

LnsNode * thisLens
 Pointer to lens for current correction.

CamNode * thisCamera
 Pointer to camera for current correction.

ExifInfo exif
 Data structure to hold EXIF information.


Detailed Description

A program to perform lens corrections.

Author:
Tim Jacobs
Date:
2004.11.13
clens is a command line program used to correct image distortions inherent in camera lenses. It is based on PTLens written by Thomas Niemann. PTLens was written for Windows, clens is an ANSI 'C' port which should be able to be used on any platform.

clens requires data from several sources to make these corrections. Lens correction data is provided through a collection of files referenced by one main file called "profile.txt". You must tell clens where this file is. In addition to this lens calibration data, clens must know which camera and lens were used to take the picture. The camera used to take the picture is obtained from the EXIF data found in the jpeg file itself. The lens used to take the picture must be supplied by the user.


Function Documentation

void display_help  ) 
 

Display usage information for clens.

Returns:
void.

int main int  argc,
char **  argv
 

main function for clens. Parses command line and controls flow of clens.

Parameters:
argc The argument count
argv The argument string vector

void print_database  ) 
 

Display all information read from profile files.

Returns:
void.


Generated on Sun Nov 14 15:28:24 2004 for clens by doxygen 1.3.6