HTCCamera v.1.0

HTC provides the simpliest DirectShow driver, that does not allow to chose resolution of frame that we want to grab… does not allow to control flash or autofocus and other available settings that default application allows…

Here is first version of HTCCamera class that works directly with driver as result we can choose resolution of grabbing frame, we can grab frames to memory without saving to storage. also it allows to control flash and autofocus!

In future it will allow to control brightness, saturation, hue, whiteballance so on…

First vesion you can download here

19 Responses to “HTCCamera v.1.0”

Pages: « 2 [1] Show All

  1. 10
    Sander Says:

    Hi Alex,
    I wanted to write some code to grab video from the camera of my HTC HD2 Windows Mobile phone. Before starting the journey i myself i thought i would test your demos/example. Unfortunatly none of them seem to work on my phone. I suspect it has to do with my phone running on a WM6.5 ROM. This as I’ve read a comment from somebody else which was able to get it to succesfully run on his HD2.
    When clicking “start” on “HTCCamera v1.0″ it displays the error: “Cannot init camera”. If you want me to run some debug-code to investigate the issue, get into contact via mail.
    Just wanted to inform you of this. Keep up the good work.

    greetz, Sander

  2. 9
    hypest Says:

    Alex,

    ok, I understand. Thank you anyway :)

  3. 8
    admin Says:

    Hypest,

    the problem that i dont think that you need dll that will show message box every time you grab frame for example! so you need at least version that do not show it, but the problem that you will distribute your application as open-source so everybody who use sources of your app will use my library for free… so i think its not an option fot you and me :(

  4. 7
    hypest Says:

    Alex,

    thank you for looking into the issue and offer to add debugging to the library.

    Let me ask this though: What is the license of the library DLL? The source code is non-free, but what about the DLL itself? Can it be used in a free and open-source application like my Barcorama?

    thank you again,
    hypest

  5. 6
    admin Says:

    this is only first version i cannot understand some driver issues yet so i`m working on this i just decided to release this version to show progress.

    anyway i already found how to fix mirrored and color issues, so i think i will upload new version today

  6. 5
    luis Says:

    Hi Alex,

    Thank you for releasing the library!

    I’m using an HTC Touch 2. The HTCCameraDemo works but I have an issue. I get a mirrored grayscale image.

    I could fix the mirrored thing with sth like this:

    // right to left
    byte[] amirror = new byte[buff.Length];
    int stride = buff.Length / e.Heigth;
    for (int i = 0; i < e.Heigth; i++)
    {
    for (int j = 0; j < stride; j = j + 2)
    {
    amirror[(i * stride) + j] = buff[((i + 1) * stride) - j - 2];
    amirror[(i * stride) + j + 1] = buff[((i + 1) * stride) - j - 1];
    }
    }

    I can’t fix the color issue. Is this a limitation of this release?

    Thank you.

  7. 4
    admin Says:

    sure you need sources to add traces… also i can add it by my self and upload on site but not earlier than tonight

  8. 3
    hypest Says:

    hm, I suppose I need the source code to add the traces you refer to? Or there is a way to add traces without the source code?

    On my device, there is htccamera1.dll in the \Windows directory and is the one that I use in Barcorama to use the autofocus triggering.

  9. 2
    admin Says:

    there only one way to debug it. its add traces in native part and check where exactly we got
    problem, as i know some HTC devices use HTCCamera1.dll for exporting driver methods,
    some other devices use HTCCamera.dll

    i`m checking only HTCCamera1.dll so may be this is the problem

  10. 1
    hypest Says:

    Hello!
    Thank you for releasing such a library!

    Unfortunately, trying the example code on my HTC Kaiser (WM6.6 Pro), the Camera.Init() function returns false. Is there any way to debug it further? (I have tried with resolutions: 240×320, 320×240, 640×480, 1024×768)

    hypest

Pages: « 2 [1] Show All

Leave a Reply