I would like to use OpenCV in my Erlang application. One solution would be to write an Erlang port etc., but I'm sure it has been done before.
The ideal result would be to be able to configure OpenCV from Erlang, and never touch a line of C code. But is this possible ? How would you do that ?
Why not wrap the specific OpenCV configuration in a C application using the OpenCV C lib and call that app using Result = os:cmd('myapp'). That way you don't have to mess around with possible interoperability issues and have a clear separation between you C and Erlang code.
Related
Is there a simple way to convert Erlang code to c or cpp?
thanks
I wish to convert Wings 3D code (from the first release ) to c/cpp
What would you do after converting? If you plan to run the c/cpp code, you will not get all the Erlang platform capabilities.
Sometimes, people try to convert to the language they understand, while learning a new language.
i have been working with platformio for a few weeks now and have been able to create quite a bit for my microcontroller (atmega328p). I have always tried to get away from the Arduino structure. So no “void setup” or “void loop” but simple C.
Now I got a ESP8266, which I would like to compile with a C environment.
When I create the project now (for the 12E) it asks which framework I should use. I have tried them all by replacing the Arduino setup and loop with the int main(){} function, however it always came up with errors. Does anyone know how I can use a pure C environment for the ESP8266?
I am developing an image processing application in Centos with OpenCV using C/C++ coding. My intension is to have a single development platform for Linux and IOS (IPAD).
So if I start the development in a Linux environment with OpenCV installed ( in C/CPP ),Can I use the same code in IOS without going for Objective-C? I don't want to put dual effort for IOS and Linux, so how to achieve this?
It looks like it's possible. Compiling and running C/C++ on iOS is no problem, but you'll need some Objective-C for the UI. When you pay some attention to the layering/abstraction of your modules, you should be able to share most/all core code between the platforms.
See my detailed answer to this question:
iOS:Retrieve rectangle shaped image from the background image
Basically you can keep most of your CPP code portable between platforms if you keep your user interface code separate. On iOS all of the UI should be pure objective-C, while your openCV image processing can be pure C++ (which would be exactly the same on linux). On iOS you would make a thin ObjC++ wrapper class that mediates between Objective-C side and the C++ side. All it really does is translate image formats between them and send data in and out of C++ for processing.
I have a couple of simple examples on github you might want to take a look at: OpenCVSquares and OpenCVStitch. These are based on C++ samples distributed with openCV - you should compare the C++ in those projects with the original samples to see how much altering was required (hint: not much).
I am new to both openCV and Android. I have to detect objects in my project. So, I have decided to use ASIFT for the same. However, the code they have given here is very lengthy. It contains lots of C file. It also doesn't have openCV support.
Some search on the SO itself suggested that it is easier to connect the ASIFT code to the openCV library, but I can't figure out how to do that. Can anyone help me by giving some link or by telling the steps that I should use to add ASIFT to my openCv library, which I can further utilize in making my Android application?
Also, I would like to know whether using Android NDK along with JNI to make calls to the C files or using Android SDK along with binary package for my android project(Object Detection) would be a suitable option for me?
Finally , I solved my problem by using the source code given at the website of ASIFT developers. I compacted all the source files together to make my own library using make. I then called the required function from the library using JNI.
It worked for me, but the execution is taking approximate 2 mins on an Android device. Anyone having some idea about ways to reduce the running time ?
They used very simple and slow brute force matching (just for proving of concept). You can use FLANN library and it will help a lot. http://docs.opencv.org/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.html
Essentially what I'm trying to do, is turn the following function:
function [template, mask] = createiristemplate(eyeimage_filename)
into a form useable by Xcode. I've spent several hours poring over the internet, and have yet to find a clean way to make it work. Any help would be greatly appreciated.
If you are talking about Xcode, the mac IDE: https://en.wikipedia.org/wiki/Xcode
According to wikipedia, this software can support the following languages:
C, C++, Objective-C, Objective-C++, Java, AppleScript, Python and Ruby
So the only way, is to use matlab coder, it is a matlab tool to convert matlab code in C or C++ :
http://www.mathworks.fr/products/matlab-coder/index.html
But it is an expansive toolbox.