manualshive.com logo in svg
background image

Содержание Camera

Страница 1: ......

Страница 2: ...The Canon Camera Hackers Manual ...

Страница 3: ......

Страница 4: ...Berthold Daum The Canon Camera Hackers Manual Teach Your Camera New Tricks ...

Страница 5: ...ly Media 1005 Gravenstein Highway North Sebastopol CA 95472 All product names and services identified throughout this book are trademarks or regis tered trademarks of their respective companies They are used throughout this book in editorial fashion only No such uses or the use of any trade name are intended to convey endorsement or other affiliation with the book No part of the material protected...

Страница 6: ...my camera 11 3 3 Downloading the CHDK 12 3 4 Manual installation 13 3 5 The warranty question 14 4 Teach Your Camera New Tricks 17 4 1 Using menus 17 4 2 Customizing the user interface 18 4 2 1 OSD Codepage 18 4 2 2 Fonts 18 4 2 3 Colors 19 4 2 4 Organizing the screen 19 4 2 5 User menus 22 4 2 6 Grids 22 4 2 7 Miscellaneous Values 24 4 2 8 Customizing the DOF calculator 26 4 2 9 Other user interf...

Страница 7: ...More video options 64 4 9 Remote control 66 4 9 1 CHDK remote control functions 66 4 9 2 Building a simple remote control 67 4 9 3 SDM functions 68 4 9 4 Extra hardware 69 4 9 5 Tethered shooting 69 4 10 Utilities 70 4 10 1 File browser 70 4 10 2 Text file reader 71 4 10 3 Getting information about the camera 72 4 11 Novelty 73 4 11 1 Games 73 4 11 2 Flashlight 74 4 12 The CHDK configuration file ...

Страница 8: ...5 5 1 Button related commands 112 5 5 2 Exposure related commands 114 5 5 3 Focus related commands 119 5 5 4 Zoom related commands 120 5 5 5 Flash related commands 121 5 5 6 Image related commands 121 5 5 7 Time related commands 122 5 5 8 Display related commands 122 5 5 9 Image management commands 123 5 5 10 Camera state 124 5 5 11 Low level commands Lua only 126 5 5 12 The library capmode lua Lu...

Страница 9: ... viewing composite stereo images 217 7 7 3 Stereo focus stacking 217 7 7 4 Synchronized cameras 218 7 7 5 Synchronized flash 221 7 8 Digiscoping 222 7 9 Scripting 224 8 Kites Balloons and Multikopters 231 8 1 Kite Aerial Photography 231 8 2 Balloon based photography 232 8 3 Motorized flying platforms 233 8 4 Other unattended operations 233 9 A Look across the Fence 235 9 1 Canon EOS CHDK 235 9 2 C...

Страница 10: ...mory card and that enhances the camera with many new features In the above mentioned space missions the CHDK determined when to begin shooting and in what intervals In the case of the SD 1100 IS the CHDK also ran a shutter priority exposure program that the camera normally does not offer These are only a few tricks that the CHDK has up its sleeve RAW shoot ing live histograms remote control ultras...

Страница 11: ... platforms is discussed in chapter 8 Chapter 9 takes a short look at similar camera enhancement projects such as the EOS CHDK MagicLantern which turns the Canon EOS 5D into a professional movie camera and the Pentax project Finally the appendix contains information on using memory cards of more than 4 GB with the CHDK There is a section with important web links and another section with tips in cas...

Страница 12: ...rry the suffix IS in their name Optical means that a lens element is moved to counteract camera shake With this tech nique it is possible to increase exposure times by a factor of 2 16 1 4 f stops when shooting without a tripod An image stabilizer is a very useful feature especially for telephoto shots and for shooting in low light conditions Most Canon cameras use CCD charge coupled device type s...

Страница 13: ...s allow for manual control of focus shutter speed aperture and ISO With the CHDK manual control of focus and ex posure is achieved for all models within the physical limits of the camera of course All Canon cameras are equipped with an internal flash unit Some larger cameras offer the option of connecting an external flash as well Unfortu nately not all cameras allow fine tuned manual control of t...

Страница 14: ...X1 IS SX10 IS SX20 IS SX100 IS SX110 IS and SX200 IS The distinction between the operating systems is important because some CHDK scripting functions depend on the operating systems Scripts utilizing these functions usually run only on the platform they were devel oped for or they must implement special provisions for cross platform op eration Developing platform dependent scripts is fine for home...

Страница 15: ...ublic attention to the CHDK More developers joined the CHDK community This initially resulted in different branches of the CHDK each with its own set of special functions Particularly notable are MX3 s build with motion detection Fingalo s build with much improved uBasic scripting functionality and USB support and Juciphox s build with support for Lua scripting Today the official CHDK the MoreBest...

Страница 16: ...hat the CHDK can do for you RAW images One of the most outstanding functions of the CHDK and historically the first is the ability to deliver and process RAW sensor data The popularity of RAW image processing relies on the fact that RAW files contain the full in formation gathered by the sensor The JPEG format in contrast resamples the 10 12 or 14 bit pixel values down to an 8 bit scheme This can ...

Страница 17: ...t the need for extra hardware More control Most Canon compact cameras operate automatically If they offer a manual mode it enables you to dial in correction values for exposure but does not allow you to set explicit values for shutter speed aperture or ISO speed or to focus manually The CHDK in contrast enables you to do exactly that Not only is it possible to dial in precise values for shutter sp...

Страница 18: ...k in video mode where it could be useful for connecting different takes Remote control While Canon EOS cameras allow full remote control there are no provi sions of that kind for most compact cameras Again the CHDK adds that feature to supported compact cameras and enables remote control through the camera s USB port including shutter release zooming and the possibility of remote functionality in ...

Страница 19: ...10 CH APTER 2 Cameras and Operating Systems ...

Страница 20: ... build of the CHDK To be more precise each firmware version of the camera s operating system requires its own CHDK build So once you have established that your camera model is sup ported by the CHDK2 you have to find out the firmware version of your camera Normally your camera does not show this information It must be en abled to do so and this is done by placing a small file named ver req for ver...

Страница 21: ...k on the link to start the download The website actually lists two downloadables for each camera and each firmware version a complete bundle with CHDK example scripts fonts and other goodies and a smaller version with just the core CHDK Don t hesitate to download the larger version the difference of 200 KB is hardly noticeable even on the tiny 256 MB cards supplied with your camera Before the down...

Страница 22: ...tallation CardTricks is a Windows based program If you work with a Mac3 or with Linux you will not be able to use it though it might be possible through an emulator But there is another method to get the CHDK up and running 1 First format the card with the FAT16 file system This must be done with a card reader and a computer the camera would format your card with FAT32 On the Macintosh invoke the ...

Страница 23: ...tched on until you disengage the write protection lock Once you have installed the CHDK on your card you should as a matter of fact avoid formatting your card to get rid of images Formatting would also delete the CHDK and require a complete reinstallation Instead you have two options for deleting obsolete pictures f Use the camera s original delete functions to delete images Switch the camera to P...

Страница 24: ... firmware in any way Reformat the card or use a fresh card and the CHDK is gone The camera continues to run under its original firmware In fact before sending in the camera for warranty you should remove any memory cards from the camera A camera equipped with a CHDK enabled card may disturb service technicians and make their job difficult In addition the card may also contain images that you don t...

Страница 25: ...16 CH APTER 3 ...

Страница 26: ...CHDK menu is almost as simple as invoking the native menu Switch to the ALT mode by pressing the ALT button and then press the MENU button You can exit the menu by pressing the MENU button again or by pressing the ALT button which will also leave ALT mode and return to normal mode Some menus are too large to be displayed on the screen In this case the menu shows a scroll bar at the right hand side...

Страница 27: ... can change the language of the CHDK menus The language of the native camera menus is changed separately Consult your camera s user manual to do so You can change the OSD Codepage to allow for different national characters You can also select between plain bold serif and sans serif fonts in different sizes and switch between differently sized symbols 10 or 16 pixels 4 2 1 OSD Codepage By default t...

Страница 28: ...the screen There fore it becomes mandatory to select the information carefully and to ar range its layout properly Otherwise you would be overwhelmed by an information overload that would be disturbing in shooting situations in stead of being helpful Most of these settings are found in the submenu OSD Let s discuss these settings one by one f Show OSD Here you can specify whether you want to show ...

Страница 29: ...ptical temperature is the temperature of the lens elements and is the closest one to the environment temperature The temperature reading is in degrees Celsius if the following menu entry in Fahrenheit is not switched on f OSD Layout Editor This entry allows you to modify the layout of the OSD information items on the screen For this purpose the CHDK organizes the information items into groups hist...

Страница 30: ...tage f Filespace The Filespace showing submenu controls the display of mem ory space information It determines whether to show a filespace icon and a vertical or horizontal space bar The length and thickness of the bar can be controlled in the subentries Size on screen and Width Height The free space in the memory card can be shown as a percentage of its total capacity or as an absolute value in M...

Страница 31: ...ct OnDirect will automatically launch the user menu when you switch to the ALT mode saving you a click on the MENU button The MENU button however can still be used to launch the main menu or to leave all menus Alternatively you can set User Menu Enable to On and enable the option User Menu as Root This will immediately launch the user menu when you press the MENU button in ALT mode Another click o...

Страница 32: ...identity photos passports identity cards driving licenses etc The large red ellipse shows the maximum head size the small green ellipse the minimum head size The gray area is where the eyes have to be f rulecross rulecr 1 on DryOS A grid typically used in aerial photogra phy and micro macro photography f rulers Similar to rulecross but without the crosshair pattern f sports A grid simulating a spo...

Страница 33: ...ntry Adapter Lens Scale For example if you use a telephoto converter with a factor of 1 75 dial in the value 175 This setting will be used to display the focal length or the zoom factor correctly and also to compute the depth of field correctly section 4 2 8 The remainder of the display options are exposure related The exposure system of Canon cameras is engineered along the APEX system Additive S...

Страница 34: ... 6 times higher than the real ISO value probably for marketing purposes Therefore the nickname Market ISO I M Set Exposure Ev The effective Exposure Value computed from shutter speed and aperture Tv Av Evs Measured Ev The Exposure Value computed from scene brightness and sensor speed Bv Sv Evm Set Bv The Brightness Value computed from shutter speed aperture and sensor speed Tv Av Sv Bvs Measured B...

Страница 35: ...ct distance as determined by the AF system or as set manually S SD Near Limit The near limit of sharpness R1 NL Far Limit The far limit of sharpness R2 FL Hyperfocal Dist The minimum distance that must be set to achieve sharpness until infinity The near limit is the hyper focal distance divided by 2 Hyp Hyp Depth of Field The difference between the near and far limits DOF DOF A bit disturbing is t...

Страница 36: ...ry to take a photo immediately after switching on the camera If hidden the only visual indication of the CHDK booting is a short flash of the blue LED f Startup sound A short beep can be used to indicate that the CHDK has booted up f Use zoom buttons for MF This entry is only available on cameras with manual focus It allows a more precise setting of the manual focus by using the zoom buttons g A S...

Страница 37: ...in automatic mode and you override the exposure time only the camera will automatically choose the right aperture the camera will be in Shutter priority Tv exposure mode But not all cameras can do this Cameras equipped with an ND filter instead of a diaphragm cannot adjust the aperture and completely revert to manual mode In this case you must adjust the ND filter state and the ISO speed yourself ...

Страница 38: ...100 Shutter halfpress LEFT f G7 Shutter halfpress UP f All other cameras Shutter halfpress DOWN Optionally the Overrides state On or Off can also be applied to the AutoISO feature section 4 3 2 and the Bracketing feature section 4 6 This is con trolled through the entry Include AutoIso Bracketing If the option is set AutoISO and Bracketing will be enabled if Disable Overrides is off and dis abled ...

Страница 39: ...shots section 4 5 6 In such a situation a sharp and noisy image is more useful than an unsharp image with less noise The noise can be remedied by averaging a dozen shots or so Even in the case of single shots there are options PC based noise re duction programs such as NoiseNinja or NeatImage can do a better job than the camera does and there are also some RAW converters with re spectable noise su...

Страница 40: ...d exposure time when shooting in low light The mode ISO AUTO puts the emphasis on im age quality It uses lower ISO values and longer exposure times and is therefore suited to subject matter without much movement such as land scapes or portraits In contrast ISO HI puts the emphasis on speed It uses higher ISO values resulting in more noise but shorter exposure times It is therefore better suited to...

Страница 41: ...s value according to your ability to hold the camera steady If you think that you can hold the camera quite steady or if you are able to lean your body against some solid object subtract 20 percent If you are quite shaky add 20 percent When the camera is mounted on a tripod dial in the smallest value possible 1 When shooting in a vibrating environment such as an airplane the User Factor which is l...

Страница 42: ...oo much contrast however it would be better to shoot an HDR bracketing series section 4 6 2 There is a lot to configure f Different histogram styles can be chosen in the entry Histogram Layout Figure 4 21 RGB Displays the sum of the red green and blue pixel values Y Displays the luminance component RGB Y Displays RGB above luminance R G B Three histograms one for each color RGB all Displays all fi...

Страница 43: ...34 CH APTER 4 Teach Your Camera New Tricks RGB Y RGB Y R_G_B RGB all Y all Blend Blend Y Figure 4 21 The different histogram styles ...

Страница 44: ...re is the Zebra feature While the histogram informs you about the tonal range of the complete image the Zebra feature identifies image areas that are under or overexposed These areas are displayed with a pattern overlaid on the image to make them stand out visually When enabled in the CHDK menu Zebra areas are displayed by half pressing the shutter The feature also works in Replay Mode when half p...

Страница 45: ... different colors depend ing on which color channel is overexposed For example if the blue channel is overexposed the Zebra pattern will be blue if both the red and green channels are overexposed the Zebra pattern will be yellow red green and if all channels are overexposed the Zebra pattern will be black The drawback of this mode is that it cannot show under exposed areas 4 3 5 High speed photogr...

Страница 46: ...ls across the sensor area just like the curtain slit travels across the focal plane Therefore CMOS sensors tend to distort fast objects similarly to the traditional focal plane shutter They also need slower synchronization speeds when using flash The CHDK can take control of the electronic shutter and offer shutter speeds down to 1 100 000 sec That is more than the cameras can physi cally do but i...

Страница 47: ...ld PC based programs like PhotoAcute can automatically register the images with each other and construct an almost noise free composite image But what if you want to visualize motion cars on the highway star tracks etc In these cases you need long to very long exposure times Without the CHDK you are lost But with the CHDK your options for night photography are extended in several ways f Shooting R...

Страница 48: ...wer signal to noise ratio The higher the amplification and the ISO speed the higher the noise Noise is a random phenomenon Therefore subtracting two independent noise sources from each other does not cancel out the noise In this case subtraction actually has the same effect as adding both noise signals This is the reason why Dark Frame Subtraction does not cancel out stochastic noise but rather in...

Страница 49: ...ine grained flash control with the option of controlling the flash power in 1 3 f stops but you can t have everything The three flash power settings of the CHDK are better than nothing The strong setting comes in handy Figure 4 24 This detail of a night shot shows massive graininess in the top image This was caused by setting the sensor speed to ISO 6400 market on a Canon Digital Elph 1100 IS Ixus...

Страница 50: ...he complete information without any loss Using a RAW converter you can properly compress the tonal range of the image to avoid drowned shadows and burned out highlights Is there no solution for shooting JPEGs In fact the CHDK offers one Curves can be used to do all kinds of tone mapping including contrast compression The result can be a JPEG with detail in both highlights and shadows Because curve...

Страница 51: ... from the web page http chdk wikia com wiki Software and from the book CD To install the editor simply copy it onto the desktop To create a new curve select a color channel or All in the Edit group then start setting and dragging points with the mouse You can save the curve by entering a name into the text field at the bottom then click Save Point This will create a CTC file that is a plain text p...

Страница 52: ...28 Application of the S curve from Figure 4 27 to an autumn scene The upper image was delivered as a DNG file the lower image as a JPEG file As you can see the JPEG image has more contrast in the midtones Figure 4 29 The photocells of the camera sensor are not sensitive to color The Bayer filter placed in front of the sensor assigns a specific color to each cell Red Green 1 Blue or Green 2 When th...

Страница 53: ...redeveloping the RAW file section 4 5 5 you can try out another curve As a matter of fact all of these modifications using curves would also be possible in a post processing stage at least when you opt to shoot RAW Image editing programs such as Photoshop or Paintshop Pro allow for such modifications of the tonal range However using curves in the camera may help you to realize your visualization o...

Страница 54: ...faster In the area of focusing the CHDK also adds functionality An explicit subject distance can be dialed in precisely to the millimeter This overrides the autofocus system as well as selected focus modes such as Macro or Infinity The value range is between 0 and 65535 mm with 65535 repre senting infinity The easiest way to dial in infinity is to start with zero and Figure 4 31 Dream landscape ob...

Страница 55: ...e highlights clipped So the camera has al ready made some decisions for you A RAW image on the other hand allows postponing these decisions to a later time You don t have to decide on processing parameters before taking a picture Instead you can make these decisions at the post process ing stage when the RAW image is developed on a PC or even in the cam era It is possible to play around and try di...

Страница 56: ...nnot be properly viewed on standard monitors A Wide Gamut Monitor is required to view the full color range So if your intention is to produce images for the web by all means go for sRGB because the majority of your audience will not be able to display the full range of AdobeRGB But if the printed image is your main concern go for AdobeRGB and consider a Wide Gamut Monitor for your next monitor Als...

Страница 57: ...titcher and ste reo programs don t accept RAW files JPEG is the preferred option here f Disable RAW Auto Mode You probably have your camera switched to Auto Mode for casual shots You would hardly need RAW images here For more serious shots where the RAW format makes sense you would switch your camera to Manual Mode because it gives you more control f Warn when Exception Optionally a warning can be...

Страница 58: ...he script badpixel lua This script which is included in the CHDK distribu tion will read the list of bad pixels as determined by the manufacturer from the camera s firmware To run the script switch the camera to Record ing Mode and invoke 1 Alt FUNC SET Load Script from File TEST BADPIXEL LUA 2 Press the shutter button The display will go dark and the camera will take two pictures After 20 30 seco...

Страница 59: ...el Removal works quite differently and only in connection with DNG A bad pixel map is created in advance In section 4 5 2 we already dis cussed how such a map is created When running the script badpixel lua grabs a bad pixel map from the camera normally used for the creation of JPEG images and stores it onto the card The map itself is created when the camera is manufactured and is part of the firm...

Страница 60: ...uch as Aperture Lightroom CaptureOne Helicon Filter BreezeBrowser SilkyPix DxO RawTherapee and others These programs have highly specialized tools for developing RAW images Many lens and sensor imperfections such as chromatic aberration pincushion distortion vignetting sensor noise and dead or hot pixels can be cor rected You will be surprised by the quality you can get from the lens of your compa...

Страница 61: ...on of DNG files 4 5 5 In camera RAW processing You don t necessarily need a PC to process RAW files With the CHDK it is possible to develop RAW files within the camera The selected RAW file will be converted into a JPEG file Why should you do this The advantage is that you can apply some processing parameters after a shot has been taken for example Color Accent Color Swap one of the choices in MyC...

Страница 62: ...ter button Instead of taking a shot the camera will read the RAW file and produce a JPEG file using the current camera settings 4 5 6 More RAW processing The possibilities don t stop with the RAW processing discussed in section 4 5 5 The context menu of the file browser see section 4 10 1 opens a whole new world of addititional RAW processing options You can reach the file browser through ALT MENU...

Страница 63: ...elop This function performs the same as the one discussed in section 4 5 5 but applies RAW development to all marked images f Purge RAW This function purges all orphaned RAW files but not DNG files that don t have a corresponding JPEG file from a selected folder When applied inside a folder it purges only orphaned RAW files that are not marked Therefore marking a file can protect it from the Purge...

Страница 64: ... Range HDR photography sec tion 4 6 2 has become fairly popular among serious amateur photogra phers The results often resemble a painting rather than a photograph During post processing you have many options for compressing the huge dynamic range into a smaller and printable or viewable dynamic range It is certainly a matter of personal preference and taste as to how the results will look Exposur...

Страница 65: ...m the original ISO value For example if you start with an ISO value of 100 an ISO Bracketing Value of 2 and a Value Factor of 10 you will end up with a series of 100 120 80 140 60 etc ISO bracketing is well suited for classical exposure bracketing when you need the perfectly exposed single image especially if AV bracketing is not available It is not as well suited for HDR work see above because th...

Страница 66: ...record an entire scene in one step and therefore should be able to capture all the contrast in a scene That of course is not yet possible Modern camera sensors can record a dynamic range of 11 13 LV a theoretical value that is lowered by noise and other imperfections In real world applications a camera sensor can cap ture a contrast range of 8 10 LV with good quality When showing an im age on an L...

Страница 67: ...nd wind leaves and branches move At night even the stars and the moon can cause problems f The illumination of the scene should not change during a bracketing series Otherwise it will be difficult for the HDR composer to put the images together correctly f It is certainly an advantage to put the camera on a tripod but modern HDR composers are able to register the single images with each other even...

Страница 68: ...ifferently and may get its pixels from a different source image With this method there is almost no blending of images Therefore it is well suited for images with moving objects in the scene Ghosts are hardly possible because most pixels come from only one source image After composition DRI and HDR go separate ways DRI immediately applies tone mapping to reduce the tonal range of the image to a vi...

Страница 69: ...rge view cameras to f 64 to obtain sharpness from near to far Large cameras with long focal lengths are in fact more affected by this problem than small cameras with short focal lengths Nevertheless small cameras also have their problems If they have a diaphragm you cannot and should not stop down too much Lenses with short focal lengths are subject to diffraction problems when stopped down too mu...

Страница 70: ...rest point of your subject a distance of 120 mm to the farthest point of your subject and a DOF of 12 mm you would end up with 2 120 60 12 10 exposures If you don t use manual focus to do the measurements you may want to switch your AF Frame to Center for precise focusing Now you can configure the camera If your camera features a manual focusing mode switch it on Now dial in the following values f...

Страница 71: ...arthest point of the subject matter Figure 4 39 Magnolia Canon Digital Elph 1100SD Ixus 80 IS 1 60 sec f 2 8 ISO 160 f 6 2 mm 38 mm Top left is the first shot in a series of nine images top right is the last At a near distance of 142 mm the measured DOF was 15 mm The Subj Dist Bracket Value was therefore set to 7 mm The whole covered range of sharpness is 10 x 7 70 mm Image composition was perform...

Страница 72: ...u want to register several images with one and the same reference image Edge overlays can be saved Save Edge Overlay to the folder CHDK EDGE on the memory card This allows you to use them at a later time The func tion Load Edge Overlay opens the file browser section 4 10 1 allowing you to select an edge overlay file For example if you want to photograph a tree at different times throughout the yea...

Страница 73: ...s Generally the clip length is restricted to 4 GB or one hour whichever is shorter Some older cameras only allow for 1 GB but the CHDK removes that limit In addition the CHDK allows you extended and fine grained control over video quality and compression You have the option in menu entry Video Mode to specify the quality either in terms of compression CBR mode Constant Bitrate or quality VBR mode ...

Страница 74: ... about the noise from the focus mechanism in the soundtrack The CHDK allows you to lift that restriction and enjoy a wide zoom range And the noise Well some editing of the soundtrack is required Unfortunately the Enable Optical Zoom function does not work on all cameras it doesn t on my SD1100 for example f Mute During Zooming This entry is not present on all cameras It allows you to mute the soun...

Страница 75: ...nes and the like The native mode for simple USB switches is enabled in the upper sec tion of the Remote parameters submenu f Enable Remote Enables the USB remote function When enabled the camera can be controlled through the USB port This setting applies both to scriptless and script mode Note Youmust disablethisentryifyouwant totransferimagesthrough the USB port to a PC Otherwise the PC would be ...

Страница 76: ... remote control and will fire USB Pins Pin Purpose Wire Color 1 VCC 5V Red 2 Data White 3 Data Green 4 Ground Black A USB cable release is relatively easy to build A small battery is needed to supply a voltage of not more than 5V Warning the USB specification al lows for a maximum of 5V Your camera might be damaged if you use a higher voltage The minimum voltage required depends on the camera You ...

Страница 77: ...e The head of the flashlight is stripped over the cable then the red wire is soldered to the positive contact 3 and the black wire to the negative contact The flashlight head is screwed on again and sealed with epoxy or hot glue 4 4 9 3 SDM functions The remaining functions in the Remote parameters submenu under the header synchable remote Figure 4 43 were originally developed in the Stereo Data M...

Страница 78: ...control device Some vendors are offering devices that can hook up to the camera s USB port and that are supported by the CHDK f The Ricoh CA1 USB remote control works with the CHDK functions listed under synchable remote The release button has a half pressed and a pressed position A double click is therefore not necessary to shoot a picture A single 1 5V AAA cell powers the device A built in DC DC...

Страница 79: ...tili ties and fun programs such as a file browser file reader calendar and games These programs can be accessed via ALT MENU Miscellaneous Stuff 4 10 1 File browser The file browser is invoked via ALT MENU Miscellaneous Stuff File Browser It is used to inspect the content of the memory card and to man age the files and folders found there Figure 4 47 Navigation in the file browser is easy Simply u...

Страница 80: ...d files are marked and marked files are un marked 4 10 2 Text file reader The Text File Reader is typically used to look into text files stored on the memory card For example you might want to look into the comments of a script file or read a README file or some other documentation As its name says the Text File Reader only allows reading files not modifying them It is also restricted to plain tex...

Страница 81: ...eader scroll auto matically Every time the specified Delay expires the reader scrolls down one page 4 10 3 Getting information about the camera Under ALT MENU Miscellaneous Stuff there are a few useful functions that display information about the camera f Show build info Shows the current version of the CHDK in use and re lated information f Show memory info Displays free memory available in the c...

Страница 82: ...ss the key in Alt mode then leave the Alt mode and change some camera settings then re turn to the Alt mode and press the key again The display will now show up to 12 Property Case values that have changed 4 11 Novelty Finally there are a few functions that seem to have absolutely nothing to do with photography But maybe you want to play a few games with your camera while you wait for the right sh...

Страница 83: ...e it as a flash light to find your way in the dark However it cannot act as a light source when you actually take a shot the camera turns the display dark at that very moment 4 12 The CHDK configuration file All of the choices that you make in the CHDK menus are stored on your memory card in the file CHDK CCHDK CFG This file can be edited on the PC too The CHDK Config File Editor CFGEDIT is a util...

Страница 84: ...4 12 The CHDK configuration file 75 Figure 4 49 The CHDK Config File Editor in action A double click on an entry opens a specific editor for the selected entry value ...

Страница 85: ...76 CH APTER 4 Teach Your Camera New Tricks ...

Страница 86: ...eed some adaptations to run on DIGIC III or DIGIC IV cameras and vice versa Therefore even if you do not plan to write your own scripts it is worth taking a closer look at CHDK script devel opment Newer builds of the CHDK support two scripting languages the simple uBasic and the more advanced Lua language The majority of existing scripts are written in uBasic simply because it s been supported by ...

Страница 87: ...ts with the built in flash Sometimes in low light conditions I forget to switch the flash off the flash fires and the mood is gone Here the CHDK can help A tiny script performs the necessary key presses to switch the flash off By loading the script flashoff lua and set ting the Autostart parameter to On I can make sure that this script is exe cuted at start up and that I always start with a disabl...

Страница 88: ...he Hugin panorama stitcher So let s jump right into another small script and see how uBasic looks these days A more systematic introduction into uBasic is given in the fol lowing sections The following script implements an electronic magnify ing glass by switching the camera into the Digital Macro mode and setting a predefined magnification level Also most of the info texts are hidden from the dis...

Страница 89: ...After each script line including comments the CHDK pauses for 10 milliseconds to let the camera do its work and look after user inputs Newer CHDK builds how ever allow for larger comment blocks they pause only once for up to 100 consecutive comment lines During initialization you should check the validity of the parameters and correct them as necessary We set the input parameter to its default val...

Страница 90: ...is value represents the DigitalMacro mode section 5 6 The subroutine mode will pick up that value press FUNC SET RIGHT FUNC SET repeatedly until this mode is reached Both subroutines display and mode are discussed below It s important to know that by simulating key presses we can reach any camera function via a script that we can reach manually It s good practice not to make assumptions about the ...

Страница 91: ... key pressed calls the corre sponding subroutine The keys zoom_in and zoom_out are the zoom rock ers and the key shoot_half is the half pressed shutter button The loop ends when the MENU button is pressed rem restore camera state s q gosub zoom gosub restor d o gosub display rem leave alt mode exit_alt end After the MENU button is pressed we clean up behind us and reset the camera to its original ...

Страница 92: ...finished so we can now release the shutter button zoom r get_zoom if r s then for n r to s click zoom_in sleep 200 next n else if r s then for n s to r click zoom_out sleep 200 next n endif return The subroutine zoom is used to set the initial zoom level or to restore it at the end of the script First it asks get_zoom for the current zoom level If the desired zoom level in variable s is larger tha...

Страница 93: ...any sleep instructions in this subroutine Switching modes is quite hard work for the camera in some cases lenses have to be shifted and so on Depending on the camera some tweaking may be nec essary for the necessary sleep intervals Because there is no direct uBasic command for obtaining the current camera mode we need to retrieve the mode in a different way Here we read out the value of Property C...

Страница 94: ... upper case letters A Z This results in 52 different variables However in the script header parameters only lower case variable names are allowed Variables can contain both integer and floating point values String variables are not supported in uBasic Some CHDK spin offs allow for string variables 5 3 2 Assignments Assigning a value to a variable starts with the command let for example let a b c a...

Страница 95: ...st not exceed 25 characters in length The command print_screen allows capturing the output into a file print_screen n with n 0 switches capturing on All output written with print will go into file LOG_n TXT in subfolder CHDK LOGS too n 0 switches capturing off For example print_screen 5 print hello print_screen 0 print bye will produce a file LOG_0005 TXT containing the string hello Finally the co...

Страница 96: ... each program line in uBasic involves a delay of 10 msec In simple cases it is possible to combine all of these statements into one line and omit the endif if a 0 then b 3 else b 4 or b 4 if a 0 then b 3 Here the second version is slower because it needs two lines of code Note This shorthand notation without an endif can however only be used standalone and not nested inside another if then else en...

Страница 97: ...ose instructions into a subroutine and call it with gosub section 5 3 8 Note If you also plan to write scripts that run on the Stereo Data Maker SDM section 7 9 you should avoid the select statement because it is not supported in the SDM 5 3 6 Loops The for loop is used to increment a counter from a start value to an end value and to execute the instructions within the loop for each counter value ...

Страница 98: ...at the loop body is executed at least once because the condition is checked at the end of the loop The while wend construct may not execute the loop body at all if the condition after the while fails during the first pass In the CHDK implementation of uBasic loops can be nested to a depth of four 5 3 7 Labels and GOTOs The goto statement allows you to leave the linear execution and jump to another...

Страница 99: ...have a very similar syntax as GOTOs but they can simplify programs instead of making them more difficult to read A subroutine definition starts with a label and ends with a return statement waitdisp do print Continue DISP wait_click 3000 until is_pressed display return This subroutine prompts the user to press the DISP key and then waits until this key is pressed The advantage of defining such a p...

Страница 100: ... functions are triggered by pressing buttons f The second section makes sure that no bad parameter values are passed to the processing section Usually when a bad parameter value is de tected the default parameter value is assigned In addition you may want to print a message onto the display f The third section initializes the variables used in the processing section Initial variable values may be ...

Страница 101: ...uBasic variable names in Lua can be longer than a single character This allows for an arbitrarily large number of different variables A variable name must start with a letter or an underscore _ However variable names used as CHDK parameters in the script header section 5 4 12 must consist of a single lower case letter and can only accept numeric values There is also an anonymous variable typically...

Страница 102: ... other tables Table definitions are enclosed in curly brackets Anything except nil can be a table element Table elements can be addressed through the element index For instance disp_table info no_info off electronic_viewfinder print disp_table 2 would print no_info because indexing starts at 1 The number of table ele ments can be obtained through the operator print disp_table would print 4 Alterna...

Страница 103: ...le a b 3 4 assigns 3 to a and 4 to b This form of assignment is often used for func tions that return multiple values If individual values are not needed the anonymous variable _ can be used _ b 3 4 Here 4 is assigned to b and 3 is thrown away 5 4 5 Output The print function can be used to create output on the display Similar to uBasic several parameters can be specified but the semantics are diff...

Страница 104: ...the block Blocks may be nested 5 4 7 Conditional clauses Similar to uBasic conditional clauses are built with the if then else end construct The difference is that the construct is not closed by a specific endif token but by the more generic end token For example if a 0 then b 3 else b 4 end The else clause may be omitted but in contrast to uBasic it is not possible to omit the end token even for ...

Страница 105: ...also possible to connect several conditions with the operators and or and not Parentheses may be used to indicate which operators are executed first if a 1 or a 2 and b 0 then 5 4 8 Loops Similar to uBasic the for loop is used for incrementing a counter from a start value to an end value and for executing the instructions within the loop for each counter value For example for i 1 n do sleep 10000 ...

Страница 106: ...nfo 3 off 4 electronic_viewfinder The same is possible for dictionary tables that are accessible via keywords Instead of ipairs the function pairs is used in this case t info 0 no_info 1 off 2 electronic_viewfinder 3 for key value in pairs t do print key value end The result of this script would be electronic_viewfinder 3 off 2 info 0 no_info 1 Note that in this case the order in which the values ...

Страница 107: ... at all if the condition after the while fails during the first pass Both while and repeat loops can be aborted with the break statement which always exits the innermost loop i 1 while true do if i n then break end sleep 10000 shoot i i 1 end Here we have used the Boolean value true in the while condition which results in a loop that never stops To break the loop we check the inverse condition in ...

Страница 108: ...y a single return value or by a comma separated list of return values The following function returns the time difference between the function start and a click on the specified button in milliseconds function stopwatch k t get_tick_count repeat wait_click 3000 until is_pressed k d get_tick_count t return d end A special statement to invoke a function like the gosub in uBasic is not necessary it is...

Страница 109: ...uld contain the result of function stopwatch f If an error occurred the first returned value is false followed by the error message in the second return value In addition to the errors raised by Lua itself errors can also raised by a script through the error function The first parameter of this function is an error message The optional second parameter may contain an error level that indicates whi...

Страница 110: ...d by the main body of the script as outlined in section 5 3 10 The title and parameter section must be provided in the form of a multi line comment containing the title and parameter definitions as known from uBasic rem 22 Sep 2009 by bdaum title Countdown param t ticks sec default t 10 Comments within such a block can be written with the uBasic syntax rem 5 4 13 Standard Libraries Unlike uBasic L...

Страница 111: ... struct a table containing all public functions and values defined in the library and return this table to the loader The loader may then retrieve these functions and values For example props require propcase id props DISPLAY_MODE Here the library propcase lua has returned the table props containing a value under key DISPLAY_MODE This technique helps avoid name clashes when several libraries are u...

Страница 112: ...created and existing files are overwritten a Append mode Appends to the end of an existing file In case of an error the return variable file is nil and an error message is given in msg an error code in no ret msg no io close file ret msg no file close Closes the specified file In case of an error ret is nil and an error message is given in msg an error code in no ret msg no io flush Performs all o...

Страница 113: ...te and read pointers to the specified offset in the file be ginning at the origin specified in mode offset can be omitted and defaults to 0 in that case In case of an error pos is nil and an error message is given in msg set Starts at the beginning of the file cur Starts at the current position This is the default when the mode parameter is omitted end Starts at the end of the file and subtracts t...

Страница 114: ... rename a nonempty directory may result in file system corruption Attempting to move a file to another directory by re naming it can lead to unpredictable results The rename function may produce unpredictable results if the target name already exists t os time table returns the time specified in table as a single number number of seconds since January 1 1970 The table has the following keywords ye...

Страница 115: ... y Two digit year e g 09 The character when used as a literal For example s os date today B d Y returns today September 24 2009 A special case is the format string t In this case the date function returns date and time in the form of a table as seen in the discussion of the time function In addition to the above functions the CHDK implementation provides some more functions that are not part of th...

Страница 116: ...s atime Last access time mtime Last modification ctime Last status change blksize Block size in bytes blocks Number of blocks in the file attrib Bit mask of DOS attributes is_dir true for a directory is_file true for a file If the function fails nil is returned followed by an error message and an error number r msg no os utime filename atime mtime sets the time of last access and the time of last ...

Страница 117: ...case t string lower s Returns string s converted to lower case t string sub s from to Returns a substring of s starting at position from and ending at position to Indexes start at 1 negative indexes are counted from the end of the string t string char n Converts the integer parameters to characters and concatenates them to a string n string char s i Converts the i th character of s into an integer...

Страница 118: ...uences Most control sequences start with followed by a character optionally followed by a modifier character see below These control sequences describe character classes such as letters or digits All characters a Letters c Control characters such as new line or form feed d Digits l Lowercase letters p Punctuation characters s Whitespace characters u Uppercase letters w Alphanumeric characters x He...

Страница 119: ... d y string find 9 25 2009 d d d assigns 9 to m 25 to d 2009 to y Each capture d tries to find one or more digits until the next slash or the end of the string and it delivers the matching substring as a result Capture results can be used in the pattern itself or in the substitution string of the gsub function They are symbolized by the control sequences 1 2 representing the result of the first ca...

Страница 120: ...must return true if the first element is considered smaller than the second element Example table sort table function a b return a b end will sort the table in the opposite order because it returns true when the second parameter is smaller than the first Mathematical functions Because the CHDK implementation of Lua only supports integer numbers mathematical functions in the Lua mathematical librar...

Страница 121: ...as a function result For example is_key r right uBasic r is_key right Lua Some commands return Boolean values true or false Unlike Lua uBasic does not have a Boolean datatype Those values are therefore returned to uBasic as 0 false or 1 true 5 5 1 Button related commands press button name uBasic press button name Lua A button is pressed and held down Normally this command is followed later by a re...

Страница 122: ... pressed If the pressed button matches the specified name a value of 1 resp true is returned Typically used standalone without wait_click wheel_right uBasic wheel_left uBasic wheel_right Lua wheel_left Lua Only for PowerShot G7 and SX100IS Turns the multi control wheel one stop to the right or to the left r get_video_button uBasic r get_video_button Lua Returns 1 resp true if the camera has a vide...

Страница 123: ...In the case of cameras without diaphragms it leaves everything to the user or to a script because all of the above entities can be retrieved and most except Bv can be set via script commands it is possible to organize exposure control through scripts section 5 7 4 Let s look at the CHDK commands that are available for exposure control Exposure time Tv r get_nd_present uBasic r get_nd_present Lua R...

Страница 124: ...ic set_user_tv_by_id_rel x Lua Modifies the exposure time set by the user 3 units per f stop set_tv96_direct x uBasic set_tv96_direct x Lua Sets the exposure time value with 96 units per f stop Index Tv96 Speed Index Tv96 Speed 12 384 15 18 576 1 60 11 352 13 19 608 1 80 10 320 10 20 640 1 100 9 288 8 21 672 1 125 8 256 6 22 704 1 160 7 224 5 23 736 1 200 6 192 4 24 768 1 250 5 160 3 2 25 800 1 32...

Страница 125: ...8 1 25000 15 480 1 30 45 1440 1 32000 16 512 1 40 46 1472 1 40000 17 544 1 50 47 1504 1 50000 Aperture Av Note Not surprisingly setting aperture values on cameras without dia phragms has no effect get_av x uBasic x get_av Lua set_av x uBasic set_av x Lua Retrieves and sets the real aperture Av index Table 5 2 x 0 stands for an aper ture of f 1 Larger values stand for smaller apertures 3 units per ...

Страница 126: ...rel x Lua Modifies the real aperture relative to the current aperture A negative x makes the aperture wider a positive x makes it smaller 3 units per f stop set_user_av_by_id_rel x uBasic set_user_av_by_id_rel x Lua Modifies the aperture set by the user 3 units per f stop set_nd_filter f uBasic set_nd_filter f Lua Sets the neutral density filter 0 off 1 in 2 out This command has no effect on camer...

Страница 127: ... 0 AutoISO 50 100 200 400 800 get_iso_real x uBasic x get_iso_real Lua set_iso_real x uBasic set_iso_real x Lua Retrieves and sets the real ISO value This is the real value used to control the sensor get_iso_market x uBasic get_iso_market x Lua Retrieves the marketing ISO value the value shown on the display This value is higher than the true ISO value section 4 3 1 get_sv96 x uBasic x get_sv96 Lu...

Страница 128: ...n They also allow setting the subject distance to a fixed value and then locking the autofocus system On cameras with an explicit manual focus mode the camera must be switched manually to that mode before the focus can be set via a script command On cameras without an explicit manual focus mode no action is required get_focus_mode x uBasic x get_focus_mode uBasic x get_focus_mode Lua Returns the f...

Страница 129: ...within the range of half of the hyperfocal distance and infinity will be sharp set_aflock a uBasic set_aflock a Lua Sets autofocus lock 0 off 1 on Especially useful for time series where refocusing is not desired When the AF lock is set the AF LED is switched off too 5 5 4 Zoom related commands s get_zoom_steps uBasic s get_zoom_steps Lua Returns the maximum number of zoom steps This may differ am...

Страница 130: ... mode 0 auto 1 on 2 off r get_flash_ready uBasic r get_flash_ready Lua Indicates that the flash is ready with a value of 1 true 5 5 6 Image related commands get_quality q uBasic q get_quality Lua Retrieves and sets the current image quality setting 0 Superfine 1 Fine 2 Normal get_resolution q uBasic q get_resolution Lua Retrieves and sets the current image resolution 0 L 1 M1 2 M2 3 M3 4 S 5 RAW o...

Страница 131: ...onth u Y year 5 5 8 Display related commands x get_display_mode uBasic x get_display_mode Lua Returns the display mode 0 info 1 no info 2 off 3 electronic viewfinder shot_histo_enable x uBasic shot_histo_enable x Lua Switches the histogram on or off 0 off 1 on get_histo_range s h p uBasic p get_histo_range s h Lua Retrieves histogram data from the previous shot A shadow value 0 1023 is speci fied ...

Страница 132: ... The optional parameter c controls the brightness 0 200 This works only for the blue LED and not for all cameras 5 5 9 Image management commands r get_raw_nr uBasic r get_raw_nr Lua set_raw_nr r uBasic set_raw_nr r Lua Retrieves and sets noise reduction for RAW images Dark Frame Subtraction 0 auto 1 off 2 on r get_raw uBasic r get_raw Lua set_raw r uBasic set_raw r Lua Retrieves and sets the state...

Страница 133: ... raw_merge_start operation Lua only Starts a merging process for RAW files section 4 5 6 Operation 0 sum 1 average The following raw_merge_add commands will contribute to the result raw_merge_add filename Lua only Adds a single picture to a merged RAW image Typically this technique is used to re duce noise by averaging multiple shots section 4 5 6 raw_merge_end LUA only Completes the merge operati...

Страница 134: ... false playback vid true video false photo mode binary value representing the CHDK shooting mode number section 5 6 r set_capture_mode i Lua Sets the shooting mode Parameter i specifies the CHDK shooting mode number true is returned on success false otherwise See also section 5 5 12 for high level access is_capture_mode_valid i Lua Returns true if the parameter i is a valid CHDK shooting mode numb...

Страница 135: ...obe 0 optics 1 CCD 2 battery u get_usb_power uBasic u get_usb_power Lua Sets variable u to a value 0 if the camera detects a signal on the USB V pin The returned value is the duration of the signal in units of 10 milliseconds Typically this command is used to implement advanced remote control functions section 5 7 5 exit_alt uBasic exit_alt Lua Leaves the CHDK specific ALT mode chapter 4 Please no...

Страница 136: ...as a number provided the parameter length is not longer than 4 bytes Otherwise nil is returned bitand x y bitor x y bitxor x y bitshl x y bitshri x y bishru x y bitnot x These commands perform bitwise operations on integers AND OR XOR SHIFT LEFT SHIFT RIGHT SHIFT RIGHT UNSIGNED NEGATION 5 5 12 The library capmode lua Lua only The library capmode lua is contained in the full CHDK distribution and s...

Страница 137: ...umber 0 uBasic get_prop id Lua get_prop id and uBasic set_prop id value Lua set_prop id value Unfortunately the property IDs differ between the VxWorks and DryOS operating systems section 2 2 as you can see in the table below In conse quence a script accessing properties and developed for Digic II cameras will not run on most Digic III and all Digic IV cameras and vice versa This is okay if you wr...

Страница 138: ...decoded yet this is an ongoing community effort In addition not all findings have been veri fied for all camera types So the following table must be treated with some caution Vx Works DryOS Lua Description 0 236 SHOOTING_MODE Shooting mode dial position 18 video 11 49 50 SHOOTING_MODE Shooting mode dial position We list here only the most common shooting modes A complete list of shooting modes is ...

Страница 139: ...K shooting mode numbers 32768 AUTO 1 32764 P 2 32765 Tv 3 32766 Av 4 32767 M 5 32755 PORTRAIT 6 32757 NIGHT 7 32756 LANDSCAPE 8 2597 VIDEO_STD 640 30fps 9 2598 VIDEO_SPEED 320 60fps 10 2599 VIDEO_COMPACT 160 15fps 11 32246 Stitch Assist 32248 Digital Macro 1 Photo effect 2 225 Sharpness for custom MyColors setting 3 55 Saturation for custom MyColors setting 4 59 Contrast for custom MyColors settin...

Страница 140: ...Macro 3 Infinity 4 Manual 5 Super Macro 12 133 FOCUS_MODE Manual focus mode 0 OFF 1 ON 8 AF frame 0 AiAF 1 Center 2 FaceDetect 13 12 AF mode 0 Single 1 Continuous 14 224 Delay of self timer msec 15 121 FLASH_ADJUST_MODE Flash adjust mode 0 Auto 1 Manual 16 143 FLASH_MODE Flash mode 0 Auto 1 ON 2 OFF 111 External flash state 0 Absent 1 Present and turned on 2 Present and turned off 18 213 Red eye m...

Страница 141: ...7 207 EV_CORRECTION_1 EV_CORRECTION_2 EV correction 96 units per stop When setting EV correction both properties must be set A value larger than 2 f stops 192 units is possible 28 127 Flash correction 96 units per f stop if Flash adjust mode Auto 29 141 FLASH_MANUAL_OUTPUT Manual flash output 0 Low 1 Medium 2 Full if Flash adjust mode Manual 32 4 Exposure bracket range 96 units per stop A value la...

Страница 142: ...shorter negative longer 52 233 Stitch mode 0 Left to right 1 Right to left 2 Bottom to top 3 Top to bottom 4 Top left top right bottom left bottom right 57 249 DIGITAL_ZOOM_POSITION Digital zoom steps 0 NONE 0 number of steps Digital zoom steps are camera dependent 58 94 DIGITAL_ZOOM_STATE Digital zoom state 0 OFF 1 ON default Other values are camera dependent 95 DIGITAL_ZOOM_POSITION Digital zoom...

Страница 143: ...htness value Bv 96 units per f stop 72 246 SV_MARKET User selected Sv 96 units per f stop 73 247 SV Effective Sv 96 units per f stop 74 AE lock 1 ON 0 OFF 76 103 OVEREXPOSURE 77 24 25 MIN_AV Minimal available Av max Aperture 78 122 Flash fired 0 Not fired 1 Fired 79 122 FLASH_FIRE Fire flash 0 do not fire 1 fire 99 195 OPTICAL_ZOOM_POSITION Zoom step Camera dependent 100 269 WB_ADJ Color temperatu...

Страница 144: ...Auto Reset 181 105 DISPLAY_MODE Display mode in record mode 0 Show info 1 Do not show info 2 LCD off 3 EVF 212 Review info 0 Off 2 Detailed 3 Focus check 184 Slideshow mode 0 Do not repeat 1 Repeat 185 Slide duration 1 3s 2 4s 3 5s 4 6s 5 7s 6 8s 7 9s 8 10s 9 15s 10 30s 186 Print settings DPOF mode 1 Standard 2 Overview 3 Both 187 Print settings DPOF date 0 No date 1 Date 188 Print settings DPOF f...

Страница 145: ...VxWorks DryOS 0 0 English 1 1 German 2 2 French 3 3 Dutch 4 4 Danish 5 5 Finnish 6 6 Italian 7 7 Norwegian 8 Ukrainian 8 9 Swedish 9 10 Spanish 10 11 Simplified Chinese 11 12 Russian 12 13 Portuguese 13 14 Greek 14 15 Polish 15 16 Czech 16 17 Hungarian 17 18 Turkish 18 19 Traditional Chinese 19 20 Korean 20 21 Thai 21 22 Arabic 23 Romanian 22 24 Japanese 200 Selected movie mode 205 206 SHOOTING Re...

Страница 146: ...lors settting A larger value means darker 218 Custom timer continuous Number of shots to be taken 219 223 Self timer setting 0 2 sec 1 10 sec 2 Custom continuous 63 Number of continuous shots taken last time 221 208 IS_FLASH_READY Flash ready 0 NO 1 YES 223 Microphone recording frequency 0 11 025 kHz 1 22 050 kHz 2 44 100 kHz 227 Microphone level 1 5 low high 228 Microphone wind protection 0 OFF 1...

Страница 147: ...Indicates whether the ND filter is active 0 OFF 1 ON Not every entry in the table is valid for all CHDK supported cameras You should check specific property cases for your camera before using them You can do this with the help of the script propdump lua which you will find on the book CD Execute the script once section 5 1 to create a first Property Dump Then modify the camera setting and execute ...

Страница 148: ...nce a property case may influence the camera optics while leaving the user interface untouched This example is a property based version of the script flashoff lua from section 5 1 flashof2 lua by Berthold Daum title Flash off props require propcase set_prop props SHOOTING 2 exit_alt Here the flash is switched off by assigning a value of 2 to property 143 property 16 on DIGIC II The script works al...

Страница 149: ...ts limitations First the number of shots is limited to 10 You may have an initial delay before the series begins but no delay between pictures and exposure and focus are only measured once and not for each image The latter can be a problem if the series function allows for long series with customizable de lays For example during a long series the illumination may change due to the sunset or a clou...

Страница 150: ...nvoked So we start with function definition first Because there is no built in command to set the display mode we need to select it by simulated key presses Since we cannot be sure about the initial state we simply check after each key press to see whether we have reached the desired state This is done with the function get_prop that retrieves the respective property case section 5 6 Instead of a ...

Страница 151: ... and the target time But here we want to do a bit more and allow the user to abort the script with the SET key By doing so we have the ability to restore the focus and display settings which we cannot do if the user aborts with the shutter button Therefore we use the command wait_click instead and specify the interval sleep_time as a timeout When this timeout happens function is_pressed returns no...

Страница 152: ...t try to refocus until the lock is re leased function focus press shoot_half repeat sleep 1 until get_shooting set_aflock 1 release shoot_half end Function tohms converts milliseconds into the more readable format h m s It does so by dividing the seconds subsequently by 60 and keeping the remainders Instead of using the operator for division we use the function idiv defined above function tohms ti...

Страница 153: ... in milliseconds since camera start and initialize the variable next_event with that value Within the loop we shoot an image then increment the variable next_ event with the computed delay If the display is active we print a log entry to inform the user about the progress To do so we use the function format from the Lua string library section 5 4 13 Then we sleep until the time computed in next_ev...

Страница 154: ... the image resolution High Definition HD movies 1600x1200 pixels become possible and wide screen movies 16 9 are no problem When creating a time lapse movie in this way you should shoot in JPEG mode not RAW RAW files take up too much space and the programs used for composing the movie expect JPEG Select an image size large enough to cover the output format Output for normal television NTSC needs a...

Страница 155: ... Overrides section 4 3 1 to set fixed exposure values and or a fixed subject distance You can use extreme exposure times sections 4 3 5 and 4 3 6 You can even use curves section 4 3 8 to compress contrast or do some wild experimental stuff You can bracket every shot later applying tone mapping to each exposure group to create an HDR movie There are in fact some specialized scripts for that task in...

Страница 156: ...fix JPG pcall function require chdklib root TEST end The header defines the script title and a parameter for the start value of the sequence number The directory root is set at A DCIM where the sub folders for the images are located The following pcall expression is used for testing the script on a PC section 5 8 where we also use a differ ent root directory The function renameFile does the actual...

Страница 157: ...irst lets the user select a subfolder of DCIM It does so by fetching the members of the root directory and prompting the user with the subfolder names The user can navigate with the LEFT and RIGHT buttons to the subfolder whose files shall be re named The user selects the subfolder by pressing FUNC SET The button DISP is used to abort folder selection files msg os listdir root false if not files t...

Страница 158: ...s of the subfolder are fetched and the renameFile function is executed on each member if i then path root files i files msg os listdir path false if not files then error msg elseif not files 1 then error Folder is empty end path path for _ file in ipairs files do renameFile path file end end Of course you could easily modify this script to implement your own num bering scheme Before trying out thi...

Страница 159: ...t s examine what that means The first clause is optional denoted by the brackets and specifies the focusing mode Cameras with a manual focus option must be set manually to manual focus to allow for the options of that clause The following values are possible f F causes the camera to determine the subject distance immediately and then lock the focus so the autofocus is switched off during the subse...

Страница 160: ...e camera switches back to autofocus and takes another 10 shots starting with an interval of 15 seconds and end ing with an interval of 5 seconds Now let s analyze the script and see how it works It uses some elements that we developed already in the previous two scripts such as file brows ing display mode switching and exact timing What is new here is reading file content and parsing interpreting ...

Страница 161: ...tick_count if sleep_time 0 then return false end wait_click sleep_time if is_pressed set then return true end until is_pressed no_key end Function focus however does a bit more than its sibling in the Accurate Time Lapse script It performs the required focusing operations In case of immediate focusing F the shutter button is pressed halfway to perform the focusing The repeat loop waits until this ...

Страница 162: ...y into the schedule file but the letter I is easier to remember and to write There are two more functions for parsing subclauses parseTime and parseDisp The function parseTime accepts h m s expressions and converts them into milliseconds To make parsing easier it first ap pends a single colon to the end of the subclause parseDisp accepts the valid display operators and converts them into the displ...

Страница 163: ...hite space character to the end of the line to make parsing easier Then the function searches for white space If a white space character is found the text before the white space is analyzed with one of the functions de fined above In case of success the read pointer a is incremented so that parsing continues behind the white space character function parse line if string find line 1 then print stri...

Страница 164: ... end if disp or not n then return focus met 1 0 0 disp end a e 1 e string find line a local i1i2 string sub line a e 1 local p string find i1i2 if p then i1 parseTime string sub i1i2 1 p 1 i2 parseTime string sub i1i2 p 1 i1i2 else i1 parseTime i1i2 i2 i1 end a e 1 e string find line a end if e then disp parseDisp string sub line a e 1 end return focus met n i1 i2 disp end ...

Страница 165: ...runs through a loop to let the user select one of those files The index of the selected file is stored in variable i We have al ready seen similar code in the script for file renaming files msg os listdir schedules false if not files then error msg elseif not files 1 then error No schedule file end i 1 while true do cls print Press SET to select print LEFT RIGHT to scroll print DISP to abort print...

Страница 166: ...til the computed event time the start time plus the MET read from the file If the user has pressed the DISP key to cancel the loop is exited After a shot a log entry is created and printed to the display The sleep_until shoot and printing functions are contained in an inner loop which handles the time series defined by the current sched ule line For a single shot n is 1 so this loop does not repea...

Страница 167: ... shoot h m s t tohms next_event start_ticks print string format Frame u MET u u u u frame h m s t frame frame 1 if n 2 then next_event next_event idiv n k 1 i1 k 1 i2 n 2 else next_event next_event i1 end end if not next_event then break end end end io close file restore display mode set_display_mode old_display_mode restore AF lock mode set_aflock 0 end ...

Страница 168: ...pt can utilize the DOF and produce an optimized series of photos The CHDK is able to compute the total DOF the near limit and the far limit These values can be shown on the display section 4 2 8 but they are also accessible in scripts Unfortunately we cannot use them in this script When the camera is in normal focusing mode values for the near and far limits that would fall into the macro range ar...

Страница 169: ...ptive Focus Stacking param a close distance mm default a 2 param b factor 0 1 1 10 2 100 default b 2 param c far distance mm default c 5 param d factor 0 1 1 10 2 100 3 inf default d 3 In the following instructions we make sure that no parameters are invalid Invalid parameters negative or zero distance are set to their default values rem consolidate parameters if a 1 then a 2 if c 1 then c 5 Then ...

Страница 170: ...for off is set to transfer variable M rem turn off flash m get_flash_mode M 2 gosub fmode Then the shutter button is half pressed This is done to determine the cor rect exposure If the camera is in autofocus mode the focus distance is also determined The subroutine prep waits until the camera is ready to shoot The focus distance is retrieved and kept in variable z so that we can later restore the ...

Страница 171: ... possible or does not result in better sharpness Otherwise the DOF far limit of the current shot is de termined with the above formula This value is used as the new focal length rem DOF series f a n 0 do if f 0 then print dist inf else print dist f endif set_focus f sleep 3000 click shoot_full n n 1 gosub wait if f 0 or f y then goto exit f y f y f if f 65535 then f 1 until f c and c 0 After compl...

Страница 172: ...turns 1 The subroutine wait works the other way around it waits until the camera has processed the current shot prep do r get_shooting until r 1 return wait do r get_shooting until r 0 return A few words are necessary about script usage First cameras that support manual focusing must be switched to manual focusing mode For other cameras no action is required If your camera has a diaphragm you shou...

Страница 173: ...y a sound instead CHDK motion detection has many useful applications such as lightning photography wildlife and sports surveil lance and more Basics Motion detection is enabled by the CHDK command md_detect_motion uBasic md_detect_motion a b c d e f g h i j k l m n o p Lua h md_detect_motion a b c d e f g nil i j k l m n o p Figure 5 4 Breuburg Castle Germany A picture like this cannot be obtained...

Страница 174: ...on is detected e Time interval msec between frames compared Increase this value to detect slow movements f Threshold value If a change in at least one cell is larger than this threshold value an event is fired g Grid display on the screen 0 no cell grid is drawn 1 cell grid is drawn h Return variable Contains the number of cells where motion was detected i Masking mode 0 nothing masked 1 everythin...

Страница 175: ...as Lightning Fast Motion Small Objects Macro etc that you simply select from a list This is exactly what the following script provides The most commonly used scene programs are already predefined but you can easily add addi tional scene programs by extending the script When running the script simply select the required scene program using the RIGHT LEFT and FUNC SET keys By selecting the scene pro...

Страница 176: ... off but is illuminated again after a shot for image review 2 Backlight remains switched on We have also added an additional value option to parameter f threshold or sensitivity If f is negative the threshold will be dynamically derived from the brightness value measured by the camera Even then it is possible to influence how the threshold is derived from the brightness value the more negative f i...

Страница 177: ... return a a b b end pcall function require chdklib end The definition of the parameters in the script header section is followed by the definition of function idiv and a pcall expression that we already have seen in earlier scripts These expressions allow testing and debugging the script on a PC section 5 8 Next are the definitions of some basic func tions needed by the main motion detection scrip...

Страница 178: ... focus is used for prefocusing or for immediate focusing It works by pressing the shutter button halfway This is also done in the case of dynamic shareholding f 0 because the shutter button must be half pressed to determine the scene brightness If a fixed subject distance is specified u 0 this distance is set After all these preparations the func tion waits until the camera is ready to shoot funct...

Страница 179: ...ter button so that it can be half pressed again to update focus and exposure Then it clicks the FUNC SET button twice which does nothing except prevent the camera from falling asleep Now we can start with the execution of the main script The first step is to define the different scene programs Here we use a powerful feature of Lua the ability to store functions in tables Each scene program is repr...

Страница 180: ...cts a b c d e f i j k l m o p t z 12 12 1 55 50 1 1 2 2 11 11 1 1 5 2 if u 0 then u 0 end end function Macro a b c d e f i j k l m o p t z 5 5 3 55 10 1 1 3 3 3 3 6 1 5 2 if u 0 then u 1 end end function Hat a b c d e f i o p t z 1 1 1 55 10 24 0 12 5 5 0 if u 0 then u 0 end if v 1 then v 5 end pause v end add additional program implementations here After we have populated the two tables with labe...

Страница 181: ...pt parameters and will thus configure the script for the selected scene program Program selection program 1 repeat cls print Program LEFT RIGHT SET print labels program wait_click 10000 if is_pressed left then program program 1 if program 1 then program programs end elseif is_pressed right then program program 1 if program programs then program 1 end end until is_pressed set Assign parms for selec...

Страница 182: ... to mil liseconds scale and adapt parameters if i 0 then grid 1 else grid 0 end p p 100 d d 1000 Now we are ready to start the event loop At the very beginning we check to see whether there is still space left on the memory card If not we break the loop and stop If so we print a short message about how to stop the script The variable shots is a counter for performed shots Each time the event loop ...

Страница 183: ...click is used so that the shutter button stays pressed In the case of series and video sequences the subroutines series and video are called instead Finally a message is printed to the screen and the image counter is incremented The backlight is switched on again if desired The script then pauses optionally and releases the shutter button During that pause the camera remains in review mode showing...

Страница 184: ... 1 shutter sound end shots shots 1 print shots cells cells Threshold threshold end if z 1 or v 0 then set_backlight 1 end if v 0 then pause v end if cells 0 then release shoot_full wait cells 0 else wake inhibit power down end end This concludes the implementation of the motion script Now let s see how the scene programs differ from each other and how to use them When using the script you should s...

Страница 185: ... before motion detection starts unless a fixed distance is set in parameter u Autofocusing directly before the shot would definitely be too slow to catch any lightning flash Every 55 seconds d 55 the motion de tection command times out In this case the program loops around does another cycle of prefocusing and then waits again for motion The script reacts to changes in the YUV brightness channel c...

Страница 186: ...s much more slowly We therefore adapt the other parameters of the program to slow operation By using a subsam pling value of 1 we analyze each single pixel resulting in slower operation but working much more accurately The program will catch slower move ments than the previous programs because of a detection interval of 50 milliseconds Finally we focus immediately before the shot u 0 if a fixed di...

Страница 187: ...mera In most cases the camera should be set to autofocus and automatic exposure Benchmark The big question is how fast is motion detection This depends on several factors the camera the script language used and how well the script is tuned One keen CHDK user has provided the community with an aid for determining the reaction time of motion detection scripts and cameras Just open the URL http datag...

Страница 188: ... motion and shutter release measured with an SD1100 IS and the scene programs implemented above For comparison we have added the reaction time when the camera is manually triggered Program Delay Remark Lightning 100 msec Fast 150 msec Fine 1050 msec Includes focusing Macro 120 msec Hat 1000 msec Includes focusing Manual 1 400 msec Shutter half pressed Manual 2 1200 msec Includes focusing Figure 5 ...

Страница 189: ...he script will reduce the shutter speed rather than increasing the ISO speed above that limit As in previous examples function idiv and the pcall expression are used to provide portability to a PC based debug environment section 5 8 title Shutter priority param s maxISO 1 50 8 6400 default s 4 function idiv a b return a a b b end pcall function require chdklib end The variable minIso defines the S...

Страница 190: ...tion can begin The parameter s is clipped to its limits and the maximum acceptable Sv96 is computed Then the Bv96 value is read by half pressing the shutter button waiting until the camera signals ready to shoot and reading out the Bv96 value Next the ND filter is switched out the Tv96 value is read and the Av96 value is read too This seems to be superfluous for cameras without dia phragms but it ...

Страница 191: ...done the shutter button half press is released sv av tv bv compute_corr tv if sv maxSv then tv tv sv maxSv sv av tv bv compute_corr tv end if sv minIso then tv tv sv minIso sv av tv bv compute_corr tv end set_sv96 sv sleep 10 click shoot_full repeat sleep 1 until not get_shooting release shoot_half Before running this script make sure that the values for ND filter and ISO speed are not overridden ...

Страница 192: ...ectly to the fo cal length a longer press results in a longer focal length The longest duration for the longest focal length can be set via parameter s For s 0 zooming is disabled and any signal will fire the camera Optionally the camera s backlight can be switched off while the script is running parameter b Another option parameter t is to avoid the camera powering down because of a time out The ...

Страница 193: ...utine wakeup is called When a USB signal arrives indicated by p 0 the duration of the pulse is analyzed If the duration is shorter than 500 msec or if zooming had been disabled by setting parameter s to a value 1 the camera is fired Other wise the subroutine zoom is executed Afterwards the script loops and waits for the next signal while 1 do set_backlight b if t 0 then gosub wakeup p get_usb_powe...

Страница 194: ...rrent step value n is incremented by the value of the direction indicator d If n hits the lower or upper limit d is inverted Then the physical step value is computed f In Seconds mode the physical step value is computed directly from the pulse length After setting the new zoom level a sleep command is issued to allow the camera to adjust the lens before new USB signals are accepted zoom if m 0 the...

Страница 195: ...ed since the last copy was made It also allows you to select one of the copies and make it the current configuration After a restart of the camera the selected configuration becomes the active configuration Of course every time the configuration is switched a backup of the former configuration is made just to be safe The script is written in Lua because it needs the file management and I O functio...

Страница 196: ...n _activate_file Working in this way we always have a valid INI file Even a battery going flat when writing the INI file can not lead to a corrupt file function write_ini name cnt local new ininame NEW local file msg io open new w if not file then error msg end local ret msg file write cnt cnt n if ret then ret msg file write cur name n end file close if ret then ret msg _activate_file new ininame...

Страница 197: ...fig_name and the functions return true parser_funcs count function line local s line match cnt 0 9 if s then ccount tonumber s return true end end current function line local s line match cur if s then config_name s return true end end The function copy_file is used for copying configuration files In this case we first copy to an auxiliary file with the suffix NEW and later re name it to the true ...

Страница 198: ...or msg end end The next function compare_files is used to compare the current con figuration file with its former origin in folder CONFIGS The function re turns true if the content of the file has changed since it was copied from its origin If this is the case we need to save the current configuration before we switch to a new configuration The function compares both files by reading their content...

Страница 199: ...tion count in the variable ccount and the current configuration name in the variable config_name ccount 0 config_name ini file parsing if os stat ininame then for line in io lines ininame do for _ f in pairs parser_funcs do if f line then break end end end end Next we allow the user to select the configuration to switch to To do this we fetch the list of files contained in the folder CHDK CONFIGS ...

Страница 200: ...files local i 1 while i files do if files i config_name then break end i i 1 end while true do if i 0 then i files elseif i files then i 1 end cls print Press SET to select print LEFT RIGHT to scroll print DISP to abort local fstat os stat configs files i local mdate fstat mtime local s os date c mdate print Switch to files i s wait_click 5000 if is_pressed set then selected_config files i break e...

Страница 201: ...ble newconf If no INI file exists we save the current configuration by default if config_name 0 then local cpath configs config_name if compare_files current_config cpath then changed true print Save current config print SET yes DISP no while true do wait_click 5000 if is_pressed set then newconf true break elseif is_pressed display then break end end end else newconf true end If the folder CHDK C...

Страница 202: ...uration file and pressing SET the user can reset the current configuration to its initial state If the user does not switch or reset the configuration we simply update the INI file if selected_config then write_ini selected_config ccount if changed or config_name selected_config then copy_file configs selected_config current_config print Please restart camera shut_down end elseif new_name then wri...

Страница 203: ...K properties allowing you to test the script under various conditions UBDB is written in Java and runs on both Windows and Mac OSX platforms Another comfortable editor on Windows platforms is the Open Source product Notepad http notepad plus sourceforge net uk site htm This editor is free and knows the syntax of many languages including uBasic and Lua For Lua several IDEs exist for different platf...

Страница 204: ... r to 2 so that the script can leave the while loop This can be done in the upper section of the Parameters window by double clicking the variable r then entering 2 into the input field top right and clicking Set Alternatively we can change the result value of the command get_focus_mode to 2 and run through the loop one more time This can be done in the middle section of the window by double click...

Страница 205: ...ode lua and the subfolder is GEN f When running a script in this environment the parameters defined in the script header are parsed by the library chdklib lua and assigned to Lua variables so that the script will run with the same configuration as under the CHDK f In case of the integer division you should as a general rule avoid the use of the division operator and instead use the function idiv w...

Страница 206: ...on which has become a collector s item In digital photography panoramic cameras such as the 160 megapixel Seitz sell for the prize of a mid sized sedan But special equipment is not really necessary to produce good panora mas The stitching programs that exist today are so powerful that you can easily create your own panoramas with your Canon All you need is a freshly loaded battery sufficient free ...

Страница 207: ...nce A varying subject distance like that caused by the autofocus system would make it difficult for the stitching program to join the single exposures f Exposure is often a problem with panoramas especially on a bright day The contrasts can be very high because you cover a large area Some photographers use a manually set exposure and keep it constant through all of the images In most cases this wi...

Страница 208: ...ered set of images and will put them into the right sequence 3 The single images are shifted rotated and stretched to make them fit together 4 The single images are further corrected by removing the effects of vi gnetting lens shading barrel and pincushion distortions and different exposures 5 The single images are fused together This happens within the overlap ping area by choosing a usually irre...

Страница 209: ...on and its variants e g Miller projection are best suited when you want to print panoramas with a wide angle of field f The spherical or equirectilinear projection projects the panorama onto the inside of a sphere that is then unrolled onto the viewing surface This projection is typically used for spherical panoramas viewed on a computer display using interactive viewers Viewers for spherical pano...

Страница 210: ...camera press the shutter button again etc A tripod is recommended but not abso lutely necessary Make sure to use fresh batteries and a memory card with enough free space Let s assume that the focal length of your camera lens is equivalent to 35mm at a wide angle setting If you re using the camera in portrait mode with an overlap of one third between each panorama part you can cover an angle of vie...

Страница 211: ...hould consider selecting the next lower image reso lution Some HDR tone mappers cannot handle images that are too large and processing times can become excessive The images delivered by the panoramic stitcher can be very large indeed Because I had taken the im ages at full resolution I scaled them down afterwards to 1600x1200 pixels The images were then composed in Hugin with virtually no manual a...

Страница 212: ...e to have fresh batteries and rather large memory cards on hand see appendix A 1 for running the CHDK with memory cards larger than 4 GB The resulting bracketing series must be processed with an HDR com poser The composer should be able to combine images in batch mode1 Make sure that tone mapping is performed with the same parameters for each bracketing series The result should be stored in the fo...

Страница 213: ...204 CH APTER 6 ...

Страница 214: ...emote control features and its integration with external devices it is quite popular in the KAP Kite Aerial Photography community 7 1 Installing the SDM The SDM can be downloaded from http stereo jpn org eng sdm index htm The website lists the models and firmware versions that are sup ported not as many as the original CHDK but still quite a number Your first step should be to determine whether yo...

Страница 215: ...d with the normal CHDK they are compatible and place them into the folder CHDK FONTS The SDM deployment also contains a folder with predefined SDM con figurations These configurations are meant to help you set up a pair of cameras for stereo photography f If your cameras will be mounted on a Z frame section 7 7 4 copy file CONFIGS config_eng L CHDK CFG into folder CHDK on the memory card used for ...

Страница 216: ...nt of RAW files is missing too and curves are not supported In regard to scripting the SDM supports its own uBasic dialect section 7 9 Because some CHDK uBasic commands are not supported by the SDM not every script can be ported to the SDM Scripting with Lua is not sup ported at all 7 3 Additional functions On the other hand the SDM introduces so many useful functions that you might want to switch...

Страница 217: ...hrough key shortcuts instead of menu entries For example enabling or disabling Overrides is performed by half pressing the shutter button and pressing FUNC SET An indicator at the left side of the display shows MAN when Overrides are enabled and OFF when Overrides are disabled Here are some more key shortcuts They are worth remembering be cause they can make life easy However you can always look t...

Страница 218: ...D forwards f Half press shutter button Shows red cyan overlay of left and right image On the S2 IS S3 IS S5 IS and A550 use the FUNC SET button instead section 7 6 There are a few more shortcuts listed in file SHORTCUT TXT that apply to specific situations Don t forget to press the ALT button again after using a command sequence starting with ALT Otherwise you will still be in Alt mode and your ne...

Страница 219: ... Manual or to Digiscop The remote system can be configured with the same parameters as shown in section 4 9 3 Since this functionality was adopted by the CHDK from the SDM there are almost no differences between the versions The menu is structured differently and the names of some menu items are different For example the CHDK option Enable Remote Zoom is called Synch Zoom in the SDM and is located...

Страница 220: ...t the camera doesn t need to be removed from an elaborate set up and that the card is never forgot ten in the computer The WIA loader can even automatically remove trans mitted images from the card Because the SDM allows uploading images via script commands section 7 9 you can almost simulate tethered shooting at least for time lapse operation After an image has been taken the interval between two...

Страница 221: ...oject for building a DIY panoramic robot head is found on www instructables com id Camera Panorama robot head panograph Of course it is also possible that an external device will send more data to the camera s USB port than a simple receipt Such data can be encoded with pulses of varying width and interpreted with the help of the script command get_usb_power section 5 5 10 7 7 Stereo photography T...

Страница 222: ...he form of bright yellow lines Also the message frozen is shown f Move the camera a bit to the right but not too much Use the distance between your eyes as a guide and also see below For macro work you can choose a much smaller distance and for landscape work you can exaggerate the 3D impression by choosing a larger distance f Now register the camera so that the edges of the nearest subjects match...

Страница 223: ... Stereo Camera Spacing dial in the distance that you want the camera to shift between both pictures Typical values here are 60 70 mm for mid range work and 10 20 mm for close up work f In the same menu set the Twin Cam position to L left and the Cam orientation to H horizontal or V vertical depending on the camera orientation f By repeatedly pressing ALT LEFT or ALT RIGHT browse the SDM OSD pages ...

Страница 224: ...SD parameters Grid set tings Enable the option Show grid lines and invoke the function Load grid from file to load Deviation_H GRD DEVIAT 1 GRD on DryOS o2 o1 a b c1 c2 Figure 7 7 Close up work and stereo photography have their own problems Here are two camera c1 sees object o1 from a different perspective than camera c2 c1 sees more of edge a while c2 sees more of edge b Object o2 is so close tha...

Страница 225: ...should be lower than the distance to the nearest point of the subject divided by the EFL 35mm equivalent focal length plus 20 For example if the distance to the nearest point is 3 m and the current EFL is set to 50 mm an ac ceptable Camera Spacing would be 3000 50 20 72 mm f The Deviation factor should be in most cases between 25 and 30 The lower the value is the larger the maximum acceptable devi...

Страница 226: ... red cyan 3D goggles6 and your computer screen becomes 3D With File Save Stereo image you can save the anaglyph to a new file that can be viewed with any image viewer StereoPhotoMaker can of course do much much more but this is the shortest way to your first 3D photo Not only red cyan goggles are supported but also 3D shut ter glasses that synchronize your view with quickly alternating left right ...

Страница 227: ...an synchronize two cameras down to 1 16 000 of a second so your subjects can move very fast indeed Triggering Synchronization can only be achieved by triggering both cameras at the same millisecond Special remote controls are required If you are happy with the simple remote control presented in section 4 9 2 you can easily solder a second mini USB plug to the first one This will do the trick Figur...

Страница 228: ...delay time to each camera in ALT MENU Stereo Synchronization User delay Finding the right delay intervals can be tricky If you still have a CRT monitor or if you can borrow one or cheaply pick one up at Ebay you can use the Camera SyncTester from www 3dtv at Knowhow Synctest_en aspx to determine the differences between the delay intervals of two cameras If not you can simultaneously shoot the turn...

Страница 229: ...ch camera under ALT MENU Stereo Twin Cam position with L for left and R for right Some functions will behave differently for left and right cameras You can get all of this set up for you by using one of the ready made configurations section 7 1 contained in the SDM distribution Registering Registering two cameras is of course a bit different than working with a single camera For example you will n...

Страница 230: ... file to load Deviation_H GRD DEVIAT 1 GRD on DryOS align the centerline of the left camera with a significant point on the nearest object Do the same with the centerline the left of the two lines shown of the right camera Next align the centerline of the left camera with a significant point on the farthest object and do the same with the right line deviation indicator of the right camera The left...

Страница 231: ...that do not feature a manual focusing mode can be fo cused on the virtual image projected by the telescope f The camera is switched to FAST mode so that it immediately fires the shutter when the switch of the remote control is pressed you will work with tripod and remote control when digiscoping f The camera display is not darkened by the nonactivity timeout impor tant for wildlife photography f F...

Страница 232: ...e step size will also depend on this value the lower the Focus ref distance the smaller the focus step size f Set Tv bracket value to Off f Choose any value from 3 times to 19 times in entry Bracketing type f Exit Alt mode and set the camera to Continuous mode or to Custom timer with an appropriate number of shots Of course the scope must be mounted on a sturdy tripod The camera must be mounted on...

Страница 233: ...sic instruction select section 5 3 5 or the CHDK command get_display_mode section 5 5 8 On the other hand the SDM introduces a large number of new com mands Some of them are synonyms of existing CHDK commands Their only rationale is to make the script more readable For the same reason it is also possible to omit the print command and simply write a string into a script line For example Hello SDM w...

Страница 234: ...ny CHDK scripts will not run under the SDM without modifications Fortunately there is an SDM version of the UBDB debugger section 5 8 the SDMUBDB that can be downloaded from www zenoshrdlu com kapstuff zsdmubdb html So you can do the testing and the script conversion conveniently on a PC Button related commands take_photo_now Identical to shoot section 5 5 1 shoot_movie_for s Switches to Movie mod...

Страница 235: ...er CHDK STACKS recording the focus or Tv values of a bracket ing series It should precede any other bracketing command each_photo_alternating each_photo_darker each_photo_lighter Used before an exposure Tv bracketing sequence is started This only works with the Custom Timer The Continuous Shooting mode always alternates hdr_bracket_1 3_ev_steps s Used to set the step width for exposure Tv bracketi...

Страница 236: ...mer or the Continuous Shooting mode must be active number_of_images_to_capture_is n Specifies the number of images in bracketing mode start_continuous_sequence end_continuous_sequence Starts and ends a bracketing series when the camera is in Continuous mode start_custom_timer_sequence Starts a Tv or focus bracketing series when the camera is in Custom Timer mode The series will end after a given n...

Страница 237: ...c Shoot interval minutes d Shoot interval seconds e Number of repeats f 1 endless mode e ignored 0 limited by parameter e g 0 single 1 continuous 2 custom timer 3 burst h Number of exposures for Tv bracketing i Number of exposures for focus bracketing j 0 Tv bracketing 1 focus bracketing 2 both k 0 lighten 1 darken 2 alternate l Tv bracketing step in 1 3 EV m 0 equal step focus bracketing 1 autofo...

Страница 238: ...rates a single pulse on the PRINT LED Typically used to calibrate the connected external device section 7 6 send_data a b c Sends three bytes of data to an external device by flashing the PRINT LED section 7 6 The external device acknowledges the correct reception by sending a signal to the USB V pin The values a b and c should be in the range of 0 255 data_received a Used after send_data to wait ...

Страница 239: ...ion 5 5 10 movie_mode Switches the camera to movie mode except on cameras with a separate MOVIE button playback_mode Switches the camera to Playback mode record_mode Switches the camera to Record mode get_sync a b c d set_sync a b c d Retrieves and sets the SDM synchronization state Parameter a goes into Enable Synch 1 enable 0 disable parameter b goes into Enable Synch delay 1 enable 0 dis able p...

Страница 240: ...r when triggered by a remote control Small lightweight cameras such as the Canon Digital Elph SD Ixus series are ideal for KAP Nearly any stable single line kite design can be used to lift such a lightweight camera An interesting option for KAP although expensive is the Helikite from Allsopp Helikites Ltd a combination of a helium filled balloon and a kite The advantage of this design is that it c...

Страница 241: ...troller AuRiCo that can control both the rig and a CHDK enabled camera through the USB port Especially when shooting video the motion of the rig can become an noying to the viewer Most of this motion can be cancelled out by using Gyro Servos again from Dunehaven instead of normal servos to control the rig Small on board gyroscopes measure the movements of the rig and ad vise the servos to countera...

Страница 242: ... sary to choose a short shutter speed and to use shutter priority exposure control On small diaphragm less cameras such as the Canon Digital Elph Ixus that are not equipped with such a mode this can be achieved by using a script section 5 7 4 Also it will probably be necessary to switch the Image Stabilizer IS off because it usually worsens the problem In any case tests should be made to find out ...

Страница 243: ...ck on again except perhaps via a robotic arm that presses the power button Also before a mission make absolutely sure the Auto Power Down function of your camera is switched off If the camera is running on its own battery power saving is essential In most cases the camera display is not used during the mission so the dis play backlight can be switched off If the script operating the camera does no...

Страница 244: ...at all These cameras are able to deliver video in HDTV quality with up to 24 frames per second and more They have interchangeable lenses and the standard focal length is similar to that of traditional movie cameras so you get that classic movie look with its rich tonal range and well controlled depth of field For example close up shots of actors with a very unsharp and quiet background Bokeh are t...

Страница 245: ...icrocomputers script ing language The software is readily available for the 5D and a new version for the 7D has been announced 9 3 Pentax hacks The Pentax Hack project http pentax hack info is still in the early stages of analyzing the camera s native firmware The project is targeted at the Pentax K10D K20D and Samsung GX10 GX20 cameras ...

Страница 246: ...with FAT32 Unfortunately only a few cameras support multipartitioned cards For supported cameras you will find the two entries Create card with two parti tions and Swap partitions under ALT MENU Miscellaneous Stuff With these menu functions you can format a large card with two partitions1 1 Install the CHDK on the card in the usual way Load the CHDK with the function Firm update as outlined in sec...

Страница 247: ... Write protect the card and switch the camera on again It should now perform an AUTOSTART from the first small partition When the CHDK detects a second partition formatted with FAT32 it will switch all ac cess functions to the second partition Until the next start the first small partition will not be used again There is one more problem when you want to exchange files with a com puter running und...

Страница 248: ...th an Out of memory message Cause One possible cause is that the Edge Overlay feature is enabled and has allocated memory for the overlay image Solution Go to the submenu Edge overlay and disable the Edge Overlay feature Also invoke the menu function Free internal Memory to release the allocated memory Problem The camera shuts down every time you switch it on Cause 1 You called functions from the ...

Страница 249: ...the newest version of the CHDK If yes and if you have access to another camera find out if the bug is specific to a certain camera model or not Then file the bug in the Mantis bug tracking system http chdk kernreaktor org mantis Before you do please check to see whether a similar bug is already filed there ...

Страница 250: ...uring many stereo related software products including the StereoPhotoMaker and the StereoDataMaker SDM This is IT http home hccnet nl s vd palen index html Home of the PhotoLapse time lapse video composer KAP and CHDK SDM Java Utilities http www zenoshrdlu com kapstuff zchdkstuff html Site featuring the UUDB und SDMUUDB debuggers for uBasic as well as the CHDK configuration editor CHDK for balloon...

Страница 251: ...s are found at http chdk wikia com wiki Firmware_Dumping In the next steps the firmware is analyzed The hooks where the CHDK can lock in must be found Some of these hooks must be searched for manually by inspecting the code Others can be found with the help of a tool Signature finder finsig gensig The mapping of keyboard functions to buttons must be adapted for the specific camera model too You sh...

Страница 252: ...e Manual http www lua org manual UserGuide http chdk wikia com wiki File CHDK_UserGuide_April_ 2009_A4 pdf Gulbins2009 Juergen Gulbins Rainer Gulbins Photographic Multishot Techniques Rocky Nook 2009 Howard2008 Jack Howard Practical HDRI Rocky Nook 2008 Bloch2007 Christian The HDRI Handbook Rocky Nook 2007 ...

Страница 253: ...244 AP PENDIX ...

Страница 254: ...dar 9 70 207 Camera Spacing 214 216 218 220 card reader 11 12 13 51 205 207 CardTricks 11 13 242 CCD 3 20 37 126 CHDK community 1 2 6 128 129 146 178 242 Codepage 18 71 72 72 CombineZP 62 164 218 command 13 40 67 79 83 84 85 86 88 90 91 92 94 95 98 99 101 110 112 124 127 128 129 139 141 142 143 163 164 165 166 173 174 176 182 183 185 194 195 196 207 209 211 212 224 225 226 227 228 229 230 239 comm...

Страница 255: ...2 6 8 55 77 78 84 92 140 141 143 144 147 151 164 165 166 170 180 186 194 196 207 231 243 M macro 3 22 23 45 55 60 113 120 131 159 164 166 171 177 179 213 216 227 mathematical functions 111 memory 1 2 6 7 9 11 12 14 15 20 21 23 42 48 49 54 63 69 70 71 72 77 103 123 124 126 127 149 164 173 188 194 197 199 201 203 205 206 207 234 237 239 MoreBest 6 motion detection 1 2 6 8 77 79 139 140 164 179 206 2...

Страница 256: ... 226 227 228 Twin Cam 210 211 214 215 220 221 U uBasic 2 6 8 77 79 91 92 94 95 96 97 99 100 101 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 128 129 139 140 143 160 164 165 194 207 224 225 241 UBDB 194 195 225 USB 6 9 11 66 67 68 69 113 126 182 183 184 185 209 211 212 218 221 219 223 224 225 228 229 232 234 V variable 79 81 82 83 84 85 86 87 88 91 92 94 95 ver req 11 12 14 vers req ...

Страница 257: ...1100 IS ISO 6121 SHUTTER SPEED 1 19 APERTURE f 2 8 FOCAL LENGTH 6 2 mm equiv 38 mm Shot handheld with six single exposures as DNG images Superimposed with PhotoAcute Berthold Daum Book Website www photozora org cchm f Images f Errata f Updated software and scripts ...

Отзывы: