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.
Hey Guys!
Is it possible to program an own camera application which not starts the standard camera application of windows mobile?
So that not the user decides when the cam shoot a picture!
For Example: A Thread is taking every 3seconds a picture or capture a video.
application development system: visual2005
device: HTC Advantage - Ameo
OS: WM5 (WM6 possible)
An open source app would be helpfull too!
Thank you!
Perhaps someone can help me with Directshow ?
Any good Tutorials ?
Or perhaps a short directshow code (c++) which only take a picture and save it. The CameraCapture Example is very complicate for a direct show newbie There are too many things which i dont need and its hard to find out the important lines :/
Would be nice if someone could help
THX
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.
I've recently been working in DirectShow trying to create a simple program that uses the camera to read barcodes.
The problem I'm running into is that the video feed I'm getting from the camera is very blurry at barcode reading distances (five to six inches from object). The included camera software can take good pictures at this distance, but it auto-focuses first.
I've tried to use the IAMCameraControl interface to adjust the focus, but it doesn't support that property (and even the properties it does support can't be set to manual mode)
Does anyone know how to adjust the focus on the HTC Touch Pro's camera using DirectShow?
Hello,
Did you manage to fix your problem? Thx
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...