I have downloaded SoPlex, but I don't know how to install it so that I can use it in Matlab. The installation says that CMake can be used to install it (https://soplex.zib.de/doc/html/INSTALL.php), but I don't know how to do it on Windows. I get error of configuration when I use CMake GUI probably because of not knowing which folder to choose. Is there any other way to download and use this software directly on Matlab?
Thanks for any help
Related
I am trying to install the MATLAB Runtime (see www.mathworks.com/products/compiler/mcr) on Ubuntu.
I think what I did is right before it tell me to set environment variables, others need to set two variables such as LD_LIBRARY_PATH and XAPPLRESDIR, but when I install MCR , the config information only tell me to set LD_LIBRARY_PATH.
Has anyone out there successfully installed MATLAB Runtime(R2017b (9.3)) on Ubuntu? Any help would be appreciated.
I have looked at many resources. I just want a simple way to use the newest OpenCV with Matlab 2017a. MinGW doesn't work and a compiler but I can't seem to get Visual C++ working. I can use OpenCV in Visual Studio but what compiler does Matlab want from me and how do I obtain it?
There is a way to use opencv from matlab without compiling any mex files, and without using the computer vision toolbox.
You can call opencv through matlab via python commands.
1) Download and install the CPython distribution, not Anaconda
2) from the command prompt, install the opencv and other packages you want using the pip command > python -m pip install opencv-python
3) Follow the procedure in the matlab help for ensuring matlab knows where to look for the python installation
4) use the syntax py.cv2.function to call the opencv function
If you keep the data types as python data types in matlab while using the py.cv2 functions there isn't too much of a speed hit.
As #Miki mentions in the their comment, have you checked out this page on the MathWorks site? It has many resources, the main one is the Computer Vision System Toolbox OpenCV Interface. It comes with some examples which would be a good starting point. And if those aren't close to what you want, try another one of the community examples on the File Exchange and trying to make small changes to it.
For each version of MATLAB you can find the supported compilers in the documentation. You can also use -v flag as shown blow to see all the paths where MATLAB looks for a C++ compiler.
mex -setup -v
I am installing the MinGW-w64 C/C++ compiler for use in MATLAB 20176b but there is several errors for that. How can install this compiler with all the necessary adjustments to use in Matlab 2016b?
As the first way directly from Matlab:
Downloaded the MinGW-w64 C/C++ compiler for Windows from here:
https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c++-compiler
After running true Matlab and approval for installation and installing the packages, it gives an error as:
There was a problem installing the third-party software. To resolve
this issue, contact Technical Support
The second approach is to install the MinGW-w64 C/C++ compiler separately and then adjust to use in Matlab. But After installation Matlab doesn't recognize it.
The details provided on Matlab not recognizing the MinGW installation are a bit vague, but I'll take a shot at it.
When installing MinGW, the default installation directory is one with spaces in the path (Program Files). For some reason, this is not supported by Matlab (https://www.mathworks.com/help/matlab/matlab_external/compiling-c-mex-files-with-mingw.html):
Do not install MinGW in a location with spaces in the path name. For example, do not use: C:\Program Files\TDM-GCC-64
In my situation, I installed MinGW directly on the C drive. As such, my installation directory has the following layout:
C:\mingw64
C:\mingw64\bin
C:\mingw64\etc
C:\mingw64\*...
Once that is installed, all you need to do is point Matlab to the installation directory, in my case, I need to run the following command:
setenv('MW_MINGW64_LOC','C:\mingw64')
After that, you should be squared away to run the mex compilation command.
I am using matlab on a high performance computer (HPC). But they don't have a toolbox I need. I need to install it . Is it possible that I install a toolbox via matlab script locally?
Yes, look at Matlab's addpath, genpath and savepath functions.
Either use addpath(genpath(...)) in the command line followed by savepath to permanently (and globally) add it to the path. Or else you could have addpath(genpath(...)) at the start of your main script to just make sure you always have that toolbox loaded for relevant sessions without permanently adding a toolbox that other users might nit need to the path.
Oh wait, are you asking if you can install a toolbox you don't have at all like from a package repository? In that case I don't think so.
This question is related to another question I asked here:
Error reading image using jpeg_read from Matlab's jpeg toolbox
I've been trying to compile the jpeg toolbox under Windows 7 (using the commands Shai provided in the answer to the question I posted), but I get the following error:
jpeg_read.c(52) : fatal error C1083: Cannot open include file: 'jerror.h': No such file or directory
which I believe happened because I haven't built libjpeg. I tried to build libjpeg6b like jpegtoolbox's README says, but I couldn't find a clear guide on how to do it on Windows with visual studio 2010 (and libjpeg's install document doesn't help much), so I ended building libjpeg8d.
My question is if there's any way to use libjpeg8d to compile the jpeg toolbox. I've tried running the command:
mex -I<IJGPATH> jpeg_read.c <LIBJPEG>
with IJGPATH being my libjpeg8d installation folder and LIBJPEG being the path to the jpeg.lib file, inside IJGPATH/Release, but I still get the same missing jerror.h error as before.
Thanks in advance.
Jpeg toolbox contains Matlab routines for manipulating JPEG files. While Matlab's built-in IMREAD and IMWRITE functions provide basic conversion between JPEG files and image arrays, they do not provide access to the details of the JPEG image, such as the JPEG coefficients or the quantization tables.
The routines in this package provide additional functionality for directly accessing the contents of JPEG files from Matlab, including the Discrete Cosine Transform (DCT) coefficients, quantization tables, Huffman coding tables, color space information, and comment markers. The toolbox can be added to Matlab to use the functions.
First check whether the following are installed in your system.
1.Microsoft windows sdk7
2.Microsoft visual c++ 2010 express
if they are not installed, Download and install them in the order specified.
Note: Before installing windows sdk, uninstall any redistributalbe packages of visual c++ 2010. Else windows sdk produces problem during installation and the install fails. During installation dont forget to check the 'x64 Libraries' for 64bit OS and 'x86 Libraries' for 32bit OS, under Windows Headers and Libraries. This allows to use compiler tools for 64 bit operating systems. Once it overs, install visual c++. These tools are free and available at microsoft website. Both online and offline installers are available.
Now comes the real integration process
Step 1: Download the jpeg toolbox and extract it to a separate folder (eg. jpeg)
Download jpeg toolbox
Step 2: Download jpeg source files and extract it to a separate folder (eg.jpegsrc). In the folder jpeg-6b which is in jpegsrc, rename jconfig.vc to jconfig.h and makefile.vc to makefile
Download jpegsrc file
Step 3: From start->All programs-> Microsoft windows sdk , open the command prompt. This opens the 'windows x64 debug environment'. Navigate to the jpeg-6b folder which is inside the jpegsrc folder which is extracted at step 2. Run the command 'nmake clean all' without quotes. This creates the libjpeg.lib file in the same folder.
Step 4: Now open the matlab and choose the workfolder as jpeg, created in step 1.
Now in the command windows run the following commands,
mex -I jpeg_read.c
mex -I jpeg_write.c
Replace with the path to the IJG jpeg-6b directory created in step 2, and
with the full path to the IJG code library file (libjpeg.lib).
To use the jpeg_read and jpeg_write functions copy jpeg_read.mexw64 and jpeg_write.mexw64 files created above to your work directory. Dont uninstall visual c++ compiler or it wont work.
If you are trying to work in Windows, you need to rename jerror.vc to jerror.h
Also, when you mex the files, you need to edit the jpeg_read.c and jpeg_write.c from include to include "jerror.h"