Camera Access

Scott Palmer swpalmer at gmail.com
Fri Aug 7 13:39:34 UTC 2015


> On Aug 5, 2015, at 5:06 PM, Jens Kapitza <j.kapitza at schwarze-allianz.de> wrote:
> 
> Am Dienstag, 4. August 2015, 13:26:06 schrieb Scott Palmer:
>> The issue is: https://bugs.openjdk.java.net/browse/JDK-8090438
>> <https://bugs.openjdk.java.net/browse/JDK-8090438>
>> 
>> A target release has not been set.  But I really hope it could make it into
>> 9.0.  Has there been any further discussion on this?
>> 
> Why not like this?
> 
> https://github.com/sarxos/webcam-capture/tree/master/webcam-capture-examples/webcam-capture-javafx
> 

When I ran the JavaFX example on OS X, it locked up before even showing a UI. (It may have something to do with accessing Swing/AWT classes off the Event Dispatch thread, or before such thread exists*.)
It’s also a pretty heavy library with way too many dependencies.  It cobbles together or relies on 10 different APIs/libraries, or “drivers" to get the job done.  In short it’s a mess compared to what the camera API should be.

For reasonable camera access Java needs something much simpler. Cameras are built-in to most of the devices Java runs on, and have been for some time. Heck, even the Raspberry PI has a standard camera module and it runs JavaFX.  There should be an official API for camera access.

*On a side note, it’s a shame that there is no Image data type that is independent of JavaFX/Swing so manipulating image data doesn’t have to bring in a particular UI toolkit, and therefore force use of Swing even though your API is JavaFX based.  E.g. ImageIO requires Swing-based images when it should have been independent of the UI toolkit.  A Raster interface could be factored out and shared between whatever UI image classes are used, ImageIO, and the future camera API… probably too late now though.


Regards,

Scott


More information about the openjfx-dev mailing list