473,326 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Windows Image Acquisition (WIA) Taking black photos

I try to use the Windows Image Acquisition (WIA) with a sample in vb.net but
it takes only back photos and also at low resolution. How can I put ther
resolution at 640x480?
I have a Labtec webcam plus that works fine with other software.
I downloaded two samples from the internte and both of them do the same
problem
The samples are:
http://www.vbforums.com/showthread.php?t=378126
http://www.vbforums.com/attachment.p...chmentid=44367
and
http://msdn.microsoft.com/coding4fun...e/default.aspx
http://download.microsoft.com/downlo...gWebcam-VB.msi

Thanks.
Jul 7 '06 #1
3 5684
Hi Roberto,

Have you tried the WebCam with the Window Explorer?
If you attach the web cam onto the machine, there should be an icon in the
Explorer, My Computer.
Double click that icon and take photo to see what is the result.

Please perform the test and let me know.

Or you may try to use another Web Cam, e.g. the Logitech to see if the code
in the sample works.
Take a photo.
http://msdn.microsoft.com/library/de...us/wiaaut/wia/
wiax/overviews/sharedsamples.asp

Based on my test, if we use a logitech webcam the result will be the same
as we do in the Windows Explorer.

Also to use WIA in VB.NET we need to install the Windows Image Acquisition
Automation Layer which is a wrapper.
Windows Image Acquisition Automation Layer
http://msdn.microsoft.com/library/de...us/wiaaut/wia/
wiax/overviews/startpagewiaaut.asp

For low level control. I think you may try Windows Image Acquisition (WIA)
directly which should be coding with C++.

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 10 '06 #2
With Windows Explorer works very good but only at 352x288 and not 640x480
I also try the VB6 sample you put in
http://msdn.microsoft.com/library/de...redsamples.asp
but it do the same, balck photos. I can see the mix photos in the Windows
Explorer the pictures taken by the VB aplication are balck and the others
good.
I have to change a line in the VB6 code "CameraDeviceType" by
"VideoDeviceType" Because it detected it as VideoDeviceType.

If dev.Type = VideoDeviceType Then 'CameraDeviceType
Dim itm 'As Item
Set itm = dev.ExecuteCommand(wiaCommandTakePicture)
End If

Thanks.

""Peter Huang" [MSFT]" <v-******@online.microsoft.comescribió en el
mensaje news:31**************@TK2MSFTNGXA01.phx.gbl...
Hi Roberto,

Have you tried the WebCam with the Window Explorer?
If you attach the web cam onto the machine, there should be an icon in the
Explorer, My Computer.
Double click that icon and take photo to see what is the result.

Please perform the test and let me know.

Or you may try to use another Web Cam, e.g. the Logitech to see if the
code
in the sample works.
Take a photo.
http://msdn.microsoft.com/library/de...us/wiaaut/wia/
wiax/overviews/sharedsamples.asp

Based on my test, if we use a logitech webcam the result will be the same
as we do in the Windows Explorer.

Also to use WIA in VB.NET we need to install the Windows Image Acquisition
Automation Layer which is a wrapper.
Windows Image Acquisition Automation Layer
http://msdn.microsoft.com/library/de...us/wiaaut/wia/
wiax/overviews/startpagewiaaut.asp

For low level control. I think you may try Windows Image Acquisition (WIA)
directly which should be coding with C++.

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 10 '06 #3
Hi Roberto,

I think you may try to use another WebCam to see if the problem persists.
So that we can isolate if the problem is environment specific.
e.g.
WebCam A will work with machine A well, so if we attach the WebCam A onto
the problem machine, what is the result?
or
You may try your WebCam on another machine to see if that works fine. If
yes, I think we can know the problem maybe machine specific.
You may try the hardware from the list below.
http://testedproducts.windowsmarketp...ID=761&cpID=0&
ocID=0&OR=1

Since I have tried with the sample code with a logitec webcam and I can not
reproduce the problem.
So I think the code should be OK.

Also since the problem persisted with Visual Basic 6 which is an unmanaged
code, I think the problem may be hardware or driver related.
I think you may try the newsgroup below.
microsoft.public.win32.programmer.mmedia

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Richard Smith via .NET 247 | last post by:
Hi I'm trying to use WIA for the scanning of an application i'mworking on at the moment, however i don't want the UI it givesyou and woud like to be able to define the properties such asthe scanning...
1
by: Ryan Melville | last post by:
Hi, I need to use WIA (Windows Image Acquisition) from managed C++. Is there a "new and improved" way to access WIA from managed C++ (i.e., through .net)? Or, is it the same COM calls as from...
3
by: Bob | last post by:
Gidday, Anyone in here used WIA before? I want to be able to connect to a digital camera via USB and access the images. I was hoping WIA would be all I need but it doesn't see my camera (Sony...
4
by: Simon Verona | last post by:
I'm using wia in a vb.net project to capture images from a scanner.. This works fine. However, I want to control the way that images are scanned - ie B+W, Greyscale and resolution etc, but can't...
6
by: Bob | last post by:
Hi, Can anybody who has used Windows Image Acquisition library 2.0 for XP tell me how to get it to scan ALL documents loaded in the document feeder of a scanner. I have only ever used it to do...
19
by: **Developer** | last post by:
When I get the image from the file the file remains locked so the Delete fails with a "used by another process" So I tried using a clone and disposing the obtained image. But that didn't fix...
3
by: Nicholas Lee | last post by:
I am using Visual Studio 2005 and wish to program using managed C++ code. I am writing an application to take still images from a webcam. I have created an interop 'reference' to the platform...
0
by: wachucky | last post by:
hi all, i try to use WIA 2.0 for my project which use scanner, it works fine..but i'm don't know how to detect wether the scanner is connected to the pc or not. i like to prompt a message when the...
1
by: bharathv6 | last post by:
i need to do is modify the image in memory like resizing the image in memory etc ... with out saving it disk as i have to return back the image with out saving it disk PIL supports the use of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.