I am working on a LEGO Mindstorm NXT autonomous robot that should use a webcam on a tripod as a means of navigation through an obstacle course (video capture with webcam wired to a laptop -> analysis of picture/video on laptop -> algorithmic determination of movement/direction on laptop, sent to robot via Bluetooth). For this I was looking for tutorials regarding Java Media Framework (JMF) and Java Advanced Imaging, but then stumbled across a JavaFX.
As I also discovered that JMF apparently was abandoned in 2001(?), I would prefer to learn and work with a more current API which JavaFX, on paper, sounds like is just that.
Before I delve more into JavaFX, can someone please give a quick recommendation on whether or not JavaFX would be the right API for me to work with, given the above criteria specs? Also, if this is the case, what are some good resources to start with, taking into account what I intend to use it for?
I worked on a project like that once, it worked by not looking at the video feed but in stead it used a snapshot function on the webcam to create pictures which could be analyzed. This was made to work through Java somehow, but in the end some native code was used to do the actual image loading and analysis because the performance wasn't good enough using ImageIO.
On to your question: no you should not use JMF as it is indeed dead as a doornail. A simple google for "java webcam" gives alternatives however, such as this:
Forum post with example code: How to control a webcam in JFX app?
Currently JavaFX is making it's way to the new Versions. So far we have 3D objects and moveable camera nodesa, but now we are working on ossiliscopes, accelorometers, GPS, etc. This will open our world up quite a bit. I would say we should wait a little bit until it comes out, but I would design everything around the hard parts we are waiting for.