DirectShow Camera focus - Windows Mobile Development and Hacking General

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

Related

Camera Zoom

Does the zoom feature only work in Video mode?
I haven't been able to get it to work in camera mode on my XDAII.. is this normal?
/me thinks I should read the manual...
You should be able to zoom with the camera, I can with mine, by pressing "up" on the round pad to zoom in and "down" to zoom out.
Hmm.. in camera mode mine doesn't.. looks like I better call O2 support.
Maybe in your camera mode youre capture size is set to large, then it won't work. Set it to small and you can now :lol:
Raoul said:
Maybe in your camera mode youre capture size is set to large, then it won't work. Set it to small and you can now :lol:
Click to expand...
Click to collapse
Raoul, you are right on the money!
Thanks for that, saved me a wait on hold I am sure!
You've cracked it already, but just to explain for all other users.
The camera of the XDA2 has a DIGITAL zoom (that is, it zooms in by interpolating the pixels), not by a proper optical zoom.
This obviously reduces images quality too.
For it to work of course, if the camera is capable of 640x480, then the XDA2 needs to be using a SMALLER image size.
If you use the smallest size then usually two stages of zoom are allowed.
If you use a medium image resolution, then only one stage of zoom is allowed.
And of course, if you are already using 640x480, then NO digital zoom is possible, as there is no possibility to interpolate the size of the images and pixels.
This applies to all devices that feature a digital zoom.
THANK YOU, EVERYBODY
Finally, after 7 months owing I-MAte I really know how to use camera on it
I did not use it very often, but it is neat to know what it is capable to do

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

Disappointed by Footprints

I tried to get into geotagging my pictures and I have to say that I'm very disappointed by the Footprints software.
What's with the resolution of the pictures taken by Footprints? There are only thumbnails in the AppData/HTC/HTCFootprints/thumbnails folder. Why doesn't the software take the pictures at full resolution like the camera? Or are they stored elsewhere? This was the only place where I could find pictures.
I copied them to my PC only to see that the pictures don't contain any GPS info. Apparently they are only saved in the Footprints database and not in the pictures themselves (EXIF...)! That is completely useless!
Is there a way to use the normal camera to add geotagging?
Sure, there is a "GPS Photo" mode in camera settings. Just hit the camera icon and chose the propper mode.
hmm u can open ur camera
click the middle icon for capture mode and click next
there a mode call GPS photo..
maybe that will help u
Oh, thanks, that explains a lot.
Nevertheless I agree with the author, this is stupid not to have a full resolution version of the pictures taken with footprint. You basically need to take 2 pictures : one for footprint and another one for your PC ! this is insane and i'm sure it would not required a lot of modifications to get this thing work properly.
I think, that footprint was originaly intended as fast mobile service, how to inform your friends, where you are. Therefore taken pictures are small, ideal for MMS and e-mail.

Increase zoom in album viewer

Is there any registry tweak that will allow you to zoom in closer with the album viewer software. It works great for the files I view but I need to be able to zoom in much more than it allows
Thanks
Mike
Correct me if I'm wrong, but I think you can zoom in as far as the resolution of each image allows. I have some pretty high-res photo's (taken on a digital SLR) and I can zoom in on them until I start to see pixels. If you have low-res pics, you'll start seeing pixels much sooner.
Zooming in any further would be useless since it can't add any detail, you'll just see pixels the size of Lego blocks.
Edit: I realize you may want to examine an image pixel-per-pixel for some reason. In that case, sorry, I can't help.
Thanks for your response, If I could zoom in that close it would be great. I have some hi resolution files anywhere from 6-10 MB which open fine but I can only zoom in about 3 levels. If I could go to the level you describe, it would more than meet my needs.
Hm... Maybe there is a limit after all. I must admit I haven't tried any files in the 10mb region.
I've taken a quick look in the registry but I haven't come across anything that looks like it might solve this. Sorry.
I looked in the registry too but couldn't find any reference to HTCalbum at all. Guess I'll just have to start trying all the demos of the photo apps again...
There's a bunch of stuff under 'HKLM/Software/HTC/HTCAlbum'. Maybe you can find something I overlooked there.
Thanks, don't know why Resco didn't find that ref, I thought it scanned all directories. I couldn't find anything there either. I did change a dword from 2 to 3 in wheelzoomin frames but that didn't do anything obvious so I changed it back. Wonder if HTC support might be able to help, I've read that they're quick to respond to customer software issues but since this is more of a preference issue vs buggy software they may not offer up much.
Yeah, today I copied a 78 mega pixel image (actually a map) to my Leo and to my surprise, I can't zoom more than a certain amount in HTC Album. Anyone know a fix for this?
use resco photo manager, that one allows you to zoom in much more than the htc album. The newest version also supports multi-touch!
thanx! Tried resco; I'm flattered how they implemented multi touch this soon! only a month and a half after Leo's release.
It's really nice and fast (even faster refresh time than htc album) but I wish u could disable multi touch rotation. It's constantly confusing pinch with rotation.

[REF] *Leo camera Hints & Tips*. Updated 19th December.

I started this hints and tips thread for the HD2 (LEO) as i like most others wasn't to happy with the default camera app that the HD2(LEO) had to offer, to be honest the camera quality was lacking in most areas. The purpose of this thread is to collate all tips and have them available within the first few posts as opposed to having to search for tips among the many pages and threads. Please submit additional tips and hints you have and I will update the first few posts.
you will need a registry editor to do most of these tweaks and their may also be .cabs attached to the bottom of the corresponding post to save the effort need when editing the registry. u can use apps like resco, memmaid, sktool to edit the registry or an app of ur liking
for best possible picture from the HD2(LEO) - you may want to use these setting, use with all mods i post here and you will be very happy with the outcome and possibly feel overwhelmed by the quality of your HD2(LEO) cameras like most ive share these with
WB - either auto or indoor light dependent on ambient light
iso auto - if in a very bright sunny outdoor type weather set this to 100 for best result
5M resolution
wide-screen OFF
touch focus OFF
super fine quality
contrast +4
saturation +3
sharpness +4
metering mode average
1). extrasuperfine quality
Go to HKLM\software\htc\camera\image\jpegquaity\superfine and replace the 5Msize value with 746028 (default value = 643628)
or install the extrasuperfine.cab or install BsB Tweaks 1.5
before and after photos
http://forum.xda-developers.com/showpost.php?p=5157324&postcount=107
http://forum.xda-developers.com/showpost.php?p=5135805&postcount=55
http://forum.xda-developers.com/showpost.php?p=5135911&postcount=56
http://forum.xda-developers.com/showpost.php?p=5130666&postcount=3
2). unlock additional video modes
Go to [HKLM\Software\HTC\Camera\P2 and replace the EncodeFormat value with 2147483647
or install the additionalvideomodes.cab
this will unlock all modes/resolutions listed below
H263(3gp)
CIF 352x288 \ M 176x144
mpeg4
L 320x240 \ CIF 352x288 \ VGA 640x480
3gpp2
S 128x96 \ M 176x144 \ L 320x240 \ CIF 352x288 \ VGA 640x480
motion jpeg
S 128x96 \ M 176x144 \ L 320x240 \ CIF 352x288 \ VGA 640x480
H264
L 320x240 \ CIF 352x288
3). enable .BMP mode in camera
Go to [HKLM\Software\HTC\Camera\P1 and replace the EncodeFormat value with 3
(not quiet working cant get it to stick auto goes back to jpeg in camera app, im hoping people can help me out alittle with this one)
4). improve camera recording quality of mpeg4-vga (boost bit-rate = less fussiness and pixels)
Go to [HKLM\Software\HTC\Camera\recparam\MP4VGA and replace the BitRate value with 4194304 (default value = 2097152)
this will increase your video quality from 2100avg bit-rate to 4500avg bit-rate, leave fps set to 30 as when detail is high in video it causes major fps loss, so with this ur camera will run better than ever and also have improved image quality while recording in MPEG4 vga mode, going any higher in bit-rate will cause slower fps and offer no additional improvement over my posted tweak
please keep in mind that video size increases approx 2times of the default settings, so a 10sec vid normally cost 2700kb while the tweak costs 5500kb
im working on 720p, micro-modes, bmp files and also increased video quality so keep looking for updates daily
ADDED:
19/12/09 = new cab for improve camera recording quality of mpeg4-vga
DAMIEN123_666 said:
2). unlock additional video modes
Go to [HKLM\Software\HTC\Camera\P2 and replave the EncodeFormat value with 2147483647
this will unlock all modes/resolutions listed below
Click to expand...
Click to collapse
Thanks Damien, but I'm not able to enter a 10 Digit Number in EncodeFormat. Only 8 digits are possible. Did you change the key type?
cyclingfan74 said:
Thanks Damien, but I'm not able to enter a 10 Digit Number in EncodeFormat. Only 8 digits are possible. Did you change the key type?
Click to expand...
Click to collapse
hi no its the same, should be a value : double word (decimal). u can use both sktools and memmaid to edit the value, what app are u using ?
I'm using Taskmanager v3.1 by FdcSoft
cyclingfan74 said:
I'm using Taskmanager v3.1 by FdcSoft
Click to expand...
Click to collapse
hi ive made a cab please use it for ease
Thanks, but I installed SKTools now. It worked. I mean, I could enter a 10-digit number at least. Let's see, if the tweak is working, too.
Yes it did!
I have tried all the new video modes but mpeg4 still gives best results?, does for me.
Wow, thanks for this great thread and useful hints! I'm really looking forward to 720p video recording! This would be awesome!!
jrvenge said:
I have tried all the new video modes but mpeg4 still gives best results?, does for me.
Click to expand...
Click to collapse
Normally mp4 will always give the best results.
menus are active, still don't understand the quality ... good for me anyway ;-)
Hey, great work. This thread is something I would like to see sticky or linked in the wiki.
I am unable to select anything other than JPEG and BMP format. It then greys out. The registry entry mentioned above was changed with the cab. Anyone tell me the default value for this so I can change it back? I cannot uninstall the cab as it is not listed in programs.
DAMIEN123_666 said:
hi ive made a cab please use it for ease
Click to expand...
Click to collapse
Hi,
Could you please detail what this cab changes? I installed it and now cannot select anything other than JPEG and BMP. It allows one change then greys out.
Thanks.
derta said:
Hey, great work. This thread is something I would like to see sticky or linked in the wiki.
Click to expand...
Click to collapse
i hope to so, i assume i have to earn this though
why
why will disabling touch focus improve quality?
why will disabling touch focus improve quality?
Click to expand...
Click to collapse
the focus on this camera for light is controlled by this option basically
touch focus = spot = the overall light of the picture is dictated by the spot u select to focus on
center focus = center picture = the overall light of the picture is dictated by the center light in the picture
average focus = the picture takes all light form around the image and averages it out for one even picture,
so basically if u take a picture of a object that gives off light like a tv or light or sumat like this the touch focus, focuses on that object and the rest of the picture will be over dark and maybe even black, when average focus is selected it evens it out so u get to see all the objects in the light and dark evenly
DAMIEN123_666 said:
the focus on this camera for light is controlled by this option basically
touch focus = spot = the overall light of the picture is dictated by the spot u select to focus on
center focus = center picture = the overall light of the picture is dictated by the center light in the picture
average focus = the picture takes all light form around the image and averages it out for one even picture,
so basically if u take a picture of a object that gives off light like a tv or light or sumat like this the touch focus, focuses on that object and the rest of the picture will be over dark and maybe even black, when average focus is selected it evens it out so u get to see all the objects in the light and dark evenly
Click to expand...
Click to collapse
The 3 modes all have their uses though, you need to work out when to use them. For example when taking a picture of a large plasma or LCD TV in the dark the touch focus is excellent. You end up with a very clear screen image and nothing else. If you try bto do the same with a 'better' camera phone, like a symbian you just cant get the same effect.
rovex said:
The 3 modes all have their uses though, you need to work out when to use them. For example when taking a picture of a large plasma or LCD TV in the dark the touch focus is excellent. You end up with a very clear screen image and nothing else. If you try bto do the same with a 'better' camera phone, like a symbian you just cant get the same effect.
Click to expand...
Click to collapse
very true matey, for general images of say out doors or portraits the setup on post one i made is by far the best option but if you do intend to take images of brighter objects touch focus will give better results if you only wanna focus on that object
play with the settings is all i can recommend
thx for the video cab, awesome!
SD Card Storage Capacity official update
@ DAMIEN : Hey mate, I better ask first than ask too late... Do you think these (Yours, also future) tweaks won't have problem with the official ones? I ask because there's another one out - SD Card Storage Capacity - from HTC. I guess it has nothing to do with the tweaks, but you know... Thx devilman
4). improve camera recording quality of mpeg4-vga (boost bit-rate = less fussiness and pixels)
Go to [HKLM\Software\HTC\Camera\recparam\MP4VGA and replace the BitRate value with 4194304
Go to [HKLM\Software\HTC\Camera\recparam\MP4VGA and replace the FrameRate value with 60
Click to expand...
Click to collapse
I accidentally set VSbitrate value to 4194304. could someone please provide me the original setting?...

Categories

Resources