XDA II Camera issue from API - Windows Mobile Development and Hacking General

Hi all,
I am using a simple piece of code to capture a camera image from the XDA II and display it on a form. The application calls the camera capture dialog. When the dialog is invoked a high resolution (anything other than the lowest) is selected. Now, the dialog previewer shows a corrupt image (flickering / snowy, just a bunch of random pixels). This image is then returned to the caller of the camera capture dialog.
The code is essentially taken from the Microsoft site, and runs fine on any other Windows Mobile 5.0 platform we've tried.
What's really annoying is that the code is simple - call the dialog, the user selects the resolution and the capture image is displayed on a form.
Can anyone give any help? I can supply the code. It would be most helpful if anyone had an XDA II on which they'd be willing to try my code.
Thanks,
Marc

That's because the API is not supported on older OS. WM5 is a requirement for it to work.

Related

Camera driver

Hi!
I have to develop an application for the XDA II. The application has to take a picture and then make an image processing algorithm. The problem is that I don't know how to access to the camera functions.
Does anybody know how to make it?
Thank you
Jon
this info is not yet available :-(
See http://forum.xda-developers.com/viewtopic.php?t=4950

Camera preview for still images

I am trying to use DirectShow API for interfacing with camera functions on the UNIVERSAL (windows mobile 5.0) device. I have got the the code (camera capture sample) that can take a picture (on button click) and save it to a file without showing a preview. This uses following DirectShow interfaces
IAMVideoControl, IPin, IFileSinkFilter, ICaptureGraphBuilder2, IBaseFilter, IImageSinkFilter, etc
Does anybody know a way of having a camera capture preview shown before taking a picture using DirectShow.
Any help will be appreciated
Thanks
Nitin

[C#/C++] Camera Access with DirectShow

Hi Guys,
Because the standard API's to use the camera aren't flexible enough I need to use directshow.
Unfortunately I'm not a very good C++ programmer (more C# ;-))
I found this solution. Wich compiles a C++ DLL and can be called from C#.
Perfect! Except the C++ code doesn't really do what I want to. (And I have no idea how to change it)
See attachement for the C++ project
Dll does: Capture one frame from the camera and store it as a file. (with 320x240 resolution, not great quality)
I'd prefer to use the best available quality, or mayby choose the quality I want.
Also I'd prefer not saving/storing the file but return a stream / bitmap / image
Because I only want to show it on screen (actualy let a mobile webserver respond an image with as much frames per sec as possible)
(Saves a step, storing and deleting everytime)
Any Help?
PS. I also tried Directshow.Net Library But it doesn't seem to work on Windows Mobile.
C# Code
Btw, this is the code I use in C# to create the functions:
[DllImport("CameraCaptureDLL.DLL")]
private static extern bool CaptureStill(string Path);
[DllImport("CameraCaptureDLL.DLL")]
private static extern bool InitializeGraph(IntPtr hWnd);
Just to keep y'all posted, I'm now looking @ this solution (CodeProject.com)
They rewrote the DLL file, and I think it's gonna do what I want, but I first need to install Windows CE 5.0 wich takes alot of time....
I met same problem with you.
I just want to show the camera sight, like the Camera app's Preview function.
I don't know if there is a HTC's Camera SDK.
Please keep contract, if I have any improvment, I will tell you.
I had fun with camera but not using directshow or the preview...I'm just launching the camera app (using sample camera in SDK).
If anyone find an easy way to have "embedded camera display" in an application I'm really interested!! (like a pictureBox having camera as image source)
If I found something I'll tell...
DarkAngelFR said:
I had fun with camera but not using directshow or the preview...I'm just launching the camera app (using sample camera in SDK).
If anyone find an easy way to have "embedded camera display" in an application I'm really interested!! (like a pictureBox having camera as image source)
If I found something I'll tell...
Click to expand...
Click to collapse
I found functions and its parameters by sniffig camera calls on my VOX
Captured data is stored as UYVY.
m32
m32 said:
I found functions and its parameters by sniffig camera calls on my VOX
Captured data is stored as UYVY.
m32
Click to expand...
Click to collapse
Could you provide the compiled version of the htccamera dll ?
Will try to build this later (@work don't have cc compiler, just VS2008)
Thanks!
An in-memory capture would almost certainly improve the live-scan mode in Barcorama also! I could really use that in-memory capable CameraCaptureDll.dll.
Many users seem to have successfully compiled the source at http://www.codeproject.com/KB/mobile/samplegrabberfilter-wm6.aspx, but I can't find the compiled dll somewhere .
I fail to compile it myself as it needs the WindowsCE Platform Builder and VS2008...
Anybody that comes across the DLL, please share!
have fun,
hypest
Hello,
working on it ^^ I will upload the dll here later today
Here you go : download (if fails : try here)
is the source code compiled (look in /bin/Release). Tested and works nice (deploy the dll then the sample app).
Hope this helps!
Thanx!!
will try it!
UPDATE:
The sample opens up but seems to do nothing on my kaiser. <-UPDATE: wrong! it works OK.
I have managed to use the DLL directly though. The capturing works fine but the capture-stop seems to fail: the Stop() function hangs. I use the Shutdown() that seems to be OK, but then I have trouble re-initializing the whole procedure. Also, there seem to be a sensitivity on manually using the garbage collector.
Thanks again anyway!!
Cannot seem to import the dll into another project
@DarkAngelFR
Thanks very much for the sample app for video streaming, was very helpful.
However I really need to use the dll or even the import the CameraCaptureDLL c++ code into our project. I have already read over the ReadMe text file but need further help on how to create this object? Have already tried the Ignore Input Library property and that does not work sadly. Any help would be great!
Thanks,
John
m32 said:
I found functions and its parameters by sniffig camera calls on my VOX
Captured data is stored as UYVY.
m32
Click to expand...
Click to collapse
I have build the camerasniffer dll (and called it htccamera.dll) with mingw32ce, but how do I use it?
I tried copying it to "/windows" and rebooted the phone (hermes) but I do not get a log file on the storage card. Any hints?
Thanks a lot!
Hi,
I got this error when I try to debug this application on my mobile (HTC HD2)
"An unhandled exception of type 'System.MissingMethodException' occurred in TestCameraCapture.exe
Additional information: Can't find PInvoke DLL 'CameraCaptureDLL.DLL'."
But it seem to works fine on the Emulator.
How can I test it on my mobile then?
EDIT
Problem solved, I just had to copy the 'CameraCaptureDLL.DLL' file to the folder where the application is running.

Image processing with diamond's camera

Hi everybody,
I want to develop a software using diamond camera. This software will process image by image the camera output. I reach for source code to get image by image the camera output. In windows mobile sdk we have a class cameracapture but also launch the htc diamond tool for it.
Thanks in advance.
Siav
try to make a sort of "suirvellance" camera, wich make photos & videos when movement is detected....
there aren't similar apps
for the question... i haven't understood it.. and however cannot help you... just an hint.
good work!
kuochsia said:
Hi everybody,
I want to develop a software using diamond camera. This software will process image by image the camera output. I reach for source code to get image by image the camera output. In windows mobile sdk we have a class cameracapture but also launch the htc diamond tool for it.
Thanks in advance.
Siav
Click to expand...
Click to collapse
Not understood what you want to do....
explanation
I want to acquire images from the camera, Image by image to process each of them. For exemple, i want to try a traffic sign recognition or face detection algorithm. But I can't get the video image by image.
More clear or not?
perhaps this one can help you:
Barcorama
the other one I can think of would be 'Dark Ruler'
both process images from camera in some way...

[Q] OCR, image recognition application

Hello everybody,
I'm learning app development and interested in OCR, image recognition application.
I found an app called Vivino
It can scan the wine label and return the result in few minute. This is awesome.
I tried to use OCR (opencv), it is not accurate enough to extract the text from a wine label image since the image is curved.
I also tried to use pattern matching and feature matching, they are working, but the run time is slow and O[n].
Therefore when the number of wine database increase, the run time increase linearly.
Is anyone got the suggestion to improve the accuracy and speed of image recognition?
Thanks in advance.
Lit

Categories

Resources