Author Topic: "Homemade" Webcam  (Read 25979 times)

wurzelmac

  • Storm
  • *****
  • Posts: 1361
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
Re: "Homemade" Webcam
« Reply #30 on: June 19, 2016, 02:27:23 PM »
Irving,

there is an error in your command:
Irving-Dunns-iMac:~ irvingdunn$ gphoto2 --set-config zoom=2 --capture-image-and-download

Try this instead:
Irving-Dunns-iMac:~ irvingdunn$ gphoto2 --set-config-value /main/settings/zoom=2 --capture-image-and-download

Cheers,
Reinhard


idunn

  • Strong Breeze
  • ***
  • Posts: 158
  • name: idunn
    • icantono2
    • Magpie Hill
  • Station Details: WS1080, iMac 10.9.5, Canon Powershot A510 zoomed with gphoto2, located at 950m in Gross Switzerland, Webcam view SE to Alps on magpie-hill.com on WeatherCloud (MagpieHill) and Wunderground (ID icantono2)
Re: "Homemade" Webcam
« Reply #31 on: June 19, 2016, 04:11:15 PM »
Reinhard,

Something irregular happens with my camera. Your suggestion I used and first it gave a simple error. Using it a second time gave a downloaded photo and the zoom between 0 and 0 message. Also the gphoto2 --list-config now only gives an error, whereas before it listed the variables. I will wait until I get the A510 before doing any more gphoto2ing.

Thanks,  Irving


idunn

  • Strong Breeze
  • ***
  • Posts: 158
  • name: idunn
    • icantono2
    • Magpie Hill
  • Station Details: WS1080, iMac 10.9.5, Canon Powershot A510 zoomed with gphoto2, located at 950m in Gross Switzerland, Webcam view SE to Alps on magpie-hill.com on WeatherCloud (MagpieHill) and Wunderground (ID icantono2)
Re: "Homemade" Webcam
« Reply #32 on: June 30, 2016, 11:43:56 AM »
Hi Reinhard,
Would like to report major success in my effort to copy your webcam technology.  [bounce] 
I bought a PowerShot A510 3.2 mp for 8? from Ebay Kleinanzeigen. Tested it with your scripts. The list-config gives
Irving-Dunns-iMac:~ irvingdunn$ gphoto2 --list-config
/main/actions/focuslock                                                       
/main/actions/opcode
/main/settings/datetime
/main/settings/ownername
etc
Using the command
 gphoto2 --set-config zoom=3 --capture-image-and-download
I was able to change manually zoom= 0 through 8 and save the photos.
I tested the camera with the long cable to my Logitech but it did not work.  It is 10m but only 5m is powered. I am getting a 10m shielded powered usb cable from China soon.
Next to do is to test some more complex scripts, like the one you sent.
Also I will want to think of some external power, 3.15V, to the camera.
Hopefully all will work out.

Irving

wurzelmac

  • Storm
  • *****
  • Posts: 1361
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
Re: "Homemade" Webcam
« Reply #33 on: June 30, 2016, 06:13:29 PM »
Nice to hear!

 [tup]
Reinhard


idunn

  • Strong Breeze
  • ***
  • Posts: 158
  • name: idunn
    • icantono2
    • Magpie Hill
  • Station Details: WS1080, iMac 10.9.5, Canon Powershot A510 zoomed with gphoto2, located at 950m in Gross Switzerland, Webcam view SE to Alps on magpie-hill.com on WeatherCloud (MagpieHill) and Wunderground (ID icantono2)
Re: "Homemade" Webcam
« Reply #34 on: July 03, 2016, 05:43:52 PM »
Hi Reinhard,

My new old Canon A510 gives a 3.2mp image and good gphoto2 control.
With the below command which includes time interval (I), zoom setting and also the filename overwritten each time, I am able to do most of what I want.

gphoto2 --set-config zoom=5 -I 20 --capture-image-and-download --force-overwrite --filename webcamtest3.jpg

For some reason it will continue indefinitely, which is good, and thus provide a photo for frequent uploading to WC. I would think setting for every 10 min, or 600s, would be enough. I need to get a long USB cable and AC power. Do you use a normal power attachment for your cameras? 

Hope all is well, Irving

idunn

  • Strong Breeze
  • ***
  • Posts: 158
  • name: idunn
    • icantono2
    • Magpie Hill
  • Station Details: WS1080, iMac 10.9.5, Canon Powershot A510 zoomed with gphoto2, located at 950m in Gross Switzerland, Webcam view SE to Alps on magpie-hill.com on WeatherCloud (MagpieHill) and Wunderground (ID icantono2)
Re: "Homemade" Webcam
« Reply #35 on: July 04, 2016, 05:09:44 PM »
Hi Reinhard,
Some more on gphoto2. I think it would be easy for anyone to follow a recipe for using a better camera and zoomable camera instead of a webcam video. Here is part of a recipe I would recommend for the Powershot 510, which can be bought used for $20.  Attached are three photos taken with this camera at 3 zoom positions, which show the advantage of zooming in a weather webcam.
Remaining for me to check out is the use of a powered 10m USB cable and a power source for the camera.

Irving

In this test I turned on the camera with auto and playback positions.
I found it is necessary to let the camera take a photo before it will recognise the zoom. So I use the killall PTPCamera command twice and then the
full command: gphoto2 --set-config zoom=5 -I 300 --capture-image-and-download --force-overwrite --filename webcamtest4.jpg
I let it take 2 photos without zooming then stop it by closing the terminal window. The camera remains on with the lens out. I then choose a new terminal window and inserted the full command again. The camera will then adjust the zoom, here to 5,  and take photos every 300 seconds in this example. Each photo is overwritten and saved as webcamtest4.jpg in the home directory. During this time the camera window remains dark and the lens remains in the zoomed position.

Here is the terminal window log of the operation for the first 4 photos with zoom=5, Interval=300, overwriting the file and saving as webcamtest4.jpg

Irving-Dunns-iMac:~ irvingdunn$ gphoto2 --set-config zoom=5 -I 300 --capture-image-and-download --force-overwrite --filename webcamtest4.jpg
Time-lapse mode enabled (interval: 300s).                                     
Capturing frame #1...
New file is in location /store_00010001/DCIM/100CANON/IMG_0018.JPG on the camera
Saving file as webcamtest4.jpg                                                 
Deleting file /store_00010001/DCIM/100CANON/IMG_0018.JPG on the camera
Waiting for next capture slot 294 seconds...
Capturing frame #2...
New file is in location /store_00010001/DCIM/100CANON/IMG_0018.JPG on the camera
Saving file as webcamtest4.jpg                                                 
Deleting file /store_00010001/DCIM/100CANON/IMG_0018.JPG on the camera
Waiting for next capture slot 295 seconds...
Capturing frame #3...
New file is in location /store_00010001/DCIM/100CANON/IMG_0018.JPG on the camera
Saving file as webcamtest4.jpg                                                 
Deleting file /store_00010001/DCIM/100CANON/IMG_0018.JPG on the camera
Waiting for next capture slot 295 seconds...
Capturing frame #4...
New file is in location /store_00010001/DCIM/100CANON/IMG_0018.JPG on the camera
Saving file as webcamtest4.jpg                                                 
Deleting file /store_00010001/DCIM/100CANON/IMG_0018.JPG on the camera
Waiting for next capture slot 294 seconds...


wurzelmac

  • Storm
  • *****
  • Posts: 1361
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
Re: "Homemade" Webcam
« Reply #36 on: July 04, 2016, 06:45:23 PM »
Hello Irving,

VERY cool pictures!!! Glad you got it.  [bounce]

Quote
I think it would be easy for anyone to follow a recipe for using a better camera and zoomable camera instead of a webcam video.
YESSS - signed.

 :)
Reinhard


elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
I wish I had *that* to point my webcam at! (Re: "Homemade" Webcam)
« Reply #37 on: July 04, 2016, 10:58:25 PM »
Dear Irving, Reinhard, and WeatherCat scenery lovers,

I think it would be easy for anyone to follow a recipe for using a better camera and zoomable camera instead of a webcam video.

Honestly, I've never had much interest in upgrading my webcam because . . . there really isn't anything very beautiful to point it at.  However, in your case - I understand!  [bounce]

Thanks for sharing the beautiful images!

Cheers, Edouard  [cheers1]

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: "Homemade" Webcam
« Reply #38 on: July 04, 2016, 11:22:46 PM »
But, Edouard you could possibly discover the mystery about where those Salamanders are coming from? Salamandridae trackers want to know!
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


idunn

  • Strong Breeze
  • ***
  • Posts: 158
  • name: idunn
    • icantono2
    • Magpie Hill
  • Station Details: WS1080, iMac 10.9.5, Canon Powershot A510 zoomed with gphoto2, located at 950m in Gross Switzerland, Webcam view SE to Alps on magpie-hill.com on WeatherCloud (MagpieHill) and Wunderground (ID icantono2)
Re: "Homemade" Webcam
« Reply #39 on: July 06, 2016, 07:32:11 PM »
Hi Reinhard,
I have mounted my Powershot 510 camera in a little plastic kitchen box with a plexiglass window, as I did my Logitech. Now with the help of gphoto2 it is merrily taking 3x zoom photos every 600s and storing on my iMac with the same name. I am sending them to WC and on to WG and Wcloud. The originals are very sharp but WC is doing something to them that makes them fuzzy. I wonder if I need to format them somehow. Have you had this problem?

Looks like a bit of dry weather coming.

Irving

http://www.magpie-hill.com/

https://www.wunderground.com/personal-weather-station/dashboard?ID=ICANTONO2

https://app.weathercloud.net/d0841365846#profile

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: "Homemade" Webcam
« Reply #40 on: July 06, 2016, 10:40:59 PM »
What format (jpeg/jpg/tiff/tif/etc.), pixel and dimensions does the camera/gphoto2 produce? All those images appear to be quite small. I'm capturing jpg images 1,280 x 720 pixels. It's also important to have all the apps that are editing the images to be using the same height to width ratio. In my example;1,280 x 720 could be changed to 620 x 360 or 320 x 180. But you can usually get by with odd number divisors; 853 x 480, for example. You can always reduce the size of an image but rarely increase it without creating problems (jaggies).
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


idunn

  • Strong Breeze
  • ***
  • Posts: 158
  • name: idunn
    • icantono2
    • Magpie Hill
  • Station Details: WS1080, iMac 10.9.5, Canon Powershot A510 zoomed with gphoto2, located at 950m in Gross Switzerland, Webcam view SE to Alps on magpie-hill.com on WeatherCloud (MagpieHill) and Wunderground (ID icantono2)
Re: "Homemade" Webcam
« Reply #41 on: July 07, 2016, 04:53:03 AM »
My images now are 2048x1536 JPEG, 914KB. WC reduces them to 150KB because this is the max for WU. I guess there is also a size limit. The attached image is 145KB and 10x7.5cm. It still looks ok.  This was reduced with Preview. But I am not sure I am able to do this reduction automatically. I have to see what the camera can do.

Irving

idunn

  • Strong Breeze
  • ***
  • Posts: 158
  • name: idunn
    • icantono2
    • Magpie Hill
  • Station Details: WS1080, iMac 10.9.5, Canon Powershot A510 zoomed with gphoto2, located at 950m in Gross Switzerland, Webcam view SE to Alps on magpie-hill.com on WeatherCloud (MagpieHill) and Wunderground (ID icantono2)
Re: "Homemade" Webcam
« Reply #42 on: July 11, 2016, 01:15:44 PM »
Greetings Reinhold and All,
As I wrote earlier I got my Powershot A510, 3.2MP, connected with gphoto2. The command I use is simply
gphoto2 --set-config zoom=3 -I 600 --capture-image-and-download --force-overwrite --filename pwrwebcam4.jpg
This sets the zoom to 3, takes a shot every 600sec and replaces and stores it with the filename pwrwebcam4.jpg.  This allows me to set this on WC, which sends it to my Simple Web at www.magpie-hill.com
I noticed I was getting fuzzy results with some image tests with WC. After many emails with Stu he figured out that this was because I was doing these tests with Preview, which was set to 180 dpi. WC expects 72 dpi (normal screen resolution) and this was causing an incompatibility. So he and I found that sending the original camera image is best. My camera images are now set at about 400KB and WC squeezes them down to about 80KB.
My long USB cable problem is solved with one of 10m from China. I need now to get a power source for my camera, as batteries do not last long. I have ordered one but wonder if it will stand up to 24h running. Reinhold, what are you using for your cameras? If anyone is interested I think that I and Reinhold can give you guidance as how to setup a cheap used camera for this webcam purpose.

Irving

Blicj11

  • Storm
  • *****
  • Posts: 3941
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Ventura 13.6 | Sharx SCNC2900 Webcam | WeatherCat 3.3 | Supportive Wife
Re: "Homemade" Webcam
« Reply #43 on: July 11, 2016, 01:25:42 PM »
The photo resolution and size are great, Irving. This is an interesting thread. Thanks to Reinhard and you for sharing.
Blick


wurzelmac

  • Storm
  • *****
  • Posts: 1361
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
Re: "Homemade" Webcam
« Reply #44 on: July 11, 2016, 06:40:22 PM »
Irving,

glad you done it with your Canon A510.

Some regards to the size of the webcam photo:
I do not use WeatherCat for uploading the pictures of my webcam - they upload themselves to my webspace (all done via terminal script) and once they are there, I link them into my website.

By the way, I do not know if WeatherUnderground is picking up this photos. Their service is bad (in my opinion), so I do not care about them.

Cheers,
Reinhard