Daniel Reetz, the founder of the DIY Book Scanner community, has recently started making videos of prototyping and shop tips. If you are tinkering with a book scanner (or any other project) in your home shop, these tips will come in handy. https://www.youtube.com/channel/UCn0gq8 ... g_8K1nfInQ

TwoCamControl - fast two camera chdkptp photos (Windows)

General discussion about software packages and releases, new software you've found, and threads by programmers and script writers.
Post Reply
rcull
Posts: 17
Joined: 13 Feb 2012, 00:23
Number of books owned: 0

Re: TwoCamControl - fast two camera chdkptp photos (Windows)

Post by rcull » 22 Feb 2016, 19:24

Thought I would download all the software again, but the page for chdkptp seems to be empty!

https://www.assembla.com/spaces/chdkptp/documents

duerig
Posts: 384
Joined: 01 Jun 2014, 17:04
Number of books owned: 1000
Country: United States of America

Re: TwoCamControl - fast two camera chdkptp photos (Windows)

Post by duerig » 22 Feb 2016, 19:27

Hmm. That is probably just some transient bug in the hosting software. I see all the builds when I go to the site:

https://www.assembla.com/spaces/chdkptp/documents

-D

dtic
Posts: 464
Joined: 06 Mar 2010, 18:03

Re: TwoCamControl - fast two camera chdkptp photos (Windows)

Post by dtic » 23 Feb 2016, 05:58

rcull wrote:connected: Canon Powershot A2200, max packet size 512
con 1> 1var click(<zoom_in<)
Yes that is an error of some sort. The correct command would be

Code: Select all

luar click('zoom_in')
TwoCamControl runs without error for me in Windows 7 with both chdkptp r690 and chdkptp r658. Hard to say what causes the error on your end. TwoCamControl sends strings to the two cmd windows and there can be issues with that on some systems sometimes, perhaps timing issues, but that is difficult to troubleshoot.

What version of Windows do you have? Is it an old/slow computer?

Make sure you are using the latest version of TwoCamControl. If you are not using r690 or r658 of chdkptp then try those versions.

mfresh90
Posts: 5
Joined: 25 Mar 2016, 12:50
E-book readers owned: Nook Simple Touch
Number of books owned: 50
Country: United Kingdom

Re: TwoCamControl - fast two camera chdkptp photos (Windows)

Post by mfresh90 » 28 Mar 2016, 15:16

Hello,

Fantastic piece of software for remote triggering and capturing direct to PC! I do have a question though, is it possible to capture RAW images direct to PC as opposed to JPG? Thanks.

triesthistory
Posts: 1
Joined: 28 Mar 2016, 16:51
E-book readers owned: Kobo
Number of books owned: 0
Country: USA

Re: TwoCamControl - fast two camera chdkptp photos (Windows)

Post by triesthistory » 28 Mar 2016, 18:18

Would not the RAW capability depend upon the camera and being able to set if for RAW capture?
Normally those capture both RAW and some setting choices for the camera software creation of a JPG for visibility in the camera,
so you would have the RAW file and the JPG to deal with.

dtic
Posts: 464
Joined: 06 Mar 2010, 18:03

Re: TwoCamControl - fast two camera chdkptp photos (Windows)

Post by dtic » 30 Mar 2016, 15:36

mfresh90 wrote:Hello,
Fantastic piece of software for remote triggering and capturing direct to PC! I do have a question though, is it possible to capture RAW images direct to PC as opposed to JPG? Thanks.
Hi, thanks. I haven't really looked into raw capability but as far as I can tell it depends on the cameras. In the TwoCamControl tab Setup there is an editbox named "rsint options". You can there enter additional parameters supported by chdkptp, see the rsint command section in chdkptp manual. Specifically these parameters
-raw framebuffer dump raw
-dng DNG format raw
-dnghdr save DNG header to a seperate file, ignored with -dng
I did a quick test just now where I changed the rsint options box from

Code: Select all

-cmdwait=600 -tv=1/160
to

Code: Select all

-cmdwait=600 -tv=1/160 -raw
and that looks to be working. I don't know much about different raw related files and settings though. Could you test some more with those parameters and reply back here with feedback if anything in TwoCamControl doesn't work with them?

mfresh90
Posts: 5
Joined: 25 Mar 2016, 12:50
E-book readers owned: Nook Simple Touch
Number of books owned: 50
Country: United Kingdom

Re: TwoCamControl - fast two camera chdkptp photos (Windows)

Post by mfresh90 » 31 Mar 2016, 05:48

dtic wrote:Hi, thanks. I haven't really looked into raw capability but as far as I can tell it depends on the cameras. In the TwoCamControl tab Setup there is an editbox named "rsint options". You can there enter additional parameters supported by chdkptp, see the rsint command section in chdkptp manual. Specifically these parameters
-raw framebuffer dump raw
-dng DNG format raw
-dnghdr save DNG header to a seperate file, ignored with -dng
I did a quick test just now where I changed the rsint options box from

Code: Select all

-cmdwait=600 -tv=1/160
to

Code: Select all

-cmdwait=600 -tv=1/160 -raw
and that looks to be working. I don't know much about different raw related files and settings though. Could you test some more with those parameters and reply back here with feedback if anything in TwoCamControl doesn't work with them?
Hello,

Appreciate the response. I didn't see that usage manual for chdkptp, it definitely works now. Thanks a bunch.

Only downside of opting to shoot RAW is that is it extremely slow in writing the file, and I'm sure my setup is a significant factor in this (Powershot A480). But the images do come out good and I can batch process in Photoshop afterwards. This piece of software saved my life! ;)

EDIT: dtic, I just realised that saving to SD card without wired up to TwoCamControl saves DNG in three seconds, whereas remote shooting via TwoCam takes up to 20 second a shot (between shot and file written to HD). I think most of the time is consumed transferring the file to camera. I think this option is listed under chdkptp usage as "remoteshoot". I tried looking into the AutoHotkey file to see if I can just change it to trigger only.

Dtic, is there any way of using your GUI interface (with the handy rsint command options available) to trigger both cameras but somehow not remote transfer them to PC but to just store to SD? I know I'm asking a lot here. I don't necessarily mind 20 seconds for a high quality DNG shot, but if the transferring of the file to PC can be bypassed and directly stored to SD that will save a whole load of time.

Cheers mate.

dtic
Posts: 464
Joined: 06 Mar 2010, 18:03

Re: TwoCamControl - fast two camera chdkptp photos (Windows)

Post by dtic » 31 Mar 2016, 14:37

Yeah, direct transfer of raw files to the PC might slow things down. The rsint command is designed for shoot and download. But the chdkptp command shoot saves to the SD card for later manual transfer to a PC. I'll try to add a setup checkbox for a "no download mode" in a future version.

But for now you can do the following small modifications of TwoCamControl.ahk . Note: I've only tested it briefly but it did save .raw files to the camera SD cards.

1 comment out lines 272 334 335 547 548 by putting a semicolon ; at the start of each of those lines.

2 change lines 601 602
from

Code: Select all

sleep(wait),acti(leftcam), xs("path " workdirfrontslash "/" proj "/" xc "R{enter}s{enter}",leftcam) ;R since right page image
acti(rightcam), xs("path " workdirfrontslash "/" proj "/" xc "L{enter}s{enter}",rightcam)
to

Code: Select all

sleep(wait),acti(leftcam), xs("shoot " rsintoptions "{enter}",leftcam)
acti(rightcam), xs("shoot " rsintoptions "{enter}",rightcam)
3 save and run it and put options for the shoot command (see chdkptp manual for available parameters) in the rsintoptions editbox in Setup tab. For example

Code: Select all

-tv=1/160 -raw=1
The shots still takes a few seconds, like you mentioned, but that is unavoidable I think. I don't know your use case but if you're scanning regular sized books with mostly text and only want to make pdf files that are good enough for screen reading then capturing .jpg is probably sufficient if you have a good setup (plenty of lighting on the page, a platen that presses the pages flat, and so on).

mfresh90
Posts: 5
Joined: 25 Mar 2016, 12:50
E-book readers owned: Nook Simple Touch
Number of books owned: 50
Country: United Kingdom

Re: TwoCamControl - fast two camera chdkptp photos (Windows)

Post by mfresh90 » 31 Mar 2016, 18:18

Hello again,

Thanks for that. I can see the changes are modificiations you've listed, but for some reason, it's still finding a way to create a project directory and writing to computer. I'll give it another go later. I've got a workaround by loading up two instances of chdkptp manually via CLI and firing them... and hopefully will set up a hotkey with AutoHotkey to switch between chdkptps and send the shoot command.

Not sure why your solution wasn't working for me though. It just functioned as normal and still managed to create a PC directory to store my files. I'll download the software again from scratch as I was altering the AutoHotkey file earlier and I possibly could have made an error there.

Appreciate all your help buddy, thank you. I'm still in the process of building my scanner (should take less than a month I'm hoping!). It will be mostly text, so I will no doubt use JPEG where possible.. it's just that the RAW files is a nifty little feature and I'm thinking of archiving my books in that format. :?

EDIT: trying again now with spaces inbetween the semicolon. Possibly?

dtic
Posts: 464
Joined: 06 Mar 2010, 18:03

Re: TwoCamControl - fast two camera chdkptp photos (Windows)

Post by dtic » 31 Mar 2016, 19:57

If you've altered the .ahk file earlier the line numbers may have shifted. Retry on a redownload of the file and do only and exactly the changes I described. Spaces after semicolons makes no difference.

Note this small modification only achieves a bare bones raw shot functionality. That's all I have time to do right now. It still makes a project folder (though empty) and the preview button will download the temporary preview images to the PC. But after project start the shoot command (F8) will the save images to the SD on the camera that you can later retrieve manually. Those images will not have the 0001R 0001L ... name format so you'll have to rename them manually too.

Post Reply