3

I am looking to develop a little Java piece that can capture an image using a digital camera and I can't find a suitable API - I know this is duplicating similar questions but they are old, and after finding lots of old old threads everywhere complaining about the lack of an API I am asking again to see if anybody knows of where this may have been developed - and offered free of course (mine is just a personal project - no distribution).

I want to capture still images from a digital camera, or a DSLR - I have applied for Canons SDK but I do not think it will be approved as it will not be benefiting them at all.

The image must not be a screenshot of a feed retrieved from the camera - I want to capture a native image using the shutter of the camera - and retrieve it in the app for processing - this way I do not get an awfully grainy image, I get one at full quality.

I have been looking into a few API's but if they are not extortionately expensive (JTWAIN), they simply do not do what I want (JFM).

So, are there any out there? Am I just looking in the wrong places?

Phish
  • 774
  • 3
  • 11
  • 27
  • You may Use HTML5 tag `video` to capture image. – Yagnesh Agola Sep 15 '14 at 12:45
  • Are you aware of this project: http://digicamcontrol.com/ ? – Anders R. Bystrup Sep 15 '14 at 13:37
  • @AndersR.Bystrup No I hadn't. I suppose a solution would be to write a small app that runs the command line tools as to not have to use the complex GUI of this program as the source files dont appear to be available (they say they are but not when I visit SourceForge)... But, it defeats the object of my project - I want to learn something and achieve something fun and practical in the process, this may be a solution but a bit like putting a Prada watch in a casio box/wrapping their brilliant work in my rubbish interface. – Phish Sep 15 '14 at 13:49

1 Answers1

1

apparently Xuggler seems to do the job, you can use it with or without maven or even build it yourself, even ant is possible. There are quite a few tutorials on the subject, even on SO

Community
  • 1
  • 1
specializt
  • 1,913
  • 15
  • 26
  • Can Xuggler interface directly with eg. Nikon/Canon DSLRs, and if so could you provide a hint on how? – Anders R. Bystrup Sep 16 '14 at 08:18
  • it is not possible to interface DIRECTLY with any hardware in existence, everything has to go though at least one kernel-layer which translates requests into hardware-commands - usually this is done via third-party kerneldrivers, sometimes microsoft-provided drivers do the job. You will have to access all of your video-capture devices via DirectX or comparable APIs, apparently there is also VFW. Xuggler accesses these APIs and AFAIK you can even choose which one suits your needs. All of this is described in my links - which you would know if you had actually visitited them. – specializt Sep 16 '14 at 08:40
  • I did visit your links, hoping that they would answer the OPS question more directly. Alas, TL;DR. And the OP (and I) still depend on various camera manufacturers' software. Thanks for the effort, though. – Anders R. Bystrup Sep 16 '14 at 09:50
  • You were actually hoping to circumvent manufacturer-specific protocols and possibly make it do things the company doesnt want you to do? Sorry but SO is no hacking/cracking - forum, you will need to search elsewhere, im quite sure there is hardware out there : http://en.wikipedia.org/wiki/List_of_open_source_hardware_projects Btw : the first part of your sentence doesnt make much sense. – specializt Sep 16 '14 at 11:21
  • another thing : in the case of cameras, all of the needed drivers are already installed on your system : the windows USB-stack, if you connect your camera via USB. In that light, your comment makes even less sense and im guessing you downvoted my answer ... which would prove another assumption of mine but lets not talk about that righ now. – specializt Sep 16 '14 at 11:59
  • @specializt sorry I didnt get time to view your answer earlier - I will have a good look at you answers when home from work, not to mention a play and get back to you. – Phish Sep 17 '14 at 14:51
  • @AndersR.Bystrup for Canon DSLR - Canon will provide you with the protocols and drivers as part of their SDK but you will have to make up a good reason in your application for a developer account. – Phish Sep 17 '14 at 14:53
  • One last - as my question is temporarily closed as off-topic for SO - does anyone here disagree with this - I don't believe it should be. Although it could be viewed as a generic question about something specific, I am failing to see a real problem with it. Thanks – Phish Sep 17 '14 at 14:54