Java Video Player [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I need a java api, that cannot use JMF, to play video interpreted by the SO codecs but i want to retrieve the each frames in java code. Somebody know some?

Have a look at FMJ. It does not require the Java Media Framework (JMF).
They have an example at the bottom of the page that writes out the first 5 frames of the video to files, so you should be able to get to the individual frames.

FMJ is very much out-of-date and JMF is a lost cause (yes one of those is IMHO). If you want something that works and will do exactly what you have described, try Xuggle. In their media tools examples they offer a simple player example using AWT / Swing.
http://xuggle.com/

If you're OK with Java wrapper around FFMpeg, try velvet-video.
Code snippet to extract images from a video file:
IVelvetVideoLib lib = VelvetVideoLib().getInstance();
try (IDemuxer demuxer = lib.demuxer(new File("/some/path/example.mp4"))) {
IDecoderVideoStream videoStream = demuxer.videoStream(0);
IFrame videoFrame;
while ((videoFrame = videoStream.nextFrame()) != null) {
BufferedImage image = videoFrame.image();
// Use image as needed...
}
}
A more advanced example of video player implementation using velvet-video can be found here.
Disclaimer: I am the author of velvet-video.

Related

Data mapping without coding [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
What is the fastest way to construct target messages from source messages by mapping file?
Such integration tasks are usual for business applications, but i dont know any universal approach for it. Coding them with objects mapping libs (like MapStruct or ModelMapper) - its wasting developer time, its mindless routine, isn't so?
This work can be successfully done by analyst: create any simple data mapping in json, send to integration service and check target message format.
But for this purpose i've found only big and not-free solutions like Altova MapForce (modeler&server) or IBM Integration Bus data graphical editor.
How do you solve such tasks in your projects?
UPDATE
Mapping format, we choosed for our issue (incl. nesting, arrays, rules):
{
"camunda.Form": {
"blockA": {
"FullName": "QuestionareResEntity.FullName.data",
"RTOPA1TF": "QuestionnaireResEntity.ResTypeOfPaymentAgents.data || CONTAIN || ID1",
"RTOPA2TF": "QuestionnaireResEntity.ResTypeOfPaymentAgents.data || YOUR_RULE || Param1,Param2,Param3",
},
"blockB": {
"ColExMan": "InfoAboutGovernment.CollegialExecutiveManagement.data || DICT || CollegialExecutiveManagementDictionary"
},
"LEResColManag.row[].cells": {
"FName": "TableLERes3[].FullName.data",
"Citiz": "TableLERes3[].Citizenship.data",
"RegAddress": "TableLERes3[].RegistrationAdress.data",
}
}
}
How does it seem for you by convenience and readability?
Appreciate your thoughts and ideas.
You can convert JSON to XML by free automatic converters. Then use the classic way with XSLT and XPath on the converted XML to convert the data in a similar way as you have listed. A lot of free tools, graphical editors and librarys are out there for XML.

Emotion API's For tracking human interesets [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am trying to implement a application to recognized human facial expressions(happiness,sadness,boring, etc,) then after automatically selecting a song which suitable for current emotion of the person, if he is sad system playing enjoyable song, how can i do this thing, if any API's already have? any examples for me?
According to my understanding,your core need is facial expression recognition.there is an API ready for you ,emotion API by Microsoft https://azure.microsoft.com/zh-cn/services/cognitive-services/emotion/.Which Can detect emotions including anger, contempt, disgust, fear, happiness, neutral, sadness and surprise. You can think of these emotions across cultural boundaries, usually by certain facial expressions.
example:you can refer to How-old, a popular APP which Can measure the characters of age and Gender through photos.the different is:it's a light application Supported by another Microsoft API(Project Oxford),But I think you can get some inspiration from it.

visualize a HashTable in java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have a hashtable that contains the information about some book titles and the number of times each book is purchased. I want to draw a bar chart that can show this information visually. Is there any library or method in java that can do this?
HashTable<String, Integer> bookPurchaseTable=new HashTable<String, Integer>();
JavaFX has bar chart capabilities. This page has a tutorial that should have enough information to get you started.
https://docs.oracle.com/javafx/2/charts/bar-chart.htm
Also, You should probably use a HashMap instead of a HashTable if possible.
Use myHashMap.keySet() to get the keys, and then for each key, use myHashMap.get(key) to get the integer.
it's a big topic about Java UI deployment.
you can try java swing tutorial first, and learn how to develop UI in java.
BTW, it's recommend to use HashMap not HashTable now.
hope you can enjoy the Java.

Caching/job tracking framework [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm trying to solve the following problem:
I have some expensive work to do which I then cache the result of
The work is keyed by a string
Many requests may arrive simultaneously for the same key
I'd like to avoid doing the work more than once per key
I'd like to add callbacks against the key which will be invoked when the work is completed; not all of these are known when the work is first submitted.
This feels like a problem which ought to have been solved already; does anybody know of a Java framework or library which covers it?
I can imagine a wrapper around guava's LoadingCache but I'm not aware of a library which does everything out of the box.
While LoadingCache#get is synchronous, it does get you 1-4 and there may be some mileage in using refresh which can return a ListenableFuture (although to get all the features you list it might become a fairly chunky wrapper?)
For Reference:
http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/cache/LoadingCache.html#refresh(K)
http://www.theotherian.com/2013/11/non-blocking-cache-with-guava-and-listenable-futures.html

Algorithm or Open Source implementation for custom Auto-Focus [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I've noticed that in some devices without true optical focus control, (Blackberries, Android phones, etc), there's a built-in digital auto-focus mechanism.
I suppouse that this mechanism is fully implemented in software, applying an image "sharping" algorithm to the images feed by the camera)*.
Is there an algorithm (or even an open source library in Java or C) so that I can apply it to an image after it has been captured?
Thanks in advance.
*UPDATE: Seems that what I'm looking for is not actually auto-focus, since it involves detecting the best focus level and a mean to change it via API. What I need is an algorithm that given a blurred input image, produces an output image with better definition.
It seems you're about deconvolution. Say, we have convolution g(x)a = h where g is an original image, a - camera aperture and h - sensed ('blurred') image, (x) - convolution operation.
Deconvolution is computing G with known A and H, and can be done in many ways.
One is based on fact that Fg(i) * Fa(i) = Fh(i), where F is fourier transform. Obviously Fg(i) = Fh(i) / Fa(i).
In practice, deconvolution greatly increases noise so there's need in noise suppressing algorithm to use with.

Categories