Best shot selector mode (Poor man's IS) - page 3 - Feature Requests - CHDK Forum

Best shot selector mode (Poor man's IS)

  • 23 Replies
  • 12452 Views
*

Offline Mac

  • *
  • 40
Re: Best shot selector mode (Poor man's IS)
« Reply #20 on: 01 / February / 2010, 18:36:53 »
Advertisements
Question: Does the current version of Lua in CHDK allow the use of "require"?
If it did, you could use "lfs.dll" (14kb) to determine the sizes of the photos taken.

*

Offline Mac

  • *
  • 40
Re: Best shot selector mode (Poor man's IS)
« Reply #21 on: 01 / February / 2010, 19:39:45 »
Better yet, just use os.stat(filename) to get the file size and combine this with some of the file handling routines used to 'merge'  files to select the "best of the last".
Just an idea.
Anyone think that it might work?

*

Offline Mac

  • *
  • 40
Re: Best shot selector mode (Poor man's IS)
« Reply #22 on: 01 / February / 2010, 20:03:47 »
Well the following will get you all the sizes of the photo (and stick it in a log file in this test).

path="A/CHDK/LOGS/"
file="Size"
file=path..file..".txt"
io.output(io.open(file,"w"))

path="A/DCIM/100CANON/"
File_Table=os.listdir(path,false)
for i=1,#File_Table do
   filename=path..File_Table
   INFO=os.stat(filename)
   io.write("Filename: "..filename.."  size = "..INFO.size.."\n")
   end
io.close()

If you know how many pictures you have take for evaluation, you can delete  (os.remove) the smaller files and only keep the largest one.
Don't know how valid this approach is to getting the best photo but it definitely can be done.
Best,
Mac


Re: Best shot selector mode (Poor man's IS)
« Reply #23 on: 12 / February / 2010, 11:22:54 »
I'm afraid I haven't yet got round to learning lua, but it looks as though lua may be powerful enough to do the job.

What I would like is a script that does the following.
Takes a burst of photos - if the script cannot sense when the button is released this could be a preselected number say 8.
Script then reads from camera which photos belong to the burst, selects the largest and deletes the others.

It seems to me that if I have to take the burst first, then switch to CHDK then tell the script which images to look at and then study a log file, that will be not much better than previewing the pics manually and selecting the largest (except that my IXUS only shows size to nearest 10KB)
« Last Edit: 12 / February / 2010, 11:25:29 by orlp »


 

Related Topics