Morning Photo
(Batch image processor)
Myoungsoo Jung
1. Introduction
Digital photography has taken off in a big way over the past few years. In fact, digital cameras are becoming so popular that they are one of the must-have digital equipments in these days. With a digital camera, we can take a high quality photos easily, and these are stored in a very cheap storage, actually reusable media in contrast to a film which can be used only once. We can see a picture that we have taken immediately and retake if we don't like. Consequently, we may have huge number of photos and it brings up another issue; we have to organize them as an expected format to find out easily next time and utilize storage such as hard-disk more efficiently.
There are several programs to manipulate photos, e.g. Picasa of Google Inc. Out project, the batch image processing system, also has similar objectives with other programs. Our project has several fascinated features such as image transform filters, thumbnail preview. In addition, it manages each image file with database, so it makes easy and fast to access and organize them.
2. Problem statements & Motivation
First, we sometimes do not know the exact location of the image file that we want to get. The morning photo application provides the database for image files to resolve it. Consequently, a user does not need to remember all the detailed information about the image file.
Second, CxImage library is too complicate to use. Thus, we provide the image library "MorningPhoto Engine" by abstracting the CxImage library. Morning photo engine is an wrapping class. You can see the detail about the structure in diagram 1.
We exploit the natural way to process an image. If a user has an analog camera, he or she takes the film from their camera. After that, he or she extracts the image from the film and then deals with this image by using an album. Morning photo provides abstraction tools such as film and album. Each abstracted film and album image was managed in the database, and each one can have box to manage bunch of film and album. In our application, to handle each abstraction tools, it supports the traverse tree, which you can see top of left side in figure 1.
3. Implementation
To support several options of image processing, we categorized the functions that we implemented into five parts. So Morning photo batch image processor has five tab control windows on the bottom of the main frame. These are image information, effecting and filtering, data management, manage albums, help as shown in the figure 1
A tree control system is another major feature of our program, and it help to traverse lots of image files. Our program provides three different kinds of image tree. First one is film box tree, and it indicates the original image before image processing. Second tree deals with processed images, and our application called it to album box tree. Above two kinds of tree and box abstraction tool are managed by database, which implemented by DAO 6.0. In last, user can traverse the image on existing file system by using a file box tree.
The following is the detailed options that we provide.
3.1 Main Features
a. Batch resizing image
- User defined image size
- Vertical and horizontal image can be processing by difference way
- User can choose the quality of image when they process it.
b. Supporting several image process algorithms
- Bilinear image processing
- Bicubic image processing
- Nearest image processing
c. Image cropping
- Support template to crop image
- Configurable crop area
< Figure 1: Deal with Image Information (Resize, Algorithm, Crop, and so on)>
d. Data management
- User-defined workspace
- Support the backup of image database
- Replacement of the database.
< Figure 2: Deal with Data Management (Manage Workspace, Manage Database)>
e. Effecting
- Similar with one of cellular phone
- Transfer to soft image
- Transfer to rough image
- Rotating
- Special effect: cool image, comfortable image and so on.
< Figure 3: Effecting and Filtering Tab (Several Effecting, Four Filtering, Rotate, Strangeness, Adjust Images, Distort image and so on. )>
f. Adjustment
- Contrast
- Lightness
- Adjust level of image
g. Distort filtering
- Reversing image color
- New paper and so on.
h. Management
- Image file management
- Album management.
3.2 System-level block diagram
Our system consists of three parts. First part is Morning photo image library that wraps functionality of CxImage Library. Second part is the data manager that deals with the options and file system when morning photo processes an image. Third part is the database manager that manages the information of images with hiding the actual location. Diagram 1 describes above managers.

< Diagram 1: Moring photo engine (left) and Relation about Package of class (right)>
3.3 Programming language used
- Microsoft Visual C++ 6.0
- Microsoft Access 97
- MFC 6.0
- DAO 6.0, CxImage
3.4 Third party components
a. CxImage [1]
CxImage is an open-source image processing library, which makes easy and simple to load, save, display, and transform images. It supports a variety of file format such as BMP, GIF, ICO, TGA, PCX, WBMP, WMF, SKA, JPEG, PNG, MNG, TIFF, JBIG, JPEG2000, RAW, PNM, PPM, PGM, RAS. It can be loaded selectively when use it to make a specific tool. It supports a variety of development platform such as Visual C++ 6.0 to Visual C++ 2008, Borland C++ Builder 3 and 6 which commonly used.
It includes several features such as quantization error rounding, pastes metafile pictures, graph data extraction, red eye remove, selective blur, customized linear filter, histogram, text smoothing.
b. EXIF (Exchangeable Image file Format) [2] [3]
EXIF is a specification for image file format, which used by digital camera. It uses the existing image file format such as JPEG, TIFF, with the additional metadata tags. EXIF was created by the Japan Electronics Industries Development Association to include additional information in a photo. It is not a standard, but widely adapted in most of camera manufacturers and many of image file related programs. The EXIF tag structure is taken from TIFF files, and several image specific properties are overlapped between them. The metadata in EXIF covers a wide range of information like below
● Digital camera records date and time when it takes a photo.
● Digital camera settings such as model, manufacturer, ISO, shutter speed are recorded.
● It has a thumbnail image to preview image in a camera or file manager.
● It includes description and copyright information.
● It defines geometric location information.
The following is implemented of EXIF information [4]
< Figure 4: Implemented EXIF information viewer>
EXIF data is integrated within the image file. It needs support of image manipulate program to utilize it. Currently, many of the image manipulate program support it to display and manage files.
EXIF also has some drawbacks. First of all, data in EXIF can be spread anywhere because EXIF uses the offset pointer in the file, so the software may corrupt any pointers or corresponding data that is not encoded or decoded. Second, there are many variations according to manufacturer because there is no standard. Sometimes, a manufacture encapsulates the tag info and uses its own formats. It makes hard to retrieve information correctly. Third, EXIF defines only about TIFF or JPEG, not RAW files. It is caused camera manufacturers to make many properties, incompatible raw file format. And EXIF does not provide information about video, but most of digital camera can capture video as well. Most of drawback is related with its use of legacy file structure.
c. DAO (Data Access Objects) [5]
Data Access Objects is general programming interface for database access on Microsoft Windows system. It is able to bypass the Jet Engine and directly access ODBC data sources, including MS SQL server and other DB systems. It works with creating 'workspace' object, and it performs all database related operations. The workspace object is presented as a session object, which included in a large database engine object; Jet database engine or ODBCDirect database engine.
Morning photo uses DAO to manage image. Due to this, user does not need to know actual location of images.
4. Evaluation
4.1 Objective
The main objective is to make it easy to manipulate and access hundreds of image files. It includes several image filters and adapts algorithms. Database is used for organizing image files easily and efficiently.
4.2 Evaluation method
It is implemented mainly with Microsoft Visual C++ 6.0 and some third party libraries. Main window is designed as dialog of Microsoft Visual C++, and several filters are made with CxImage. Database is organized with support of DAO 6.0, MS Access 97. As additional feature, it extracts EXIF tags from photos and supports modifying it.
4.3 Result
Moring photo does not use any other libraries except CxImage and DAO 6.0. All comfortable management is implemented by win32 API. There are 26 kinds of image processing and 67 kinds of comfortable user options.
Morning photo provides 26 kinds of image process.
Morning Photo successfully provides the database abstraction to handle image locations
Morning Photo provides thin image library by wrapping CxImage library.
Morning Photo can provide 67 kinds of comfortable user options.
< Figure 5: After filtering and inserted image information in DB>

< Figure 6: Supporting multiple image codec (left) and file Management (Right) >

< Figure 7: Selecting the algorithms and image filtering (left), help documents (right) >

< Figure 7: Dealing with Image Information (Resize, Algorithm, Crop, and so on)>
< Figure 8: Information view of EXIF>
< Figure 9: built Database by MorningPhoto >
3.4 Assumption made
Moring Photo runs on the desktop PC.
4. Future work
4.1 Summarize your work
Morning photo provides 26 kinds of image processing.
Morning Photo successfully provides the database abstraction to handle image locations
Morning Photo provides thin image library by wrapping CxImage library.
Morning Photo can provide 67 kinds of comfortable user options.
4.2 If you had more time, what would you have done?
We can implement the morning photo in the embedded environments. When it is implemented, a user does not need to transfer image files from camera to PC. A user just takes a picture and then manages images on the camera by using a Morning Photo.
5. References
[1] Davide Pizzolato, CxImage, http://www.xdp.it/cximage/
[2] Personnel Blog, http://exif.net/64, Sep 11, 2006
[3] EXIF, Wikipedia, http://en.wikipedia.org/wiki/Exchangeable_image_file_format
[4] EXIF example, Wikipedia, http://en.wikipedia.org/wiki/File:Konqueror_Exif_data.jpg
[5] DAO, Wikipedia, http://en.wikipedia.org/wiki/Data_Access_Objects