You Are Here:

Community: Developer Discussion Boards

#1 Old Question Faster Camera Image Processing (createImage + drawImage alternatives) - 2006-01-27, 20:14

Join Date: Aug 2005
Posts: 67
Location: Venice, California
Send a message via Yahoo to davidmanpearl
davidmanpearl
Offline
Regular Contributor
I am trying to optimize for speed an S60 app currently running on Nokia 6620 and 6682.

I am modifying image files from the camera and displaying them to the screen as quickly as possible, but I can't get much past 2 frames per second.

The bottlenecks are getSnapshot("encoding=image/bmp") - probably not much I can do about this - and the combination of createImage() + drawImage().

Here is a Canvas example:
byte buf[];
buf = vc.getSnapshot("encoding=image/bmp");
process(buf); // my custom algo that modifies image
Image img = Image.createImage(buf, 0, buf.length);
graphics.drawImage(img);
repaint();
Do you know of any way to blit 'buf' directly to the display and bypass the functions createImage and drawImage. This could save up to 200ms per frame.

- Sincerely, David Manpearl dmanpearl-at-imatte.com
Reply With Quote

#2 Old Re: Faster Camera Image Processing (createImage + drawImage alternatives) - 2006-01-27, 22:10

Join Date: Jun 2005
Posts: 928
dcrocha's Avatar
dcrocha
Offline
Forum Nokia Expert
Have you tried other encoding formats from the MMAPI documentation, other than bmp? This is the only way to influence the behavior of getSnapshot.

For more advanced drawings you could use the Nokia UI API DirectGraphics class, which has a drawPixels method that can draw an array of pixels directly to a graphics context.

Daniel
Reply With Quote

#3 Old Re: Faster Camera Image Processing (createImage + drawImage alternatives) - 2006-01-30, 15:30

Join Date: Mar 2005
Posts: 499
Location: Paris
njzk2
Offline
Regular Contributor
may be you can try :
graphics = img.getGraphics();

but then you may have problems with muttability, so may be you'll have to create a muttable image previously
however, i don't think a drawImage of a small image can be a very big bottleneck
Reply With Quote

#4 Old Re: Faster Camera Image Processing (createImage + drawImage alternatives) - 2006-02-07, 17:09

Join Date: May 2005
Posts: 6
nokia_devil
Offline
Registered User
Quote:
Originally Posted by davidmanpearl
... I am modifying image files from the camera and displaying them to the
screen as quickly as possible, but I can't get much past 2 frames per second. ...
May I ask you for the lines of code where you are toggeling from camera to image
display and back? How do you "hide" the VideoControl when displaying an image?

Lars
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
i need HELP with image processing rj_cybersilver Mobile Java Media (Graphics & Sounds) 0 2004-12-31 07:45
Mixing and Synchronizing Camera Frame image with Off-Screen Bitmap... zenitum Symbian Media (Graphics & Sounds) 0 2004-12-01 08:24
Saving an image from the camera as JPEG profoundwhispers General Symbian C++ 1 2004-10-18 10:35
Image processing zhenwe1 Mobile Java Media (Graphics & Sounds) 0 2004-02-16 17:27
Camera image processing deepakgmi Mobile Java Media (Graphics & Sounds) 0 2004-01-19 15:48

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ