I'm writing a desktop (J2SE) application that will take photographs with a digital camera. The camera can be connected to the PC via cable or wireless and will be any of the available digital cameras in the marke开发者_如何转开发t.
I will get the video feed using the Java Media Framework (JMF).
The camera will have pan, zoom, and tilt controls and other controls.
My question is, do these camera controls have an Application Programming Interface (API) in JMF?
I couldn't find anything with an Internet search.
Can i use JMF to mimic these camera controls? If not what is the work around?
Thanks for your answer.
JMF may be old and abandoned by Sun-Oracle, but it does what it is supposed to do and is OK for low-res applications.
If you are working on Windows, try the Humatic dsj DirectShow® Java Wrapper. It has a full set of controls like Brightness, Contrast, Hue, Saturation, Sharpness, Gamma, White Balance, Backlight Compensation, Zoom, Focus, Exposure, Iris, Pan, Tilt, Roll etc.
DSJ is not freeware. You can use it for your development, but you must buy a license if you sell your application.
Java is perfectly fine for image processing applications. You just need to find the right tools for each job.
..do these camera controls have an Application Programming Interface (API) in JMF?
No. JMF is an old and abandoned API, totally unsuited to the wide range of web-cams 'in the market' today.
Two downsides to the age of JMF:
- Lack of availability for modern codes.
- Maximum resolution of 640x480.
Worse still, there is no really good support in Java for video. I feel Java is not the language for what you are trying to achieve.
精彩评论