Here's the deal, Im creating a java program that reads data from a microcontroller, the microcontroller sends the heart rate for the application (so I have a list containing the data), everything is working fine, but now, I wanna know how can I plot the data in a jfreechart graphic ?
So what do you guys recommend for it?
Related
I made a music player in wpf using cscore. Now, I want to add a feature so I can stream the output in real-time (like a radio) to another instance of the music player over internet. I could see how to stream the data later, but first I need to know how to get the bytes of the audio output. I'm asking for help because I'm lost, I've done some research and found nothing but how to stream the desktop audio. That's not a solution, because I want to listen to the same music with some friends while hanging out on Discord, so if I stream the desktop audio, they will listen to themselves besides the music. Any help will be welcome. Thanks in advance!
I am have not used cscore I mainly use naudio a similar library that facilitates getting audio to and from the sound card. So I will try and answer in a way that allows you to find what you are looking for in cscore.
In your player code you will be pulling data from the audio file. In naudio this is done with a audio file reader. I think it is called a wavFileReader in cscore, This file reader translates the audio file into a stream of audio samples in the form of byte arrays, the byte arrays are then used to feed the WASAPI Out to allow the audio to play on the sound card.
The ideal place to start with your streaming system would be in the middle of those two processes. So rather than just passing the audio samples to the sound card you need to take a copy of the byte array containing the samples. it is this data you will need to stream to your friends.
From here you will need to look at compressing the audio and streaming protocols like RTP all can be done in c#. The issue will be, as it always is in audio having your data stream keep pace with the sound card. Every time WASAPIOut asks for more samples you need to have the ready otherwise the audio will be choppy.
I do hope this helps point you in the right direction. Others with experience with cscore may have some code examples to assist you more directly I am simply trying to point you in the right direction
I used the code snippet (V4L2 C API's) from the link below to capture MJPEG & YUYV images from an USB camera.
https://gist.github.com/jayrambhia/5866483
When I use the same code with an MIPI CSI camera, the code freezes and does not return an image.
Does V4L2 C API need any changes to use MIPI camera? Or is there any sample code snippet available for this (without gstreamer)?
I am developing a video game on a FPGA board running linux. I want to use the wiimote to control the game. Now I have a sensor bar with multiple infrared sources at both ends, and a wiimote. I want to track the position of the wiimote in space according to the data of the positions of the infrared sources read in from the IR camera. I have searched for the algorithms to do the positioning but couldn't find detailed algorithms. I am also wondering that whether there happened to be some read-to-use library which already have the positioning algorithm implemented so that I don't need to do it myself.
Currently I am manipulating wiimote with libwiimote library. I can get at most four postions of IR sources from the IR camera. How can I compute the position of the wiimote based on these data? Thanks!
How can I connect an Arduino board and MATLAB for image processing?
I am making an autonomous robot which require image processing in MATLAB.
You can use the MATLAB-to-Arduino package at the offical MATLAB site, "MATLAB Interface to Arduino".
If you have serial communication on the Arduino, Matlab has built in tools for talking with the chip over USB or RS232. It is fairly simple to setup, but if your images are high in resolution you may not get the necessary speed from standard RS232.
something along the lines of:
s=serial('COM1','baudrate',115200)
Then you can read and write to the Arduino through Matlab functions and scripts
You can get connected to the MATLAB interface by simply using the serial and fopen commands on MATLAB
eg:
s=serial('COM2','Baudrate',9600,'Databits',8);
fopen(s);
count=0;
while count<50
a=fscanf(s);
count=count+1;
end
fclose(s);
whereas on Arduino, use Serial.print() function.
Simple data can be sent using this. I never tried camera by using this technique. But by using a camera shield mounted on Ardunino, taking snapshots and later sending the data through Arduino to MATLAB as a matrix might work. Just an idea, might be possible.
Edit1:
I was looked up more into this, and found some potential hardwares for the same:
1. ArduCam Shield for Arduino
2. https://www.sparkfun.com/products/11418
I'd like to create an app that pulls multiple live video feeds, supplied either by coax, hdmi or some other standard, into WPF for manipulation (i.e. apply a few transforms or pixel shaders) which is then output to monitor. What would I look at to get started with this app - is there any hardware that would make things easier?
If you are pulling in standard broadcast via coax or over the air, a $100 ATSC HD TV tuner will do. I don't have any experience with HD capture cards (I think they run for about $1000), or more specifically, cards that take in a raw HD stream.
When you install a capture device (TV tuner, webcam, capture card) in Windows, it creates a DirectShow source filter wrapper for it. Based off what kind of hw you are targeting, determines how you create the DirectShow graph. I have no reason to expect HD capture cards to be different than any capture card or webcam (TV tuners are slightly different).
You can use my WPF MediaKit as a base. The web cam control may work out of the box or just require slight changes for an HD capture card. A TV tuner would require a lot more than just this.