Is there an open source lib for scanning and decoding a QR code on desktop? - desktop

I am looking for code demonstrating how to both capture and decode a QR code on a desktop (Windows/Linux) using a web cam. Is there such available? (only found a lib to decode QR codes, but not capture them)
Thanks

ZXing will work just fine, if you are a) willing to work in Java on the desktop, and b) can write the glue code to get frames off the webcam. The rest is done by the library once you feed it those images.

Related

How can I use Mediapipe handrecognition (using C++) with video feed from other than webcam

Mediapipe handrecognition example uses webcam to feed itself. Also outputs to screen. I need to feed input stream and get output stream programmaticaly. I cannot find any c++ examples for it. There are python, javascript and android API's. But c++ examples works only from graph. So i cannot find an example to feed it manually. Is there any easy solution ?

Using c++ to decode qr code from a png to a link

I am currently in the process of learn c++ and I have decided to make a simple program that takes a .png file and exports the link inside it. I have looked it up and discovered ZXing but I still can't figure out how to implement it easily.
The ones I've found consists of scanning using webcam etc instead of a very simple version.
First, you need a library to read the images. CImg is good, it is a header only library build on top of the base libraries for the different images format: https://cimg.eu/
Assuming the image is a clean QR code you can skip the complex computer vision recognition part.
For the decoding part I am not sure, I don't know ZXing but it looks like the c++ port is no longer maintained anyway. Still, once you have the clean image it should not be a problem to use it.
You might want to have a look at the most recent c++ port of ZXing: https://github.com/nu-book/zxing-cpp
The project includes a trivial example application that does exactly what you want.

Convert Movie to OpenNI *.oni video

The Kinect OpenNI library uses a custom video file format to store videos that contain rgb+d information. These videos have the extension *.oni. I am unable to find any information or documentation whatsoever on the ONI video format.
I'm looking for a way to convert a conventional rgb video to a *.oni video. The depth channel can be left blank (ie zeroed out). For example purposes, I have a MPEG-4 encoded .mov file with audio and video channels.
There are no restrictions on how this conversion must be made, I just need to convert it somehow! Ie, imagemagick, ffmpeg, mencoder are all ok, as is custom conversion code in C/C++ etc.
So far, all I can find is one C++ conversion utility in the OpenNI sources. From the looks of it, I this converts from one *.oni file to another though. I've also managed to find a C++ script by a phd student that converts images from a academic database into a *.oni file. Unfortunately the code is in spanish, not one of my native languages.
Any help or pointers much appreciated!
EDIT: As my usecase is a little odd, some explanation may be in order. The OpenNI Drivers (in my case I'm using the excellent Kinect for Matlab library) allow you to specify a *.oni file when creating the Kinect context. This allows you to emulate having a real Kinect attached that is receiving video data - useful when you're testing / developing code (you don't need to have the Kinect attached to do this). In my particular case, we will be using a Kinect in the production environment (process control in a factory environment), but during development all I have is a video file :) Hence wanting to convert to a *.oni file. We aren't using the Depth channel at the moment, hence not caring about it.
I don't have a complete answer for you, but take a look at the NiRecordRaw and NiRecordSynthetic examples in OpenNI/Samples. They demonstrate how to create an ONI with arbitrary or modified data. See how MockDepthGenerator is used in NiRecordSynthetic -- in your case you will need MockImageGenerator.
For more details you may want to ask in the openni-dev google group.
Did you look into this command and its associated documentation
NiConvertXToONI --
NiConvertXToONI opens any recording, takes every node within it, and records it to a new ONI recording. It receives both the input file and the output file from the command line.

combining separate audio and video files into one file C++

I am working on a C++ project with openCV. It is a simple web cam application with basic features like capturing pictures and videos. I have already been able to save video (w/o audio). Since openCV doesnot support audio processing, I was wondering if there is any way I can record audio separately in a different file and later combine those together to get one video file.
While searching on the internet, I did hear something about using ffmpeg with openCV. But I just cant figure out how to do it exactly.....
Can you guys help me? I would be very grateful... Thankyou!
P.S. I have used openCV and QT (for GUI)
As you said, opencv doesn't by itself deal with audio. However once you get a separate audio and video file, you can combine them using a technique called muxing. There are many many ways to do this. I use VirtualDub for most of my muxing needs, although it is windows only (not sure if that's a problem). I know ffmpeg is also capable of muxing (via the command line interface), I can't recall what the command is. There's also mplayer and a multitude of other programs out there to do this.
as far as i know openCV is good for video/image processing. To support audio processing, you can use other libraries e.g. PortAudio or C-sound.

Creating web-browser playable webm files with vp8 SDK?

I'm using the vp8 SDK (www.webmproject.org) to create a vp8-encoded video file. However, the SDK sample produces an IVF file, which the browser doesn't play.
I know the webm format is a matroska container so I guess I should store the video data in that format, but the mkv format specification is lengthy and complex and I don't think I should reinvent the wheel by figuring it out by myself.
So I would like to know if someone can recommend a sample of how to encode and produce a playable webm vp8 file.
If there is no such sample (as my searches on google suggest) at least point me to a simple and usable matroska lib which is proven to work for the browsers.