CHDK quick install Guide 

This guide was based off the canon powershot s100.

It might work for other cameras but,

if it does not work for your camera visit

Prepare your SD card for more help and info.

Step 1

Download and run camera version 1.3 to get camera version.
http://chdk.setepontos.com/index.php?topic=4743.0
(ACID is good too by the way….I have both )

Camera Version 1.3

CameraVersion1.3

ACID

ACID

This one hangs for a bit sometimes

when you try to use it

Step 2

Browse your computer and then Open a picture taken with your

camera with the program to get your camera version number.

Step 3

Locate and download correct CHDK version from:
http://www.mighty-hoernsche.de/trunk/

S100 trunk

Step 4

Unzip the files on your computer.

SD card reader

For the next’ few

steps you need’ an

SD card reader

step 5

make your sd card bootable
(I used EOScard 1.2, can be found here http://pel.hu/getpage.php?ac=2 or here http://pel.hu/down/)

(Press refresh, click on chdk, then hit save, and your done)

EOScard 1.2

Step 6

Place CHDK files on the root of the SD card.

SD card root

Step 7

Lock the card by sliding the small switch and place the SD card in the camera.

SD card Lock switch

Step 8

A.

To start CHDK in play mode:

Press and hold the play button until the CHDK logo appears.

  • while in play mode half press shutter takes you to shooting mode.

B.

To start CHDK in Shooting mode (does not work on all cameras):

Press and hold on/off button until the CHDK logo appears.

  • while in shooting mode press and hold the play button to go to play mode

CHDK LOGO

Source: CHDK quick install Guide | CHDK Wiki | Fandom

Script commands | CHDK Wiki | Fandom

Additional uBASIC and Lua Scripting Commands
get_config_value
set_config_value
get_movie_status
get_video_recording
set_movie_status
get_video_button
get_display_mode
get_propset
get_zoom_steps
get_exp_count
get_drive_mode
get_flash_mode
get_flash_ready
get_IS_mode
get_orientation_sensor
get_min_av96
get_max_av96
get_nd_present
get_nd_value_ev96
get_nd_current_ev96
get_histo_range
shot_histo_enable
autostarted
get_shooting
get_ev
set_ev
get_autostart & set_autostart
get_temperature
select/case function
changed RANDOM command
playsound
print_screen
get_time
get_mode
get_quality
get_resolution
set_quality
set_resolution
get_platform_id
set_backlight()
set_lcd_display()
set_draw_title_line
get_draw_title_line
get_sd_over_modes
set_aflock
set_mf
set_aelock
set_record(state)
set_capture_mode_canon(value)
set_capture_mode(modenum)
is_capture_mode_valid(modenum)
get_capture_mode
set_console_layout
set_console_autoredraw
console_redraw
reboot([file])
restore
set_exit_key
set_yield
get_curve_file
set_curve_file
get_curve_state
set_curve_state
get_focus_mode
get_focus_state
get_focus_ok
get_focal_length
get_min_stack_dist
set_file_attributes
get_partitionInfo
swap_partitions
get_buildinfo
get_dofinfo
get_video_details
textbox
get_raw_support
get_digic
set_clock
set_focus_interlock_bypass
APEX96 Conversion Functions
iso_to_sv96
sv96_to_iso
iso_real_to_market
iso_market_to_real
sv96_real_to_market
sv96_market_to_real
aperture_to_av96
av96_to_aperture
usec_to_tv96
tv96_to_usec
seconds_to_tv96
APEX96 Example Lua Script
Live View Exposure Functions
get_imager_active
get_current_tv96
get_current_av96

Source: Script commands | CHDK Wiki | Fandom

Setup a Motion Detection Webcam in Ubuntu

Don’t you hate it when people use your computer without your permission? Worst still, your laptop is stolen and you have no idea who stole it. If your laptop comes with a webcam, you can easily set up motion detection software to find out who is using your computer when you are not around. If you have a spare computer at home, you can also use it as a surveillance camera. We have shown you how to do so in Windows, and this article will show you how to set up a motion detection webcam in Ubuntu.

The software that we are using is Motion. This is one useful tool that can monitor the video signal from a webcam and take screenshots when it detects a motion (i.e. when a significant part of the picture has changed). While we are dealing with Ubuntu in this article, Motion will work for most Linux distro as well.

Installing Motion

Motion is included in the Ubuntu repository, so you can install it by clicking here, via the Ubuntu Software Center, or by simply typing the following command in the terminal:

Configuring Motion

Before we start configuring Motion, we need to copy the config file to our Home folder so that the master copy won’t be affected. Open a terminal and copy the configuration file to your Home folder.

Note: The above commands will create a hidden folder “.motion” in your Home directory.

Once you have done the copying, you can open the file for editing.

There are plenty of options that you can customize in the config file, but there are only a few things that we are interested in. Scroll down the list to find the following settings:

Daemon – Changing this to “on” will make it run in daemon mode. Applications in daemon mode will run in the background and start automatically when the computer starts. The default option is “off” where you need to start the application manually in terminal.

motion-start-in-daemon-mode

Width – This is the width of the images taken by the webcam. The default is 320, but you can set your own value here. Note that the width is limited by your webcam’s capability. My webcam is only capable of taking images up to 350px, so a value of 320 works fine for me.

Height – The height of the images taken by the webcam. Similarly, it is limited by your webcam’s capability.

framerate – how often you want the image to be captured per second. The default is 2 (2 frames/images taken per second). The higher value you set, the more computing resources it will require.

Motion detection thresold – the number of changed pixels in an image before it is captured. The default is 1500. If you want to make it more sensitive, set it to a lower value.

motion-detection-threshold

output_normal – This will determine whether it will save the motion to images. The default option is “on,” which means pictures will be saved as long as motion is detected. You can set it to “first,” “best,” “center” to get it to save only a limited number of images. This will prevent your folder from having an overwhelming number of images. If you just need the video streaming mode, you can set it to “off” to prevent it from saving any pictures.

motion-output-normal

target_dir – This is the directory where the images are saved. If you have installed Dropbox (or any other cloud storage service), you can set the target directory to be within your Dropbox folder so you can view the images from another location.

Note: There are plenty of other options that you can config, but we won’t be covering them here.

Once you are done with the configuration, press “Ctrl + o” to save the changes and “Ctrl + x” to exit.

Starting motion

In the terminal, type:

This will start the motion server. If everything goes well, you will start seeing pictures showing up in the target directory.

motion-pictures-in-target-directory

There is also a swf live streaming video that you can open in your media player. If you are accessing from a remote location, you can access the IP address of your computer (with port 8081) to view the video (or http://localhost:8081 in your local computer). The control center is accessible at port 8080.

motion-video-access-from-browser

Managing the saved images remotely

As I mentioned earlier, the best way is to save the images into your Dropbox folder so you can access it anywhere you want. However, if you prefer to have the images uploaded to your own file server (via FTP), you can use the command wput to upload the images.

In the config file, scroll down the list till you see a field “on_picture_save value“. Change it to:

where the “user”, “password” and “server” are details that you need to fill in.

Autostart Motion on boot up

If you like Motion to autostart every time you boot up your computer, all you have to do is to add an entry to the Startup Application.

motion-in-startup-application

Conclusion

While it may seems like a complicated task, setting up a motion detection webcam in Ubuntu is actually a very easy job. What other method do you use to set up your webcam as a surveillance camera? Let us know in the comments.

Source: Setup a Motion Detection Webcam in Ubuntu

Got an Old Canon Point-and-Shoot Camera? Hack It – IEEE Spectrum

A decade is a long time in technology—long enough for a technology to go from hot product to conspicuously obsolete to retro cool. In 2010, IEEE Spectrum’s David Schneider wrote about a hack to supplant the firmware in Canon point-and-shoot cameras and add new features, such as motion detection. As it turns out, at the time point-and-shoot cameras were near their zenith of popularity. Since then, while compact stand-alone digital cameras are still being made, their sales have shrunk dramatically. As the smartphone camera became the most ubiquitous type of camera on the planet, point-and-shoot cameras found themselves relegated to the back of the closet.

That was certainly the case with our Canon PowerShot S80. My wife bought it in 2008 primarily to document her paintings in between professional photo shoots, and a few years later we replaced it with a mirrorless Nikon 1 J-1 with interchangeable lenses. So when I found the S80 while decluttering recently, I wondered: Was it just e-waste now, or could it be combined with today’s technology to do interesting things?

I decided the perfect test case for my S80 was variable time-lapse photography. This is a task for which even an 11-year-old digital camera, with its larger optics, can compete with today’s smartphones on image quality. This scenario makes mobility a moot point, but the task also requires more sophistication than even CHDK—the open-source firmware replacement David Schneider wrote about in 2010—can easily offer alone.

My S80’s original firmware had a function that would take a photograph at fixed intervals of between 1 and 60 minutes, in 1-minute increments. CHDK provides a script that allows a more fine-grained increment of 1 second, but I wanted to try time-lapse photography of the Empire State Building, which we happen to have a good view of from Spectrum’s New York office. During the day, the light changes slowly, so I wanted to shoot one photo every few minutes. At dusk, however, the lighting on and around the building changes more dramatically, so I wanted photos taken at a faster rate.

The first thing was to test my camera. It’s a credit to Canon that despite years of disuse, all the parts sprang to life. The only problem was on the battery side. I had three batteries, one of which refused to charge at all, and two others I no longer trusted for a long-duration experiment, so I found a DC adapter on eBay that powers the camera from a wall socket.

Then I installed CHDK. Fortunately, this is one of those rare pieces of open-source software for which the documentation is a comprehensive and intelligible wiki. Looking up the instructions for my S80, I determined its current firmware, which turned out to be 1.00f. Only the 1.00g version is compatible with CHDK, so I followed the instructions to upgrade the factory firmware, the biggest obstacle to which was finding the right utility software to open the 7z format that the firmware file was compressed with.

A cross-platform tool called Stick makes finishing the CHDK install easy: Drop a photo taken with a camera onto the tool’s interface and it analyzes the metadata and downloads the exact version of CHDK required onto a SD card. Launching CHDK on my camera just requires putting the prepared card in and pressing the S80’s “shortcut” button.

CHDK provides an interface for remote control of the camera via the USB link normally used to download photographs directly to a PC. A number of programs can use this PTP standard, including chdkptp, which offers both a command line version and a graphical user interface (GUI) version that lets you see what is being displayed in the viewfinder screen live. One of the nice things about chdkptp is that a precompiled binary, bundled with required supporting libraries, is available for the Raspberry Pi, thus eliminating dependency hell.

I ran into two problems, which were resolved after searches of CHDK’s user forums. The first was that chdkptp couldn’t connect to the S80—a helper process on the Pi was grabbing the connection, assuming I wanted to download photos. The simplest solution was to find the offending process using a “ps -ax | grep gphoto2” command, and “kill -9” it. (This works only on a per-session basis; if you want to permanently disable the helper, you’ll have to edit some deep configuration files.)

My camera and chdkptp could now connect, but I still couldn’t actually take a photo. This was solved by writing a script with some mode commands I found on a forum. CHDK runs the script when I press the camera’s shutter, and then it is happy to accept remote commands.

To implement my variable time-lapse schedule, I wrote a short Python program on the Pi. I looked up the time of the sunset and set the Python program to check the clock. Outside a half-hour window around sunset it would take a photo every 10 minutes, and one every 30 seconds inside the window. To control the S80, I just issued an OS call to the chdkptp command line tool that connected and triggered the shutter—that is, os.system(“./chdkptp.sh -c -eshoot”).

I left the system running from the early afternoon till dusk, and when I returned I had 113 images, which I dumped into iMovie to make a time-lapse video. Ta-da!

Now that I have my proof of concept, it would be a straightforward task to write a Python script that could download the times of sunrise and sunset and adjust itself automatically. I can also save images directly to the Pi. Then I could access and download these images remotely over a wireless network, allowing for the option of leaving the camera and Pi in place for long periods of time for truly epic time-lapse movies.

This article appears in the December 2019 print issue as “Hack Your Old Point-and-Shoot.”

Source: Got an Old Canon Point-and-Shoot Camera? Hack It – IEEE Spectrum

CHDK Dummies Guide 2nd Edition

CHDK : Quick Start

If you don’t want to read this short guide, or the somewhat longer official CHDK User Manual , here’s a quick list of what you need to do to load and run CHDK.

  1. Download and install the STICK utility from this link >: STICK
  2. Run STICK to configure your SD card and install CHDK.
  3. Put the SD card’s lock switch into the “locked” position and put the card into your camera.
  4. Start your camera normally. You should see the red CHDK logo appear for a few seconds.
  5. Press the defined <ALT> key  for your camera to enter CHDK mode. The <ALT> key is usually either the PRINT or PLAY button. However, some cameras use the DISP, VIDEO, HELP or FACE buttons so you might have to try different buttons to find the right one.
  6. Press the MENU button in <ALT> mode to access the CHDK configuration menus.  Press the FUNC/SET button to bring up the scripting menu.
  7. Press the shutter button in <ALT> mode to run the currently loaded script.
  8. Exit <ALT> by pressing the <ALT> button again. Override settings and onscreen display option will now enabled while you are back in normal Canon mode.

Source: CHDK Dummies Guide 2nd Edition | CHDK Wiki | Fandom