Home › Forums › TWAIN Classic › Acquiring multiple images from camera
- This topic has 2 replies, 2 voices, and was last updated 13 years, 5 months ago by pu.mpkin.
- AuthorPosts
Hello,
I am programming an application which uses twain to communicate with a digital camera. The acquisition of single images is ok, but I can’t acquire several images one after another.
What I want is to implement an autofocus algorithm. On it, I acquire an image, and loop moving the camera (with a motorized arm) and acquiring another image). My problem is that after the first acquisition I get pendingXfers.Count = 0, and I turn back to state 5. What I want is to remain at state 6, on which I could acquire more images without waiting for XFERREADY again.
I have tried to set CAP_XFERCOUNT to -1, and after that I receive a TWRC_SUCCESS code. After that I check this value with MSG_GET, and it is 65535 (which is also enough for my purpose), but when I enable the camera and check pendingXfers.Count, its value is always 1 before I send MSG_ENDXFER, and 0 after that.
Is there any way to tell the source the amount of images that I want to acquire, so that pendingXfers.Count is set to that value?
If I have not explained well, feel free to comment and I’ll try to explain it better.
Thanks in advance
I forgot to tell: I am working without the source’s UI.
¿Any idea of how to remain in state 6 after transferring an image?
Thanks.
Hi bano,
one year after you I am stucked with the same problem as you were
http://www.twainforum.org/viewtopic.php?t=4076I want my camera to deliver “endless” amount of images, so that I set the XferCount to -1 (as you did) and always I get pendingXfers=0 (as you got :D) therefore I must go back to state 5 … it exactly same problem you discribed.
Is there any solution? Have you finished your project?
Please reply
Thanks- AuthorPosts