Exporting 3D Images from C++ to Matlab .fig files - c++

I have a visual analytics program that handles the visualization of 3D datasets (e.g., MRI datasets). For multiple reasons, I want to be able to watch the result (3D-grid image visualizable using ray tracking techniques, e.g., the ray-marching algorithm) in Matlab. I see that Matlab relies on .fig files, but I do not find any documentation of its structure.
Does people know where .fig files are documented? Is there any C++ library that proposes such a functionality? My C++ code runs on a linux workstation and I do not own any Matlab license: the generated files are not meant to me but to others owning such a license.
Thanks!

Related

How do i go about developing a facial identification software that identify different users and show their name from an image database using C++

I'm trying to develop a facial recognition software that holds a database of different images and uses the camera to identify each person and shows their name on screen. I'm more familiar with using C++ and I assume python might be the best language to get the job done but I want to know how I can go about it with C++. what algorithm do I have to use and a break down of how I can do it. thank you (:
OpenCV must be installed on the local machine.
Paths to the classifier XML files must be given before the execution of the program. These XML files can be found in the OpenCV directory “opencv/data/haarcascades”.
Use 0 in capture.open(0) to play webcam feed.
For detection in a local video provide the path to the video.(capture.open(“path_to_video”)).
You can get in-depth knowledge here
Tutorial

How to apply wavelet filter to MRI nifti images?

I need to denoise nifti images using wavelet transform. I did it in MATLAB but I should write the code for my project in Python. I am new to Python.
Python has a neuroimaging community of practice that lives at http://nipy.org. In particular, they have a library called NiBabel (see their introduction and github) for reading nifti and other formats (this will replace MATLAB's niftiread). You may also be interested in the PyWavelets library, which can replace basic parts of the MATLAB wavelet toolbox. The Pillow library is probably the most up to date image editing/processing library for Python, but as far as I'm aware wavelets isn't something covered there.
Is that enough to get you started? A basic discussion of how Python packages work seems beyond the scope of this question, but you can do some reading at https://pypi.org/help/ if you are completely lost.

Creating PDF from PS programmatically on embedded platform

Is there a library/tool that can be used in C/C++ that would convert the PS (post script) file to .PDF file, on embedded platform (proprietary operating system, no windows, no linux)?
I was looking for some kind of library that could be ported to our OS. I have found basically only Ghostscript, but issue there is with the license, if i understood it correctly, we would have to make our source public, which is not possible for us...
Maybe a little bit more background, we are trying to find format that will be easily viewable by user. We already have our output in PS for other reasons (printer). But now we want to provide this output in file by itself, so we are trying to find feasible file format. We are considering the PS itself, but usual user does not have PS viewer, so that's why I am trying to find something to convert this to PDF. So perhaps alternative question could be, is there some another format that can be easily acquired from PS, such that "regular" user can view it?
The main complexity for converting PostScript to something else comes from the fact, that PostScript is a programming language and PostScrip files in fact are programs executed on the printer.
In contrast to PostScript, PDF is not a programming language. When converting PostScript to PDF (or anything else), you actually have to run the PostScript program and record the graphic primitive calls, executed during the execution of the PostScript program.
This general approach is needed, when you want to convert PostScript programs from any source to PDF.
But you wrote, that you are creating the PostScript code yourself. Perhaps your PostScript program is just a linear sequence of calls to drawing primitives and does not use anything like subroutines or control structures.
If not, it might be easy to change your generator to do those computation at creation time,that currently are performed at print time. You would end up in a linear sequence of calls to drawing primitives.
When there are no more computations done at print-time, it should not be too hard to directly create PDF instead of PostScript. This answer mentions an open source PDF generation library, that uses an MIT style license.
The AGPL licence for Ghostscript would require you to make your source open, yes. However Ghostscript is dual licenced, in addition to the AGPL licence you can purchase a commercial licence, which doesn't require you to open source your own code.
Rather than converting to PDF you can, of course, also simply use Ghostscript to render the PostScript to a bitmap, its usually pretty easy to wrap a viewer around that.
I should point out that there are other companies offering commercial licences for PostScript interpreters which are capable of creating PDF files and/or rendering PostScript. Adobe is the obvious one, there's also Global Graphics.
These days there are not many players left in the field, if you want to handle PostScript, and the AGPL or similar licences won't suit you, then you will need to go commercial.

c++ video compression library that supports many different compression algorithms?

For a scientific project i need to compress video data. The video however doesn't contain natural video and the quality characteristics of the compression will be different than for natural footage (preservation of hard edges for example is more important than smooth gradients or color correctness).
I'm looking for a library that can be easily integrated in an existing c++ project and that let's me experiment with different video compression algorithms.
Any suggestions?
Look at FFmpeg. It is the the most mature open source tool for video compression and decompression. It comes with a command line tool, and with libraries for codecs and muxers/demuxers that can be statically or dynamically linked.
As satuon already answered, FFmpeg is the go-to solution for all things multimedia. However, I just wanted to suggest an easier path for you than trying to hook your program up to its libraries. It would probably be far easier for you to generate a sequence of raw RGB images within your program, dump each out to disc (perhaps using a ridiculously simple format like PPM), and then use FFmpeg from the command like to compress them into a proper movie.
This workflow might cut down on your prototyping and development time.
As for the specific video codec you will want to use, you have a plethora of options available to you. One of the most important considerations will be: Who needs to be able to play your video and what software will they have available?

Opencv MPEG7 descriptors

I am working on the system that compares images. MPEG-7 standard provides some descriptors which can be used for that e.g: Dominant Color, Color Layout, Edge Histogramm, Color Coherence Vectors.
Do you know where i can get a source code for some of these methods?
Thx!
You can also use the Windows and Linux executables, or easy-to-use API based on OpenCV library, developed for BilVideo-7 video indexing and retrieval system: http://www.cs.bilkent.edu.tr/~bilmdg/bilvideo-7/Software.html.
The ISO distributes reference software as part of the MPEG-7 standard, and among other things it includes feature extraction code for the visual descriptors. The zip file contains another zip file called XMWin.zip, which contains the source. (Despite the "Win" name, it contains instructions for compiling on both windows and unix.)
Hope this helps to other programmers:
Here you can find one implementation on C#
Here another implementation in Java.
For Future readers, there's a CPP library that claims to be easy to use here.
https://github.com/mubastan/mpeg7fex
This has been tested on OpenCV 3, so this is at par the latest.