Skip to content

Commit

Permalink
Vision Workbench release week synchronization.
Browse files Browse the repository at this point in the history
Added a lookat and H vector to the Linescan model.

Added HDR documentation first draft.
  • Loading branch information
broxtronix committed Nov 27, 2006
1 parent 90f0c9e commit 38ef8a2
Show file tree
Hide file tree
Showing 8 changed files with 476 additions and 28 deletions.
94 changes: 84 additions & 10 deletions docs/workbook/camera_module.tex
Expand Up @@ -196,11 +196,6 @@ \subsection{Built-in Camera Models}


\subsubsection{Pinhole Cameras} \subsubsection{Pinhole Cameras}


% Yakimovsky, Y. and Cunningham R., "A System for Extracting
% Three-Dimensional Measurements from a Stereo Pair of TV
% Cameras". Computer Graphics and Image Processing 7,
% pp. 195-210. (1978)

The {\em CAHV camera model} has been widely used in NASA planetary mission The {\em CAHV camera model} has been widely used in NASA planetary mission
for rover navigation and scientific camera systems for rover navigation and scientific camera systems
\cite{yakimovsky78}. It is a basic pinhole camera model: it does not \cite{yakimovsky78}. It is a basic pinhole camera model: it does not
Expand Down Expand Up @@ -275,13 +270,9 @@ \subsubsection{Linescan Cameras}
\end{center} \end{center}
\label{fig:pinhole} \label{fig:pinhole}
\caption{Geometry of the Linear Pushbroom Camera Model. Credit: \caption{Geometry of the Linear Pushbroom Camera Model. Credit:
Rajiv Gupta and Richard Hartley \cite{Gupta97}.} Rajiv Gupta and Richard Hartley \cite{gupta97}.}
\end{figure} \end{figure}


% Rajiv Gupta and Richard Hartley. Linear Pushbroom Cameras. IEEE
% Transactions on Pattern Analysis and Machine Intelligence. Vol.19
% No. 9. September 1997

The geometry of the linescan imager is subtly different from the The geometry of the linescan imager is subtly different from the
geometry of the pinhole camera. See Figure \ref{fig:pushbroom}. geometry of the pinhole camera. See Figure \ref{fig:pushbroom}.
Although there is still a center of projection created by the camera's Although there is still a center of projection created by the camera's
Expand All @@ -306,3 +297,86 @@ \subsubsection{Linescan Cameras}
orientations. orientations.





\subsection{Exif Exposure Data}
Digital cameras store data about the settings used to take a picture
in the image file according to the Exif standard \cite{exif}. Exif
data is stored using the Image File Directory system described in the
TIFF 6.0 standard \cite{tiff}. Exif tags such as FNumber and
ExposureTime can be used to calculate the exposure the picture was
taken with. Unfortunately the standard is redundant and often poorly
supported by camera manufacturers (for example, many hide the ISO
setting in the maker note instead of storing it in the ISOSpeedRatings
tag).

The HDR module includes C++ classes ExifData (defined in ExifData.h and ExifData.cc) and
ExifView (defined in ExifView.h and ExifView.cc) for extracting Exif data from images.
Currently they can handle JPEG and TIFF image files. ExifData gives relatively low-level
access to any data stored as an Exif tag, keyed by its unique tag ID (most of these have
\#define's in ExifData.h for readability). ExifView has functions to determine some more
commonly used camera info, checking all relevant Exif tags. ExifData and ExifView were
based on code from jhead, an Exif Jpeg header and thumbnail manipular program in the
public domain \cite{jhead}.

\begin{verbatim}
/* Attempt to read flash setting. */
ExifData data;
int flash;
if (data.import_data(``img.tif'')) {
if (data.get_tag_value(TAG_Flash, flash)) {
// ...
}
}
/* Reliably get F number. */
ExifView view;
if (view.load_exif(``img.jpg'')) {
double f = view.get_f_number();
// ...
}
\end{verbatim}

\subsection{Using HDR Stacks}
The HDR module has a set of free functions that make stitching a stack of LDR
images into an HDR image as simple as one function call. process\_ldr\_images (in
LDRtoHDR.h) takes a std::vector of ImageViews (with grayscale or RGB pixels
and a floating point channel type), sorted from darkest to brightest. This
function assumes a constant exposure ratio between images; it can be specified
or the default of $\sqrt{2}$ can be used for stacks with a ratio of 1 EV. An
overloaded version also accepts a std::vector$<$vw::Vector$<$double$>$ $>$ by reference,
to return the estimated response curves for each channel.

\begin{verbatim}
/* Generate HDR image from HDR stack. */
typedef ImageView<PixelRGB<double> > Image;
vector<Image> images(num_images);
// ... Read input images ...
// Assume default exposure ratio.
Image hdr_image = process_ldr_images(images);
\end{verbatim}

LDRtoHDRExif.h further defines process\_ldr\_images\_exif, which generates an HDR
image from an array of filenames of LDR images, computing brightness values
from the files' Exif data. Example code usingthis function is in Appendix B. It
also defines another overloaded version of process\_ldr\_images that takes a
std::vector$<$double$>$ of brightness values (as defined by the APEX system \cite{apex})
instead of a constant exposure ratio. These functions do not require the images
to be in any particular order of have a constant exposure ratio.

\begin{thebibliography}{1}

\bibitem{exif} ``Exchangeable image file format for digital still cameras: Exif Version 2.2'',
(Japan Electronics and Information Technology Industries Assocation, 2002),
http://www.exif.org/specifications.html.

\bibitem{gupta} Gupta, Rajiv and Hartley, Richard. ``Linear Pushbroom Cameras''. IEEE
Transactions on Pattern Analysis and Machine Intelligence. Vol.19 No. 9. September 1997

\bibitem{jhead} Wandel, Matthias, ``Exif Jpeg header and thumbnail manipulator program,'' 2006,
http://www.sentex.net/~mwandel/jhead/.

\bibitem{yakimovsky78} Yakimovsky, Y. and Cunningham R., ``A System for Extracting
Three-Dimensional Measurements from a Stereo Pair of TV Cameras ''
Computer Graphics and Image Processing 7, pp. 195-210. (1978)

\end{thebibliography}

0 comments on commit 38ef8a2

Please sign in to comment.