Last version of GraphicsMagick for raspbian (Raspberry Pi 3) - c++

I want to use the GraphicsMagick++ library on a C++ project that I am working on in a Raspberry Pi 3 (Raspbian).
I have installed the package using the following command:
sudo apt-get install libgraphicsmagick++-dev
After playing a bit, I have found that the method Image::extent is not defined on Image.h header, while is is shown on the documentation.
Is there any newer version? How to install it?

You can find all the packages related to libgraphicsmagick in debian on https://packages.debian.org/search?keywords=libgraphicsmagick

Related

OpenCV version showing wrong

I had installed opencv 2.4.9 it worked fine but I was not able to use imgproc header and drawMarker functions so I decided to install opencv 4.1.0 and I ran the cmake and everything but when I check the opencv version using pkg-config --modversion opencv it shows 2.4.9.
by the way, I use ubuntu 14.04 and want to use c++ with opencv.
This is a common mistake. People are installing opencv from the first link and it is generally installing opencv 2.4.9 automatically they do not decide the version while installing.
First thing you need to do is to uninstall opencv. There is a post in this link how to uninstall opencv. The way I prefered:
sudo apt-get autoremove opencv-doc opencv-data libopencv-dev libopencv2.4-java libopencv2.4-jni python-opencv libopencv-core2.4 libopencv-gpu2.4 libopencv-ts2.4 libopencv-photo2.4 libopencv-contrib2.4 libopencv-imgproc2.4 libopencv-superres2.4 libopencv-stitching2.4 libopencv-ocl2.4 libopencv-legacy2.4 libopencv-ml2.4 libopencv-video2.4 libopencv-videostab2.4 libopencv-objdetect2.4 libopencv-calib3d2.4
Then you need to install opencv again. I strongly recommend you this link. Read that article carefully and do the steps. You can decide the opencv version in the line for example version 3.4.3:
git checkout 3.4.3

upgrading protobuf tensorflow on jetson tx2

To give as much background as possible -
I have a machine learning model trained using keras i'm trying to embed on an nvidia jetson tx2.
I have set up tensorflow on there (a bit of a pain in itself) however when i run my script i'm hitting an error with protobuf.
Using TensorFlow backend.
[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.1.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "external/protobuf/src/google/protobuf/any.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): This program requires version 3.1.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "external/protobuf/src/google/protobuf/any.pb.cc".)
Aborted (core dumped)
So - i upgraded protobuf using pip at first but i thought the clash is because c++ version is taking priority and the version in linux was still stating 2.6.1 however after building in c++ the version is now shown as 3.1.0 however i am still getting the same error.
From the nvidia dev forums i received some feedback
"/usr/lib/aarch64-linux-gnu/libprotobuf.so.9.0.1
This means that C/C++ code will find version 2.6.
pip install protobuf-3.1.0-py2.py3-none-any.whl
This means that Python code will find version 3.1.
You need to upgrade the C++ (system) library to match version 3.1.
I don't think there's a default package on Ubuntu that does this, so you will have to either hack it by building your own and installing it on top of the system package, or you will have to find a deb package that has a newer version that will still install on your current system."
Ive really been struggling with this as i cant find a way to upgrade the system files. Any help would be much appreciated
Thanks
edit: i'm also wondering could this be a clash with GTK (i am also using openCV here so thats worth a mention!)
Please check your version of libprotobuf-dev.
Please try to uninstall your existing one on your PC with following commands:
apt-get remove --purge libprotobuf-dev
Then, build new version of libprotobuf-dev:
apt-get install autoconf automake libtool curl make g++ unzip
wget https://github.com/google/protobuf/releases/download/v3.5.0/protobuf-cpp-3.5.0.tar.gz
tar -xvf protobuf-cpp-3.5.0.tar.gz
cd protobuf-3.5.0
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig
Good luck.
References:
https://github.com/BVLC/caffe/issues/5711
https://github.com/google/protobuf/issues/2979
step 1:
first, uninstall with purge protobuf
sudo apt-get remove --purge libprotobuf
step 2:
start a fresh one
$ wget https://raw.githubusercontent.com/jkjungavt/jetson_nano/master/install_protobuf-3.6.1.sh
sudo chmod +x install_protobuf-3.6.1.sh
./install_protobuf-3.6.1.sh #this time will take 30 min on my board.

Opencv nonfree package installation in raspberry pi 2 mod b

Is it possible to install opencv nonfree package in raspberry pi 2 mod b.?
As i have done coding in C++ and when i ported my code to raspberry pi(arm processor) with raspbian OS this code was not working as it was showing unable to locate nonfree packge. tried with adding repositories
sudo add-apt-repository --yes ppa:xqms/opencv-nonfree
sudo apt-get update
sudo apt-get install libopencv-nonfree-dev
and many other ways still it was not working. then i changed the raspbian OS to ubuntu 14.04 LTS raspberry pi supported, still no change..
Is it that raspberry pi with arm processor won't support this package?
Please help me by suggesting the method how to install this package.
Thanks in advance.

Matplotlib install issues. Pip Centos - Freetype "Missing" when it is installed

I am using a virtualenv for a django setup. I am trying to build a view that pulls data from logs and then graphs the data. Eventually I would like to have this real-time and live. If you have any recommendations on other solutions that would suit my project best, please do not hesitate to include them in the comment fields below.
I have attempted to install matplotlib from pip using pip install matplotlib.
I receive the following message:
* The following required packages can not be built:
* freetype
I then validated that it was installed
yum install freetype
Package freetype-2.3.11-14.el6_3.1.x86_64 already installed and latest version
I then found that there is a python-matplotlib which is an older version .99. However, I want to keep this inside of the virtual environment and not system wide.
find / -name *freetype*
/var/lib/yum/yumdb/f/d2807dcfe3762c0b9f8ef1d9bf0f05788e73282a-freetype-2.3.11-14.el6_3.1- x86_64
/usr/lib64/libfreetype.so.6.3.22
/usr/lib64/libfreetype.so.6
/usr/share/doc/freetype-2.3.11
I searched all over stackoverflow and only saw solutions for ubuntu which did not transfer over to centos.
Thank you for your time,
John
pip is going to compile matlibplot on your local machine, so you'll need freetype development headers installed as well.
CentOS 6+, Fedora, etc.:
$ sudo yum -y install freetype freetype-devel libpng-devel
On older operating systems (e.g. CentOS 5), you may run into a more specific freetype versioning issue with newer releases of matlibplot. If you're version agnostic, sticking with a legacy 1.3.x release will negate these dependency issues:
$ pip install matplotlib==1.3.1
Please note, you may need to downgrade your numpy to 1.8 in order to make matplotlib 1.3 work.
$ pip install numpy==1.8
Good luck!
I have just had a similar (albeit not exactly the same) situation. I'll write it up here as this page comes up among the first search results.
CentOS 5
pip install matplotlib complains about freetype
Both freetype and freetype-devel are installed.
~/.pip/pip.log provides the explanation of the problem. There is the line:
freetype: no [Requires freetype2 2.3 or later. Found 2.2.1.]
Obviously, the solution is either to upgrade freetype or downgrade matplotlib.
The second is easier (assuming I am OK with the older version).
pip install matplotlib==1.3.1 works fine.
On the matplotlib installation, this is what I did. Not sure if this is going to help you. Just followed the steps here:
http://pkgs.org/centos-6/centos-x86_64/python-matplotlib-0.99.1.2-1.el6.x86_64.rpm.html
I did not use pip, btw and have CentOS 6.4.
I had this happen to me in two different situations, see if yours is one of them:
freetype was installed, but not in the $PATH yet. Just exiting the shell and starting a new one fixed this.
I was building matplotlib from source, and trying to build from the master branch. After I switched to v1.3.x it correctly detected freetype.

BLAS library incompatible with Fortran 77 compiler settings

I'm trying to install Octave-3.6.2 from source on Ubuntu 12.04 with KDE desktop but when I run the Octave configure script I get this error
BLAS library was detected but found incompatible with your Fortran 77
compiler settings
I used ./configure F77=gfortran as was suggested by numerous web searches and I've ensured that the alternatives system F77 files are moved out of harms way as per the comments in this SO post. The installed BLAS libraries are those installed by the package manager.
What does the error mean and how do I remedy it?
Try installing the Package liblapack-dev, libblas-dev, and if it exists, libblas-64. While not Ubuntu, I had the same issue and needed to install the fedora fc20 equivalent packages which are blas-devel, blas64-devel, lapack-devel, and lapack64-devel. The standard routine for getting the build dependencies is
sudo yum-builddep octave
While that installed most of the dependencies, I needed to follow with the following before it would completely configure. This is from an almost scratch Fedora fc20 install with updates as of 10/23/2014.
sudo yum install lapack64-devel lapack64
sudo yum install gl2ps-devel qrupdate-devel qt-devel qscintilla-devel java-devel
Although I did not explicitly list the blas-devel and blas64-devel packages, they were installed as dependencies of the libpack packages as was libpack-devel and plain libpack.
I suppose for Ubuntu it may be apt-get. Either way, here is another post that talks about an earlier version of Ubuntu.
BLAS and LAPACK libraries required for compiling
I fixed this problem by moving the BLAS to /usr/lib64.
for slackware recompile blas using -libdir=/usr/lib64
Run sudo apt-get build-dep octave
This will install all dependencies for octave
I was compiling octave-4.0.1 on openSUSE-12.3_x86-64 and met this problem. Before this, the blas lib (libblas3) was already installed. Then I installed the 32bit lib (libblas3-32bit), nothing changed. Then I installed the package named "blas-devel", it's resolved.
That package includes these files:
/usr/lib64/libblas.a
/usr/lib64/libblas.so
/usr/lib64/libblas_pic.a