Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Camera-enable Your Applications with BREW's ICamera APIs

BREW 2.1's ICamera interface allows you to support still and motion image capture from the image sensor found on many of today's mid- and high-end BREW-enabled wireless handsets. Camera-enable your relevant applications by learning how to configure and use this API.


advertisement
eginning in BREW 2.1, QUALCOMM introduced the ICamera API to support still and motion image capture from the image sensor found on many of today's mid- and high-end BREW-enabled wireless handsets. This interface lets you configure the image sensor, obtain bitmaps suitable for painting on the display to present an image viewfinder, as well as capture and encode still and moving images in formats including JPEG and 3GPP. In this article, you'll learn how to configure and use QUALCOMM's BREW ICamera interface in C.

Getting Started
Before you begin, it's important to look at the business case for your camera-based application. There are many kinds of applications that can be camera-enabled: inventory control, entertainment, and messaging applications, for example, not to mention special applications that require video such as character, bar-code, or facial recognition applications.

In conjunction with the business case, not all handsets have ICamera support, so you should be sure to check the handset data sheets available from QUALCOMM. Moreover, some handsets support different options for ICamera; some handsets offer greater control over image capture options such as exposure settings and the like.



Another business-case concern you must consider is that of the requirements of the operators through which you will launch your application. For example, some carriers dictate that images may only be moved from the handset using the Multimedia Messaging Service (MMS) available as part of their service package, so if you're considering building an application that relies on sharing images off-handset, you'd be wise to consider this restriction when establishing your business case.

As with BREW's other multimedia interfaces, the ICamera interface is a highly asynchronous interface, with your interaction being split between setting parameters, issuing requests through method calls, and responding to ICamera requests through the callback you register. The typical flow when using ICamera is this:

  1. You begin by calculating the screen bounds on the display where you will show the camera viewfinder.
  2. Next, create an instance of the ICamera interface using ISHELL_CreateInstance.
  3. With the newly-created ICamera interface in hand, register a callback handler that the ICamera interface invokes when changing state or as new images become available.
  4. After creating the ICamera interface and registering a callback handler, you will set basic options controlling the camera's behavior including exposure options. Most applications should set the camera to a fully automatic mode; some high-performance applications, or those intended for integration with the handset firmware, might provide a sophisticated user interface controlling all of the ICamera interface's options for exposure control, white balance, and so forth.
  5. Once the camera is configured, interaction with ICamera consists of interpreting user events (such as a request for image capture) and invoking the appropriate ICamera methods, or responding to ICamera requests through your callback function.


Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date