Re: Getting a hook from shell mode to do motion detection?
Tomas Alonso <[email protected]>
| Newsgroups | gmane.comp.multimedia.gphoto.user |
|---|---|
| Message-ID | <2814982.Nc6teNHCQj@alonso-desktop> |
Hi Alan, I have upploaded a new version of the program at the same location conga.oan.es/~alonso/intruderDetector.zip Almost everything possible is done, and tests with Canon show nice results. Among the remaining final touches are to solve the reload of the server page with high fps or how to trigger several consecutive shots faster from shell mode, if that is possible. There are some new options in the program, I think I have tested all except to keep a copy of the shots in the camera. Last time FTP did not work because I forgot to add the jsch library to the classpath in the launching command. In the web server there is an option to pause the live view and later resume it. The resume process will reload the configuration. You can use that to edit the mask in the config.txt file to obtain what you need, since the mask is shown in the current reference (left side). Let me know how it goes with your cameras, Regards, Tomas. El Viernes, 5 de enero de 2018 17:50:16 usted escribió: > Hmm, of course being Java you could do a local GUI (Swing) but a > web-based interface would be more versatile. > > I ended up with 7 D-Link IP cams and they put up a grid over a live > image or a recent capture where the user can check squares to enable > motion detection in a segment. The cameras I have are only 640x480 > but they can also FTP, most of the configuration options can be > controlled over the web, and they do this over wired or wifi internet. > Each by default powers up at a 192.168/16 IP address, you connect and > start configuring. Each has its own web server. A Raspberry Pi with > some remote-controlable camera could make a higher-quality equivalent. > There are a bunch of little ARM machines that could do it like > Beaglebones, and being Java it's portable > > On 1/5/18, Tomas Alonso <[email protected]> wrote: > > Great! Next week I will do what remains: fix SFTP uppload, faster change > > between live and shot modes, and a control interface using probably a web > > server. > > > > El Viernes, 5 de enero de 2018 13:33:06 usted escribió: > >> OK, original config back and the Nikon works. I had set the server > >> name to upstairs because that's the host name of the machine, which > >> the DHCP-DNS link picks up so for example http://upstairs/index.html > >> works, even over wifi from phones. I set the directory world > >> writeable but nothing ended up in there from either camera. Both ftp > >> and sftp normally work. > >> > >> Reading UPDATE_REF 3600 // sec, -1 => never update reference (int) > >> Reading RESAMPLE 320 // width, -1 => no resample (int) > >> Reading THRESHOLD_BR 10 // brightness % change to trigger global > >> movement > >> (int) Reading THRESHOLD_PX 10 // brightness % change to trigger pixel > >> movement (int) Reading MOVING_PIX_PER 5 // % of pixels with gray level > >> change greater than threshold to trigger local movement (int) > >> Reading FPS -2 // fps of live view, < 0 for <1 fps (-2 => > >> 0.5 fps) (int) > >> Reading NSHOTS 3 // number of shots to take after detecting > >> movement (int) > >> Reading MAX_SHOTS 1000 // maximum number of shots to take (int) > >> Reading EXTENSION .jpg // extension in lowercase for the new relevant > >> images Reading RENAME true // true to rename shots to > >> 'shot_xxx.jpg', > >> false otherwise > >> Reading SERVER null // server to uppload images > >> Reading USER null // user login name > >> Reading PASSW null // user password > >> Reading REMOTE_DIR null // remote dir inside the server to store the > >> images (or null) > >> Reading MASK // image mask to detect movement (- => > >> masked, + => detect movement here). Any size, must be last element in > >> config file > >> Using gphoto 2.5.15 (libgphoto2 2.5.16) > >> Detected cameras: > >> Nikon DSC D5200 usb:001,012 > >> Executing command: gphoto2 --auto-detect > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --list-config > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/imgsettings/iso > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/capturesettings/shutterspeed > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/capturesettings/f-number > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/imgsettings/imagesize > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/settings/capturetarget > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/actions/manualfocusdrive > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/actions/viewfinder > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/actions/bulb > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/capturesettings/focallength > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/status/batterylevel > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/capturesettings/imagequality > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/imgsettings/iso > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/settings/capturetarget > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/imgsettings/imagesize > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/capturesettings/shutterspeed > >> Executing command: gphoto2 --camera "Nikon DSC D5200" --port > >> usb:001,012 --get-config /main/actions/bulb > >> Possible values of ISO > >> 100 > >> 125 > >> 160 > >> 200 > >> 250 > >> 320 > >> 400 > >> 500 > >> 640 > >> 800 > >> 1000 > >> 1250 > >> 1600 > >> 2000 > >> 2500 > >> 3200 > >> 4000 > >> 5000 > >> 6400 > >> 8000 > >> 10000 > >> 12800 > >> 25600 > >> Possible values of SHUTTER_SPEED > >> 0.0002s > >> 0.0003s > >> 0.0004s > >> 0.0005s > >> 0.0006s > >> 0.0008s > >> 0.0010s > >> 0.0012s > >> 0.0015s > >> 0.0020s > >> 0.0025s > >> 0.0031s > >> 0.0040s > >> 0.0050s > >> 0.0062s > >> 0.0080s > >> 0.0100s > >> 0.0125s > >> 0.0166s > >> 0.0200s > >> 0.0250s > >> 0.0333s > >> 0.0400s > >> 0.0500s > >> 0.0666s > >> 0.0769s > >> 0.1000s > >> 0.1250s > >> 0.1666s > >> 0.2000s > >> 0.2500s > >> 0.3333s > >> 0.4000s > >> 0.5000s > >> 0.6250s > >> 0.7692s > >> 1.0000s > >> 1.3000s > >> 1.6000s > >> 2.0000s > >> 2.5000s > >> 3.0000s > >> 4.0000s > >> 5.0000s > >> 6.0000s > >> 8.0000s > >> 10.0000s > >> 13.0000s > >> 15.0000s > >> 20.0000s > >> 25.0000s > >> 30.0000s > >> Bulb > >> Possible values of APERTURE > >> f/5 > >> f/5.6 > >> f/6.3 > >> f/7.1 > >> f/8 > >> f/9 > >> f/10 > >> f/11 > >> f/13 > >> f/14 > >> f/16 > >> f/18 > >> f/20 > >> f/22 > >> f/25 > >> f/29 > >> f/32 > >> Possible values of RESOLUTION > >> 6000x4000 > >> 4496x3000 > >> 2992x2000 > >> Possible values of CAPTURE_TARGET > >> Internal RAM > >> Memory card > >> Possible values of FOCUS > >> 200 > >> -200 > >> 1000 > >> -1000 > >> 5000 > >> -5000 > >> Possible values of VIEWFINDER > >> Possible values of ZOOM > >> 1 > >> 5 > >> Possible values of ZOOM_POSITION > >> Possible values of BULB > >> Possible values of FOCAL_LENGTH > >> 0.01 > >> -0.01 > >> 0.02 > >> -0.02 > >> 0.03 > >> -0.03 > >> Possible values of BATTERY_LEVEL > >> Possible values of NIKON_QUALITY > >> JPEG Basic > >> JPEG Normal > >> JPEG Fine > >> NEF (Raw) > >> NEF+Basic > >> NEF+Normal > >> NEF+Fine > >> Starting live view > >> Entering shell (from dir /usr/src/misc/alonso/3/intruderDetector/): > >> /bin/bash Executing shell command: gphoto2 --camera "Nikon DSC D5200" > >> --port usb:001,012 --quiet --shell > >> > >> Executing shell command: capture-preview > >> > >> Executing shell command: get-config /main/capturesettings/focallength > >> > >> Executing shell command: capture-preview > >> > >> Executing shell command: capture-preview > >> > >> Executing shell command: get-config /main/capturesettings/focallength > >> > >> Executing shell command: capture-preview > >> > >> Executing shell command: capture-preview > >> > >> Executing shell command: get-config /main/capturesettings/focallength > >> > >> Executing shell command: capture-preview > >> > >> Executing shell command: capture-preview > >> > >> Global move: 13/10. Local move: 71.45143/5 > >> Executing shell command: set-config /main/actions/viewfinder=0 > >> > >> Finishing shell > >> Move detected ! > >> Executing command (from dir /usr/src/misc/alonso/3/intruderDetector/): > >> gphoto2 --camera "Nikon DSC D5200" --port usb:001,012 -F 3 -I 1 > >> --set-config-index /main/imgsettings/iso=0 --set-config-index > >> /main/capturesettings/shutterspeed=51 --set-config-index > >> /main/capturesettings/f-number=0 --set-config-index > >> /main/imgsettings/imagesize=0 --set-config-index > >> /main/settings/capturetarget=1 --set-config-index > >> /main/capturesettings/imagequality=0 --capture-image-and-download > >> --no-keep ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot