+ Reply to Thread
Results 1 to 6 of 6

Transferring an image from webcam to hard drive

  1. #1
    Registered User
    Join Date
    02-10-2009
    Location
    Norwalk, Ohio, USA
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    3

    Transferring an image from webcam to hard drive

    Hi,

    I've helped create a macro that helps to automate our QC department. What the macro does is it looks up the item number based on the barcode that the scanner reads and brings up the item number, the item description, total of units in a case, how much a single box of the item will weigh and how many units in the inner box may be sold at one time. The trouble is that not all items have an image available so that the person who is doing the checking knows what the item looks like.

    There is a Logitech webcam setup to take pictures of the items. The following code allows us to import the image of the item into excel in a given cell:

    Please Login or Register  to view this content.
    Can this code be modified so that it not only imports the image to excel but also copy the image from the webcam and move it out to the hard drive so that it can be resaved using the item number?

    When the image is resaved with product number it is associated with the database. The associated image then comes up when the barcode is read from the scanner.

    If it isn't possible to move an image from a webcam to the hard drive is there an alternative that can still achieve the same result?

    I've used Microsoft Excel 2007 VBA to write the program to do the job but I had to be careful to make sure it was backwords compatible with Excel 2003 so that the QC department can use it.

    Thanks,
    Tim Martin
    Last edited by Tim_Martin; 03-04-2009 at 02:14 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Transferring an image from webcam to hard drive

    Hello Tim,

    Welcome to The Forum!

    You haven't really given much specific information about this problem. Like, what is your database? Is it simply an Excel workbook, an Access database, or another type of database? Is your example the only code that Logitech has provided to interface the camera to Excel?

    Are the webcam images different from what are copied to the worksheet? If it is being moved from the hard drive, where is it going?
    Can this code be modified so that it not only imports the image to excel but also copy the image from the webcam and move it out to the hard drive so that it can be resaved using the item number?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-10-2009
    Location
    Norwalk, Ohio, USA
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    3

    Re: Transferring an image from webcam to hard drive

    Hello,

    The database we use is BusinessVision. BusinessVision is another database. We don't use Access.

    The sample code that I posted earlier was generated by the macro recorder. The two lines of code didn't come from Logitech. I had already tried earlier today to see if the macro recorder would generate code that would have the camera copy an image out to the hard drive but it didn't work.

    The image that goes in the worksheet is the same image that is in the camera's memory. We only need images that are not in BusinessVision. Once we can get images to the hard drive I can have Excel rename it to the product number of the item and have it copy the image to a specific folder. After the image is copied to a folder an email gets sent out letting another individual know where the image is and he or she takes care of associating the image in BusinessVision. When the next time the item that had its image taken gets checked again maybe months down the road the person checking the product will be able to move more quickly.

    After an item gets checked the data gets saved to a different sheet within the same workbook and the data is cleared off of the certification spreadsheet for the next item to be checked.

    I do, apologize. I should have explained it better on what we are trying to do. I hope I cleared things up a little.

    Sincerely,
    Tim Martin

  4. #4
    Registered User
    Join Date
    02-10-2009
    Location
    Norwalk, Ohio, USA
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    3

    Re: Transferring an image from webcam to hard drive

    Hi, Leith:

    I've answered the questions you asked in response to my questions about transferring images from a webcam to the hard drive. Can you please get back to me about how to accomplish this? I would greatly appreciate it.

    Thanks,
    Tim Martin

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Transferring an image from webcam to hard drive

    Hello Tim,

    I can't help you with this. I don't know BussinessVision and I know nothing about LogiTech's web cams. Hopefully, someone else can help you with this.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Transferring an image from webcam to hard drive

    If you want to access info directly from the webcam you best bet is to seek advice from the manufacturer about whether the device can be controlled via code.

    If you just want to save the image that is already on the excel worksheet then you can use Stephen Bullen's PastePicture code to do that.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1