capture photo in Access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rattanak Song

    capture photo in Access

    Hi,

    I'm trying to build a database which can capture a still image from a
    digital camera or web cam and import to the database via an Object or
    something like that.
    Any help would be very appreciated.

    Rattanak


  • Trevor Best

    #2
    Re: capture photo in Access

    On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases. ms-access,
    "Rattanak Song" <tommynsong@com cast.net> wrote:
    [color=blue]
    >Hi,
    >
    >I'm trying to build a database which can capture a still image from a
    >digital camera or web cam and import to the database via an Object or
    >something like that.
    >Any help would be very appreciated.[/color]

    Your best best is to store the pictures on disk as jpgs and have a
    text field that points to their location as storing imagages in the
    database is very resource hungry. You can use the image control to
    display the jpgs on the screen. Below is a batch file I use to get
    pictures off my camera, most cameras nowadays will create a USB mass
    storage device when connected to the PC so will appear like a
    removable disk. Path names might want changing to suit.

    --- begin download.bat --
    @echo off
    echo Looking for camera...
    set d=
    rem next two lines wrap in newsreader
    for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
    exist %%i:\DCIM\100_F UJI\*.jpg set d=%%i

    if (%d%)==() goto error
    echo off

    for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i goto conflict

    dir %d%:\DCIM\100_F UJI\*.jpg
    copy %d%:\DCIM\100_F UJI\*.jpg .
    echo.
    echo Attempting Remove pics from camera
    rem next two lines wrap in newsreader
    for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i del
    %d%:\DCIM\100_F UJI\%%i
    echo Fin.
    echo.
    if exist %d%:\DCIM\100_F UJI\*.jpg echo Pictures still exist on camera.
    if exist %d%:\DCIM\100_F UJI\*.jpg pause
    set d=
    goto eoj

    :conflict
    echo *** Error ***
    echo Name conflicts exist
    rem next two lines wrap in newsreader
    for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i echo %%i already
    exists on HDD
    rem next two lines wrap in newsreader
    echo You must resolve these conflicts before this download can take
    place
    pause
    goto eoj

    :error
    echo Cannot find camera.
    pause

    :eoj
    --- end download.bat ---

    --
    A)bort, R)etry, I)nfluence with large hammer.

    Comment

    • Rattanak Song

      #3
      Re: capture photo in Access

      Thanks,

      Rattanak

      "Trevor Best" <bouncer@localh ost> wrote in message
      news:fmcbsv0rj4 lirpojbo655icj7 74k4cn35c@4ax.c om...[color=blue]
      > On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases. ms-access,
      > "Rattanak Song" <tommynsong@com cast.net> wrote:
      >[color=green]
      > >Hi,
      > >
      > >I'm trying to build a database which can capture a still image from a
      > >digital camera or web cam and import to the database via an Object or
      > >something like that.
      > >Any help would be very appreciated.[/color]
      >
      > Your best best is to store the pictures on disk as jpgs and have a
      > text field that points to their location as storing imagages in the
      > database is very resource hungry. You can use the image control to
      > display the jpgs on the screen. Below is a batch file I use to get
      > pictures off my camera, most cameras nowadays will create a USB mass
      > storage device when connected to the PC so will appear like a
      > removable disk. Path names might want changing to suit.
      >
      > --- begin download.bat --
      > @echo off
      > echo Looking for camera...
      > set d=
      > rem next two lines wrap in newsreader
      > for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
      > exist %%i:\DCIM\100_F UJI\*.jpg set d=%%i
      >
      > if (%d%)==() goto error
      > echo off
      >
      > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i goto conflict
      >
      > dir %d%:\DCIM\100_F UJI\*.jpg
      > copy %d%:\DCIM\100_F UJI\*.jpg .
      > echo.
      > echo Attempting Remove pics from camera
      > rem next two lines wrap in newsreader
      > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i del
      > %d%:\DCIM\100_F UJI\%%i
      > echo Fin.
      > echo.
      > if exist %d%:\DCIM\100_F UJI\*.jpg echo Pictures still exist on camera.
      > if exist %d%:\DCIM\100_F UJI\*.jpg pause
      > set d=
      > goto eoj
      >
      > :conflict
      > echo *** Error ***
      > echo Name conflicts exist
      > rem next two lines wrap in newsreader
      > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i echo %%i already
      > exists on HDD
      > rem next two lines wrap in newsreader
      > echo You must resolve these conflicts before this download can take
      > place
      > pause
      > goto eoj
      >
      > :error
      > echo Cannot find camera.
      > pause
      >
      > :eoj
      > --- end download.bat ---
      >
      > --
      > A)bort, R)etry, I)nfluence with large hammer.[/color]


      Comment

      • Xavi

        #4
        Re: capture photo in Access

        Hi,

        I found a sample database that access directly to a webcams api and
        you can capture a photo pushing a command button and paste it to an
        image control.
        I got the same problem as you and this was a great solution for me.

        Please, let me know if you are interested on it and I will send you a
        message directly.

        Regards,

        "Rattanak Song" <tommynsong@com cast.net> wrote in message news:<zMednZYRP aAiGluiRVn-vA@comcast.com> ...[color=blue]
        > Thanks,
        >
        > Rattanak
        >
        > "Trevor Best" <bouncer@localh ost> wrote in message
        > news:fmcbsv0rj4 lirpojbo655icj7 74k4cn35c@4ax.c om...[color=green]
        > > On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases. ms-access,
        > > "Rattanak Song" <tommynsong@com cast.net> wrote:
        > >[color=darkred]
        > > >Hi,
        > > >
        > > >I'm trying to build a database which can capture a still image from a
        > > >digital camera or web cam and import to the database via an Object or
        > > >something like that.
        > > >Any help would be very appreciated.[/color]
        > >
        > > Your best best is to store the pictures on disk as jpgs and have a
        > > text field that points to their location as storing imagages in the
        > > database is very resource hungry. You can use the image control to
        > > display the jpgs on the screen. Below is a batch file I use to get
        > > pictures off my camera, most cameras nowadays will create a USB mass
        > > storage device when connected to the PC so will appear like a
        > > removable disk. Path names might want changing to suit.
        > >
        > > --- begin download.bat --
        > > @echo off
        > > echo Looking for camera...
        > > set d=
        > > rem next two lines wrap in newsreader
        > > for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
        > > exist %%i:\DCIM\100_F UJI\*.jpg set d=%%i
        > >
        > > if (%d%)==() goto error
        > > echo off
        > >
        > > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i goto conflict
        > >
        > > dir %d%:\DCIM\100_F UJI\*.jpg
        > > copy %d%:\DCIM\100_F UJI\*.jpg .
        > > echo.
        > > echo Attempting Remove pics from camera
        > > rem next two lines wrap in newsreader
        > > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i del
        > > %d%:\DCIM\100_F UJI\%%i
        > > echo Fin.
        > > echo.
        > > if exist %d%:\DCIM\100_F UJI\*.jpg echo Pictures still exist on camera.
        > > if exist %d%:\DCIM\100_F UJI\*.jpg pause
        > > set d=
        > > goto eoj
        > >
        > > :conflict
        > > echo *** Error ***
        > > echo Name conflicts exist
        > > rem next two lines wrap in newsreader
        > > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i echo %%i already
        > > exists on HDD
        > > rem next two lines wrap in newsreader
        > > echo You must resolve these conflicts before this download can take
        > > place
        > > pause
        > > goto eoj
        > >
        > > :error
        > > echo Cannot find camera.
        > > pause
        > >
        > > :eoj
        > > --- end download.bat ---
        > >
        > > --
        > > A)bort, R)etry, I)nfluence with large hammer.[/color][/color]

        Comment

        • Rattanak Song

          #5
          Re: capture photo in Access

          Hi,

          That would be great for me.
          I'm looking forward for your message.

          Regard,

          Rattanak

          "Xavi" <xavirius@acons a.infonegocio.c om> wrote in message
          news:e12c17ff.0 311280224.705ae 7bf@posting.goo gle.com...[color=blue]
          > Hi,
          >
          > I found a sample database that access directly to a webcams api and
          > you can capture a photo pushing a command button and paste it to an
          > image control.
          > I got the same problem as you and this was a great solution for me.
          >
          > Please, let me know if you are interested on it and I will send you a
          > message directly.
          >
          > Regards,
          >
          > "Rattanak Song" <tommynsong@com cast.net> wrote in message[/color]
          news:<zMednZYRP aAiGluiRVn-vA@comcast.com> ...[color=blue][color=green]
          > > Thanks,
          > >
          > > Rattanak
          > >
          > > "Trevor Best" <bouncer@localh ost> wrote in message
          > > news:fmcbsv0rj4 lirpojbo655icj7 74k4cn35c@4ax.c om...[color=darkred]
          > > > On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases. ms-access,
          > > > "Rattanak Song" <tommynsong@com cast.net> wrote:
          > > >
          > > > >Hi,
          > > > >
          > > > >I'm trying to build a database which can capture a still image from a
          > > > >digital camera or web cam and import to the database via an Object or
          > > > >something like that.
          > > > >Any help would be very appreciated.
          > > >
          > > > Your best best is to store the pictures on disk as jpgs and have a
          > > > text field that points to their location as storing imagages in the
          > > > database is very resource hungry. You can use the image control to
          > > > display the jpgs on the screen. Below is a batch file I use to get
          > > > pictures off my camera, most cameras nowadays will create a USB mass
          > > > storage device when connected to the PC so will appear like a
          > > > removable disk. Path names might want changing to suit.
          > > >
          > > > --- begin download.bat --
          > > > @echo off
          > > > echo Looking for camera...
          > > > set d=
          > > > rem next two lines wrap in newsreader
          > > > for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
          > > > exist %%i:\DCIM\100_F UJI\*.jpg set d=%%i
          > > >
          > > > if (%d%)==() goto error
          > > > echo off
          > > >
          > > > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i goto conflict
          > > >
          > > > dir %d%:\DCIM\100_F UJI\*.jpg
          > > > copy %d%:\DCIM\100_F UJI\*.jpg .
          > > > echo.
          > > > echo Attempting Remove pics from camera
          > > > rem next two lines wrap in newsreader
          > > > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i del
          > > > %d%:\DCIM\100_F UJI\%%i
          > > > echo Fin.
          > > > echo.
          > > > if exist %d%:\DCIM\100_F UJI\*.jpg echo Pictures still exist on camera.
          > > > if exist %d%:\DCIM\100_F UJI\*.jpg pause
          > > > set d=
          > > > goto eoj
          > > >
          > > > :conflict
          > > > echo *** Error ***
          > > > echo Name conflicts exist
          > > > rem next two lines wrap in newsreader
          > > > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i echo %%i already
          > > > exists on HDD
          > > > rem next two lines wrap in newsreader
          > > > echo You must resolve these conflicts before this download can take
          > > > place
          > > > pause
          > > > goto eoj
          > > >
          > > > :error
          > > > echo Cannot find camera.
          > > > pause
          > > >
          > > > :eoj
          > > > --- end download.bat ---
          > > >
          > > > --
          > > > A)bort, R)etry, I)nfluence with large hammer.[/color][/color][/color]


          Comment

          • Larry  Linson

            #6
            Re: capture photo in Access

            If it is a _sample_, why not post a hyperlink here so others can take a look
            at it, too?

            "Xavi" <xavirius@acons a.infonegocio.c om> wrote in message
            news:e12c17ff.0 311280224.705ae 7bf@posting.goo gle.com...[color=blue]
            > Hi,
            >
            > I found a sample database that access directly to a webcams api and
            > you can capture a photo pushing a command button and paste it to an
            > image control.
            > I got the same problem as you and this was a great solution for me.
            >
            > Please, let me know if you are interested on it and I will send you a
            > message directly.
            >
            > Regards,
            >
            > "Rattanak Song" <tommynsong@com cast.net> wrote in message[/color]
            news:<zMednZYRP aAiGluiRVn-vA@comcast.com> ...[color=blue][color=green]
            > > Thanks,
            > >
            > > Rattanak
            > >
            > > "Trevor Best" <bouncer@localh ost> wrote in message
            > > news:fmcbsv0rj4 lirpojbo655icj7 74k4cn35c@4ax.c om...[color=darkred]
            > > > On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases. ms-access,
            > > > "Rattanak Song" <tommynsong@com cast.net> wrote:
            > > >
            > > > >Hi,
            > > > >
            > > > >I'm trying to build a database which can capture a still image from a
            > > > >digital camera or web cam and import to the database via an Object or
            > > > >something like that.
            > > > >Any help would be very appreciated.
            > > >
            > > > Your best best is to store the pictures on disk as jpgs and have a
            > > > text field that points to their location as storing imagages in the
            > > > database is very resource hungry. You can use the image control to
            > > > display the jpgs on the screen. Below is a batch file I use to get
            > > > pictures off my camera, most cameras nowadays will create a USB mass
            > > > storage device when connected to the PC so will appear like a
            > > > removable disk. Path names might want changing to suit.
            > > >
            > > > --- begin download.bat --
            > > > @echo off
            > > > echo Looking for camera...
            > > > set d=
            > > > rem next two lines wrap in newsreader
            > > > for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
            > > > exist %%i:\DCIM\100_F UJI\*.jpg set d=%%i
            > > >
            > > > if (%d%)==() goto error
            > > > echo off
            > > >
            > > > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i goto conflict
            > > >
            > > > dir %d%:\DCIM\100_F UJI\*.jpg
            > > > copy %d%:\DCIM\100_F UJI\*.jpg .
            > > > echo.
            > > > echo Attempting Remove pics from camera
            > > > rem next two lines wrap in newsreader
            > > > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i del
            > > > %d%:\DCIM\100_F UJI\%%i
            > > > echo Fin.
            > > > echo.
            > > > if exist %d%:\DCIM\100_F UJI\*.jpg echo Pictures still exist on camera.
            > > > if exist %d%:\DCIM\100_F UJI\*.jpg pause
            > > > set d=
            > > > goto eoj
            > > >
            > > > :conflict
            > > > echo *** Error ***
            > > > echo Name conflicts exist
            > > > rem next two lines wrap in newsreader
            > > > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i echo %%i already
            > > > exists on HDD
            > > > rem next two lines wrap in newsreader
            > > > echo You must resolve these conflicts before this download can take
            > > > place
            > > > pause
            > > > goto eoj
            > > >
            > > > :error
            > > > echo Cannot find camera.
            > > > pause
            > > >
            > > > :eoj
            > > > --- end download.bat ---
            > > >
            > > > --
            > > > A)bort, R)etry, I)nfluence with large hammer.[/color][/color][/color]


            Comment

            • Mark

              #7
              Re: capture photo in Access

              Trevor Best <bouncer@localh ost> wrote in message news:<fmcbsv0rj 4lirpojbo655icj 774k4cn35c@4ax. com>...[color=blue]
              > On Thu, 27 Nov 2003 01:40:11 -0600 in comp.databases. ms-access,
              > "Rattanak Song" <tommynsong@com cast.net> wrote:
              >[color=green]
              > >Hi,
              > >
              > >I'm trying to build a database which can capture a still image from a
              > >digital camera or web cam and import to the database via an Object or
              > >something like that.
              > >Any help would be very appreciated.[/color]
              >
              > Your best best is to store the pictures on disk as jpgs and have a
              > text field that points to their location as storing imagages in the
              > database is very resource hungry. You can use the image control to
              > display the jpgs on the screen. Below is a batch file I use to get
              > pictures off my camera, most cameras nowadays will create a USB mass
              > storage device when connected to the PC so will appear like a
              > removable disk. Path names might want changing to suit.
              >
              > --- begin download.bat --
              > @echo off
              > echo Looking for camera...
              > set d=
              > rem next two lines wrap in newsreader
              > for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if
              > exist %%i:\DCIM\100_F UJI\*.jpg set d=%%i
              >
              > if (%d%)==() goto error
              > echo off
              >
              > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i goto conflict
              >
              > dir %d%:\DCIM\100_F UJI\*.jpg
              > copy %d%:\DCIM\100_F UJI\*.jpg .
              > echo.
              > echo Attempting Remove pics from camera
              > rem next two lines wrap in newsreader
              > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i del
              > %d%:\DCIM\100_F UJI\%%i
              > echo Fin.
              > echo.
              > if exist %d%:\DCIM\100_F UJI\*.jpg echo Pictures still exist on camera.
              > if exist %d%:\DCIM\100_F UJI\*.jpg pause
              > set d=
              > goto eoj
              >
              > :conflict
              > echo *** Error ***
              > echo Name conflicts exist
              > rem next two lines wrap in newsreader
              > for %%i in (*.jpg) do if exist %d%:\DCIM\100_F UJI\%%i echo %%i already
              > exists on HDD
              > rem next two lines wrap in newsreader
              > echo You must resolve these conflicts before this download can take
              > place
              > pause
              > goto eoj
              >
              > :error
              > echo Cannot find camera.
              > pause
              >
              > :eoj
              > --- end download.bat ---[/color]

              =============== =============== =============== ======
              Have you guys got it right please let me now!! I'll do enything!!!!
              technology@webm ail.co.za

              Comment

              • NB

                #8
                Re: capture photo in Access

                xavirius@aconsa .infonegocio.co m (Xavi) wrote in message news:<e12c17ff. 0311280224.705a e7bf@posting.go ogle.com>...[color=blue]
                > Hi,
                >
                > I found a sample database that access directly to a webcams api and
                > you can capture a photo pushing a command button and paste it to an
                > image control.[/color]


                Where does it store the image? on disk as a separate file or inside
                mdb?
                I am interested in looking at it too. Pls provide link or email to
                nickbose at softhomedotnet

                I figure the ideal interface should be:
                - you can view the live image from the webcam within the Access form
                - upon pressing a command button: you will be asked for file location
                to save the captured image
                - the path then will be stored in a text field in Access
                - the image control will be updated to show that captured image

                I think the real challenge is to integrate the first 2 steps into
                Access form

                Thks
                NB

                Comment

                • Trevor Best

                  #9
                  Re: capture photo in Access

                  On 15 Dec 2003 17:10:51 -0800 in comp.databases. ms-access,
                  nickbose@lycos. com (NB) wrote:
                  [color=blue]
                  >xavirius@acons a.infonegocio.c om (Xavi) wrote in message news:<e12c17ff. 0311280224.705a e7bf@posting.go ogle.com>...[color=green]
                  >> Hi,
                  >>
                  >> I found a sample database that access directly to a webcams api and
                  >> you can capture a photo pushing a command button and paste it to an
                  >> image control.[/color]
                  >
                  >
                  >Where does it store the image? on disk as a separate file or inside
                  >mdb?
                  >I am interested in looking at it too. Pls provide link or email to
                  >nickbose at softhomedotnet
                  >
                  >I figure the ideal interface should be:
                  >- you can view the live image from the webcam within the Access form
                  >- upon pressing a command button: you will be asked for file location
                  >to save the captured image
                  >- the path then will be stored in a text field in Access
                  >- the image control will be updated to show that captured image
                  >
                  >I think the real challenge is to integrate the first 2 steps into
                  >Access form[/color]

                  If you're interested, I wrote this app
                  (http://www.trevor.easynet.co.uk/downloads/Images.zip) for viewing
                  images, it does no capturing itself from within Access neither does it
                  do any organisation of images but it's something you can build on. The
                  images themselves will be on disk rather in the database, which IMHO
                  is the best way, it avoids bloat and overhead of storing BMP
                  representations of jpegs that Access does. Methods of getting from
                  camera to disk vary, WinXP has it built in or there's the batch file I
                  posted earlier in this thread.

                  (http://www.trevor.easynet.co.uk/down...Images2000.zip for 2K
                  users, A97 users, ask here and I'll convert and upload for you).

                  --
                  A)bort, R)etry, I)nfluence with large hammer.

                  Comment

                  • NB

                    #10
                    Re: capture photo in Access

                    Trevor Best <bouncer@localh ost> wrote in message news:<g3sutvgp8 45tft9333uuqtml hp3ht46kbm@4ax. com>...
                    [color=blue]
                    > If you're interested, I wrote this app
                    > (http://www.trevor.easynet.co.uk/downloads/Images.zip) for viewing
                    > images, it does no capturing itself from within Access neither does it[/color]


                    Thks for the link. However, your app doesn't seem to handle live
                    (motion) images from a webcam at all? (that's what I'm very interested
                    in)
                    I understand that storing images outside Access is now almost a
                    standard approach because of the mdb bloating problem.

                    NB

                    Comment

                    • Ryan

                      #11
                      Re: capture photo in Access

                      I'd definately store the image on your drive somewhere and reference
                      it from the application. It's very easy to do this and will end up
                      being far quicker and won't bloat the db. I've done that on one of my
                      apps (link below) and can give you some code to help if you need it.

                      You can use FileSystemObjec ts to handle copying the images to the
                      correct directory if it makes things easier, and then only show the
                      image when you view the current record.

                      Oh, and look out for the registry setting if you keep getting an
                      annoying pop up box (and progress bar) saying that it is importing the
                      image, you can turn it off quite easily. I can't get to the registry
                      on my work's PC, but I think it's
                      HKEY_Local_Mach ines\Software\M icrosoft\Graphi cs Filters\Jpeg\Op tions\
                      set show dialog to No (if I remember correctly).

                      Best of luck.

                      Ryan





                      Comment

                      Working...