Webcam image live processing - algorithm

need to perform processing of webcam image - image should be captured, processed and displayed live. Could you recommend programming language? Already dobne with Delphi tsCap32 and java, but its runs slowly. Is there any solutions in other languages?
Thanks!

Try using C/C++ and OpenCV. It is fast and has a large community. A good starting point is to read the book: "Learning OpenCV"

Related

How to convert sequence of image file to video using c programming?

I am working on a V4L2 camera driver.The webcam taking number of sequence of image files.Now I want to convert it into video (mp4) file.How it is possible using FFMPEG/GSTREAM using pure c source code instead of ubuntu terminal command ?
GStreamer can be used to write applications using C. There are application guides available on their documentation site. But you need few extra topics related GObject as well to start using the framework.
I would recommend to go through their documentation site.
https://gstreamer.freedesktop.org/documentation/tutorials/index.html?gi-language=c
It is not that hard if you read through the documentation and they have lots of plugins available to to achieve quite lots of things related to audio/video processing.

Signal Processing/FFT On Live Input Audio

I was told this belongs in programming, not in the Signal Processing sub-exchange.
Is there a way to implement spectrum analysis (specifically FFT) on live audio in Windows?
I want to be able to read in audio from a microphone, and have a display on the screen that shows the resultant Fourier Transform.
It would also be useful if I could execute a program if a certain set of FFT characteristics occurred.
Thanks guys!
To do this you have a couple of options depending on your most preferred language/framework basically. I'm not sure how new you are to signal processing so I'll suggest a few options.
Visual Programming
These are all visual programming environments which don't actually require any writing of code, however Simulink and Pure Data both require a runtime for the user to run the program.
Simulink (Paid)
MathWorks/Matlab's visual programming tool that works really well in real-time (in my opinion). Using the Audio System Toolbox, you can easily capture microphone input from your system in realtime and carry out the FFT processing, plot the spectrum and, like you said, if certain FFT conditions are met then to carry out some further processing.
This isn't free software and requires having the Matlab/Simulink run-time installed to be used. You can also script your processing in Matlab's .m language as desired (a cross between Java, JS and C).
Max MSP (Paid)
A similar version to Simulink but developed as a standalone visual programming tool. This will allow you similar freedom to Simulink but I think it will be easier for re-distribution.
You can compile MAX MSP into executables to give to someone straight away. Here is a reference to get you started on using the FFT in MAX. Again, this isn't free but if you wanted to learn more about it then I think it's worth the money (if I recall it's not too expensive).
If you need some more custom processing than the built in modules, I believe you can design custom MAX modules using C or JavaScript. Max is designed to easily get system audio input / outputs and here's a link to get you started.
Bonus: You can design your own Ableton Live plugins with the Max4Live addon which just lets your MAX MSP projects get compiled into .VST format. So you can build custom FX if you are into music production.
Pure Data (PD) (Free)
A very bland open source version of MAX MSP but completely free. It may look dull at first but a lot of researches I know use it to build fairly complex systems that can do some serious data processing. There are also lots of community built extras for PD if you ever needed a custom module. Here is a link to get you started on the FFT in PD. You cannot compile applications with PD, but since it's completely free to install anyone can run your program after installing PD. Another link for troubleshooting audio I/O in PD (if it isn't working right out of the box).
Programming Languages
Now the visual stuff is a really good way to get started if you aren't already introduced to DSP or audio programming. Otherwise here a just a few options and links to get started and where I would recommend.
Matlab & Octave
Like before, the Audio Systems Toolbox supports realtime audio I/O within a Matlab script. This combined with Matlab's built in FFT function can have you setup programming realtime FFTs and plotting the response in no time at all (less than 10 lines of code or something).
Octave has it's own version of the FFT function and different backends for rendering plot responses, but no Audio Systems Toolbox. However, Playrec is also an opensource alternative for audio I/O in Matlab/Octave that supports realtime audio input and output.
(Octave is an open source equivalent to Matlab (Matlab needs a paid license to develop a program), but does not support all Matlab supported features).
Python
Due to the PyAudio module, realtime audio I/O and DSP is more possible using Python! I would recommend Python if you are just starting out for sure since it's a nice introduction into any programming language and can help with teaching the fundamentals of DSP before attempting lower level languages.
Here's where you can get started with real-time non-blocking audio I/O in Python with PyAudio. To plot your data you can use a library such as matplotlib (designed similar to Matlab's easy plotting functionality).
For your FFT there are multiple libraries out there but I'd start with the Scipy / Numpy one.
C
One of the classic (and sometimes) most daunting programming language. With no objects (unless you want to make them yourself) or other high level abstractions, C is one of the few languages that still feels like you're building a lot from the ground up (which personally I like).
To get started with audio, I'd look at, in my opinion, the most widely used cross-platform audio I/O library; portaudio. This will let you access the soundcard data inputs and outputs in realtime on Mac, Linux & Windows.
Once you get this up and running an FFT I would use to get started would be the KissFFT just because of it's pure simplicity to use. If you want to plot the data, I would maybe look at gnuplot, but this is'nt a very pretty route in terms of development.
If you are very new to programming I would not recommend this unless you really want to get stuck in.
C++
Both KissFFT and portaudio will also compile with C++ code, but here are a couple of higher level alternatives.
One of my favourites is the JUCE framework / development environment. It has built in cross-platform audio I/O and already has a custom FFT function as part of the framework. You can build custom VSTs for your music DAW if you want to as well. It also comes with 'easy' (if you know C++) access to graphics windows with higher level access to openGL, so you could get fancy when plotting your data in real-time. If i remember correctly, one of the Demo projects on first installation is a real-time FFT plot you can compile and see the input from your laptop mic. JUCE is free for personal use, but comes with a small license fee as an indie developer.
Otherwise another one that comes to mind is the QT C++ library/framework for UI design (mainly). This is a cross platform easy to use GUI designer, that also has high level classes for obtaining audio input from a Mac/Win/Linux mic. Here is just one example I came across using QT's multimedia classes and FFTReal to plot a realtime FFT spectrum.
Summary
I've suggested a lot of options, but also missed out a few other people may recommend like languages such as R, C#, Java, Rust etc... and there are so many suggestions it's impossible to cover them all but I think this should be enough to get started. If it were me in terms of experience:
Complete Beginner to Programming: Max MSP
Novice / Knows their way around a little bit: Python (with PyAudio)
Programmed in other languages maybe looking to gain more programming skills : C++ with JUCE
Any of these languages you pick will be good in future reference for software positions and many companies / researchers use them to prototype / develop realtime audio processing software.
This is just my opinion but hopefully this gets you well along your way!

Programming language selection for showing image with other images on

I want to make a program that displays an image with other images on it (a map with various icons on it). What language (and library!) would you recommend, based on these facts:
-I have some basic oop knowledge
-I'll need a free and windows OS IDE for that
I would guess java? But it is not easy to compress my question to a good quality google search string....
displays an image with other images on it
Almost every language can achieve this. Such as Python with Pillow C++ with opencv and many other options. (I believe most of mainstream languages will have their own image library)
The problem is, what you want to implement specifically?
if you just want to put some images on to another image, and you do not need extra interactive function. Go with Python and Pillow, it is easy to learn and can perfectly solve your problems.

DICOM and OpenCV

Hai everyone,
I would like to know whether OpenCV can process DICOM images for 3D reconstruction purpose. Is there any other software that can handle DICOM images other than MATLAB. What about VC++?
Check out VTK. It natively handles DICOM images.
OpenCV is extensible and is written in C++ (I'm not familiar with it, just going from the documentation). So a good start would be an open source C++ DICOM library, there are plenty available. Here is a list of 17:
Search I Do Imaging
C++ and dicom? I would recommend DCMTK. Efficient, solid, raliable and open source.

How to resize an image smoothly (with resampling) using Windows API calls?

I need to resize images and resample them so they don't end up all jagged (I think that's called aliasing).
I found some code (sorry, lost the link) that does this in pure VB6 code but it's a bit slow (2-5 seconds) and I'm displaying pictures in real time so I need something faster.
I seem to recall seeing some examples of doing this with the GDI+ library. An example in VB6 would be ideal, but I can probably work with a simple example with Windows API calls in another language.
WIA 2.0's Scale filter seems to do a decent job. Windows® Image Acquisition Automation Library v2.0 Tool: Image acquisition and manipulation component for VB and scripting
No need for any funky .Net interop.
You could:
Create a VB.net library that can return pictures to a VB6 program.
Write some VB.Net to resize pictures without anti-aliasing.
Alternatively Rod Stephen's book Visual Basic Graphics Programming apparently explains how to do it all in VB6.
Or try to call GDI+ from VB6. Here's a wrapper and type library, good luck! ("Bring your hatchet!")

Resources