×

Discussion Board

Results 1 to 6 of 6

Thread: Camera2 module

  1. #1
    Regular Contributor
    Join Date
    Apr 2010
    Location
    Fortaleza, Brazil
    Posts
    118

    Camera2 module

    Hi everyone!

    I'll try to post all information related to the camera2 module in this thread.

    This is a modification of the stock camera module. It includes a few new functions and also the ability to record video in higher resolutions.

    So far it was only tested with the Nokia N8, and it could record HD video up to 30fps.

    You can download the sources, dev-modules package and signed SIS files at http://www.altoretrato.com.br/pys60/index.html

    I can't promise any support at all, but I'll do what I can to help if you leave your questions and comments below.

    Obs.:

    You can use camera2 and fastcamera together (one at a time, obviously) to get high-res videos and focused pictures. It would be nice if someone could bring these two modules into the stock one...

    Enjoy!
    Last edited by AltoRetrato; 2010-12-11 at 19:23.

  2. #2
    Registered User
    Join Date
    Dec 2010
    Posts
    6

    Re: Camera2 module

    Hi,

    Just installed the sis file. Install went OK but if I try to run viewfinder.py or camera2_tests.py I get error: File "C:\resource\python25\camera2.py", line21, in <module> import _camera2
    File "C:\resource\python25\python25.zip\site.py", line 109, in platsec_import raise ImportError("No module named " + name)
    ImportError: No module named _camera2

    I also send you an email with screenshot of the full error from my Nokia N8

  3. #3
    Regular Contributor
    Join Date
    Apr 2010
    Location
    Fortaleza, Brazil
    Posts
    118

    Re: Camera2 module

    Thanks!

    This one seems hard to solve!

    Code:
    import imp
    _camera2 = imp.load_dynamic("_camera2","C:\\sys\\bin\\kf__camera2.pyd")
    _camera2 = imp.load_dynamic("_camera2","kf__camera2.pyd")
    The lines above will produce the (not very helpful) error message ImportError: dlopen: Load failed.

    The error above might be caused by a difference in the capabilities of the module and the Python Script Shell. I think this is a bit odd - it would make sense if the Shell doesn't have a cap. that the module requires, but that's not the case.

    I'm using the PythonScriptShell_2.0.0_high_capas.sis, with capabilities: ReadDeviceData, WriteDeviceData, SwEvent, NetworkServices, LocalServices, ReadUserData, WriteUserData, Location, UserEnvironment.

    The camera2 module has capabilities: NetworkServices, LocalServices, ReadUserData, WriteUserData, Location, UserEnvironment.

    I used SISContents to change the module cap. and tried to sign it at Symbian Signed. As soon as I receive and test the module I'll update this info.
    Last edited by AltoRetrato; 2010-12-10 at 23:22.

  4. #4
    Registered User
    Join Date
    Dec 2010
    Posts
    6

    Re: Camera2 module

    I installed: Python_2.0.0.sis and PythonScriptShell_2.0.0_high_capas.sis both from the "PyS60_binaries_certificate_error_fixed.zip" at https://garage.maemo.org/frs/?group_id=854
    And the only extra module I installed is fastcamera that I had to sign at Symbian Signed.
    Then I installed your sis file. The rest of my N8 is factory sertings...

  5. #5
    Regular Contributor
    Join Date
    Apr 2010
    Location
    Fortaleza, Brazil
    Posts
    118

    Re: Camera2 module

    I received the signed module and it was imported fine, but it is tied to the IMEI of my phone.

    So, to import the module <i>using the Script Shell</i>, you must:
    • download the new version (0.0.1b) (or manually change the caps of the module you already downloaded)
    • get the IMEI of your phone (dial *#06#)
    • sign the module at Symbian Signed
    • install the signed module when it's available

    This is not necessary if you want to create an app using ensymble. In this case, just get the dev-modules package.

  6. #6
    Registered User
    Join Date
    Jun 2010
    Posts
    49

    Re: Camera2 module

    Hello.
    I was able to use the camera2 module in a standalone application doing the following:
    - I took the kf__camera2.pyd from the .sis provided by AltoRetrato (I use SISContents to unpack SIS)
    - (I already installed PyS60 SDK)
    - to add the camera2 extension, as described in the "Extending Python on Symbian" book chapter (http://developer.symbian.org/wiki/Ap...hon_on_Symbian), is to: make a copy of camera folder from "module-repo\dev-modules\" folder of the PyS60 SDK installation named camera2; erase kf_camera.pyd from camera2; copy the kf_camera2.pyd in the "module-repo\dev-modules\pyinbox" folder. These files will be copied by the PyS60 application packager when creating the SIS.

    Also, note that the Viewfinder callback implemented in camera2_tests.py works only for Symbian ^ 3 - as far as I can see on S60 3rd edition devices the vf() doesn't display any image. Therefore I suggest the following generic viewfinder:
    def vf(im):
    global printed
    if not printed:
    log("VF size: %s" % [im.size])
    printed = True
    if (e32.s60_version_info[0] == 5 and e32.s60_version_info[0] == 2):
    appuifw.app.body.begin_redraw()
    appuifw.app.body.blit(im)
    appuifw.app.body.end_redraw()
    else:
    appuifw.app.body.blit(im)

    Regards.

Similar Threads

  1. smidi module?
    By Davie1 in forum Symbian
    Replies: 3
    Last Post: 2011-03-18, 17:33
  2. Replies: 1
    Last Post: 2010-07-26, 10:22
  3. Replies: 4
    Last Post: 2009-06-10, 19:18
  4. Replies: 9
    Last Post: 2008-08-30, 07:05
  5. Infrared module
    By shalabio in forum Symbian
    Replies: 2
    Last Post: 2008-07-12, 05:01

Posting Permissions

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