./chdkptp.sh -c -e"luar return get_mode()"./chdkptp.sh -c -e"rec"./chdkptp.sh -c -e"luar return get_mode()"./chdkptp.sh -c -e"clock -sync -utc"./chdkptp.sh -c -e"luar return set_capture_mode(5)"./chdkptp.sh -c -e"luar return set_prop(5, 1)"./chdkptp.sh -c -e"luar return set_prop(16, 2)"./chdkptp.sh -c -e"luar return set_mf(1)"./chdkptp.sh -c -e"luar return get_zoom_steps()"./chdkptp.sh -c -e"luar return iso_market_to_real(80)"./chdkptp.sh -c -e"luar return set_zoom_speed(100)"./chdkptp.sh -c -e"luar return set_zoom(2)"./chdkptp.sh -c -e"luar return get_max_av96()"./chdkptp.sh -c -e"luar return get_min_av96()"./chdkptp.sh -c -e"luar return set_iso_mode(5)"./chdkptp.sh -c -e"luar return iso_market_to_real(800)"./chdkptp.sh -c -e"luar return set_iso_mode(1)"./chdkptp.sh -c -e"luar return iso_market_to_real(80)"./chdkptp.sh -c -e'remoteshoot "/home/pi/Desktop/tl_images/2021-01-29 16h10m00s BIP (600s)_ec-2.0_ISO49_Uv+0.00_Bv+6.85" -dng -u=96 -tv=847 -av=384 -sv=381 -sd=2147483647mm'
It seems like sometimes manual focus doesn't work when using remoteshoot.
I'm trying to manually focus at infinity. Most of the time it works, but sometimes it's way, way off. (I'd attach a photo but it's too big - it's a DNG. The photo appears to be focused at about 20 cm from the lens.)
Quote from: Dave92F1 on 29 / January / 2021, 11:34:02It seems like sometimes manual focus doesn't work when using remoteshoot.You're using A640 right?
One thing that comes to mind is on old cameras like this, if the camera goes into display off mode (either from using the display button, or power saving settings), the Canon firmware turns MF mode off.You can try using -sdmode=MF in your remoteshoot commend, instead of setting MF separately.
./chdkptp.sh -c -e"luar press('shoot_half') repeat sleep(10) until get_shooting() return get_bv96()"
The DNG isn't likely to help, but in any case, you could put it on a file hosting site like dropbox, google drive etc.
OK, here are Google Drive links:This one focused at "65.5 meters" (as it ought):https://drive.google.com/file/d/19lIemfpM5HaRlJMRSVlSiVsV3bA6Oo99/view?usp=sharingThis one focused at 0.314 meters (exact same command line except for exposure values):https://drive.google.com/file/d/19pXm1KmxiWVMasb7SZh0DbJaIRWA1y6-/view?usp=sharing
BTW...any advice on dealing with hot pixels in the DNG files? I see the Canon JPG firmware takes care of it nicely, but I don't have access to the hot pixel list the firmware seems to be using internally.
What specific command and settings generated each shot?
./chdkptp.sh -c -e"luar return get_mode()"./chdkptp.sh -c -e"rec"./chdkptp.sh -c -e"luar return get_mode()"./chdkptp.sh -c -e"clock -sync -utc"./chdkptp.sh -c -e"luar return set_capture_mode(5)"./chdkptp.sh -c -e"luar return set_prop(5, 1)"./chdkptp.sh -c -e"luar return set_prop(16, 2)"./chdkptp.sh -c -e"luar return set_mf(1)"./chdkptp.sh -c -e"luar return get_zoom_steps()"./chdkptp.sh -c -e"luar return iso_market_to_real(80)"./chdkptp.sh -c -e"luar return set_zoom_speed(100)"./chdkptp.sh -c -e"luar return set_zoom(2)"./chdkptp.sh -c -e"luar return get_max_av96()"./chdkptp.sh -c -e"luar return get_min_av96()"./chdkptp.sh -c -e"luar return set_iso_mode(5)"./chdkptp.sh -c -e"luar return iso_market_to_real(800)"./chdkptp.sh -c -e"luar return set_iso_mode(1)"./chdkptp.sh -c -e"luar return iso_market_to_real(80)"./chdkptp.sh -c -e"luar press('shoot_half') repeat sleep(10) until get_shooting() return get_bv96()"./chdkptp.sh -c -e'remoteshoot "/home/pi/Desktop/tl_images/2021-01-29 16h10m00s BIP (600s)_ec-2.0_ISO49_Uv+0.00_Bv+6.85" -dng -u=96 -tv=847 -av=384 -sv=381 -sd=2147483647mm'
Does set_mf() successfully put the camera in MF mode?If so, you should be able to do set_mf(1) and then, watching chdkptp live view or the camera screen, see the focus change immediately as you call set_focus() with various values.
Are they really hot pixels, or are they 0 value? The Canon firmware sets (some) bad pixels to 0. They will generally show up as points of saturated color in DNG, since usually only one of the R G B color elements is 0.
For this case, you can use the -badpix option in your remoteshoot command.
If it's actually hot pixels (rarer, but more frequent with long exposures) You can make a list CHDK badpixel.txt list with chdkptp dnglistpixels, see https://app.assembla.com/spaces/chdkptp/wiki/DNG_Processing and https://chdk.fandom.com/wiki/CHDK_1.5_User_Manual#Manual_bad_pixel_removal
Everything above except the last two lines is done once on camera boot, then not again. The last two lines are done in a loop on every exposure. (I calculate -av -tv and -sv based on the get_bv96() reading.)
./chdkptp.sh -c -e"luar return set_prop(require'propcase'.WB_MODE, 1)"
QuoteDoes set_mf() successfully put the camera in MF mode?If so, you should be able to do set_mf(1) and then, watching chdkptp live view or the camera screen, see the focus change immediately as you call set_focus() with various values.It doesn't seem to. Maybe because it's not half-pressed yet.
But -sdmode=MF works (or seems to so far), so I'm happy.
QuoteFor this case, you can use the -badpix option in your remoteshoot command.I saw that in the documentation, but it says the default is 0 and the pixels weren't black so I didn't think it was useful without knowing the actual luminance values. But perhaps it's per channel (RGB)? I'll give it a try.
set cli_verbose=2
OK, so you were doing set_mf() once at startup, and than a half press and shoot. What interval are the shots taken at?
Did you test as I suggested? set_mf(1) should take effect immediately, without requiring a half press, and calling set_focus() after that should update focus immediately. It should be really obvious, if you do=set_mf(1)=set_focus(100)=set_focus(10000)and watch the camera screen when you do the set_focus commands.
If set_mf is broken, then it's virtually certain -sdmode=MF is also broken.
> luar return set_mf(1)> remoteshoot "c:\\users\\dave\\desktop\\test500" -sd=500mm> remoteshoot "c:\\users\\dave\\desktop\\test50000" -sd=50000mm> remoteshoot "c:\\users\\dave\\desktop\\test50000MF" -sdmode=MF -sd=50000mm
10 minutes.
To be completely clear, I did the half-press in one "luar" command, then remoteshoot in another command. So the half-press was, I think, released when the remoteshoot happened.
I have tested that now. Nothing happens. I think it's in auto-focus all the time (A640).
post_levent_for_npt('PressSW1andMF')
(BTW, know any way to get rid of those vertical lines in the image - I have 1 of 3 cameras that does this sometimes...something wrong with it, I think.)
Quote from: Dave92F1 on 02 / February / 2021, 14:40:0210 minutes.Does the camera screen turn off between shots? Or do you have it turned off before running script?
OK, can you try the same thing with set_aflock(1) instead of set_mf? If that works, should be able to use -sdmode=AFL instead of -sdmode=MF
Also, please try the same sequence again, with Code: [Select]post_levent_for_npt('PressSW1andMF')instead of set_mf. Please restart the camera between tests, to be sure the effects of the previous one don't confuse the results.
> luar return set_prop(16, 2)> luar return post_levent_for_npt('PressSW1andMF')ERROR: :101: bad event name 'PressSW1andMF'user code: 1> post_levent_for_npt('PressSW1andMF')ERROR: unknown command 'post_levent_for_npt'
I'm running on AC power so have made no special effort to turn off the screen. However it's usually turned in to face the camera (so turns itself off; at least the backlight)."Display off" is set to 3 minutes (which I think is the default).However the failure to manually focus happened even with test shots taken within a few seconds of each other - display on all the time.
QuoteAlso, please try the same sequence again, with Code: [Select]post_levent_for_npt('PressSW1andMF')instead of set_mf. Please restart the camera between tests, to be sure the effects of the previous one don't confuse the results.I did try:Code: [Select]> luar return set_prop(16, 2)> luar return post_levent_for_npt('PressSW1andMF')ERROR: :101: bad event name 'PressSW1andMF'user code: 1> post_levent_for_npt('PressSW1andMF')ERROR: unknown command 'post_levent_for_npt'I'm not sure what you were trying to do there.
luar post_levent_for_npt('PressSw1AndMF')
Anyway, MF seems to be working OK now. I don't know what was going on before. (In practice I'm shooting a landscape timelapse from a fixed position, so autofocus ought to focus to infinity anyway.)
-------This is really strange. I was testing things while drafting this post, and it took another misfocused image using:remoteshoot "c:\\users\\dave\\Desktop\\testINF" -sdmode=MF -sd=2147483647mmI'm going to play with it more to see if I can get it to do something reproducibly - will post later if I learn more.
Started by toby LUA Scripting
Started by JvdP « 1 2 » General Discussion and Assistance
Started by axman General Help and Assistance on using CHDK stable releases
Started by andrew.stephens.754365 General Help and Assistance on using CHDK stable releases
Started by reyalp RAW Shooting and Processing