×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jul 2004
    Posts
    104

    How to edit view finder bitmap data real time before Draw() in 7610 ??

    Hi all!

    I am trying to migrate my application to the 7610 platform. And since (as far as i know) the only way to get 1-Mega pixel images on 7610 is to use the 7610 Camera plugin, I have to use the new CCamera module for the camera function.

    The application need to have a view finder to display modified bitmaps (e.g. distorted images) real time. It has been very smooth using the old CameraServ module. But in the CCamera module, I just can't figure out a way to have the job done.

    Here's what I need to do:

    1. Get updated view finder image
    2. Modify bitmap data of the image
    3. Draw it out
    4. Get the next updated view finder images

    However since the ViewFinder of the CCamera will continuously write data to the same bitmap object, I cannot obtain a static image for me to do modification. I have tried a few methods to try to get around this problem but none are quick enough:

    Method A: Use CaptureImage() instead of view finder.
    Result: Each time the CaptureImage() returns a new bitmap, so I have to delete the old bitmap before Draw()ing the new one.

    Method B: Call StopViewFinder() before I edit, Draw() it out, then call StartViewFinder()
    Result: Very slow. I guess these two functions are not as simple as stopping the image data transfer between the camera device and the memory and it will take much time to return.

    Method C: Copy the view finder image data to another bitmap object before edit and Draw()
    Result: Too slow, because need to copy (even just 160*120*2 bytes) data to another memory location

    I know that none of the above methods are good methods but I can think of no others.... Does anyone have any idea on this problem? Or did I miss something or some functions that can help me to do my task? In the old camera library things are so much easier, because the view finder bitmap object will only be updated when u issue another GetImage() function call.

    Thanks a lot!

  2. #2
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    148
    Method C: how are you copying the bitmap? Using Mem::Copy should be fast enough...

    Method D: a new view finder frame will not be fetched until you return from ViewFinderFrameReady() call back. So doing any image processing synchronously while in call back function should do the trick.

  3. #3
    Regular Contributor
    Join Date
    Jul 2004
    Posts
    104
    Thx!

    I am now using Method B and the response is quite acceptable on the real device (though it's terribly slow on the emulator for some unknown reason)

    Method D: I have tried and it seems the bitmap data will be continuously updated even ViewFinderFrameReady() is not returned yet.

Posting Permissions

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