Create an OSGi bundle that is compatible with Android activity

Source: Internet
Author: User

Superpixel was originally presented by Xiaofeng Ren (ICCV 2003), but I have not yet found the source code for this original idea on the web; it's easier to get Greg Mori (CVPR 2004,ICCV 2005) based on The Xiaofeng ren algorithm does the code https://www.cs.sfu.ca/~mori/research/superpixels/. Thecode package is divided into 32bit and 64bit versions.

This code uses a mix of C and M programming, It's not going to work, There are still some problems to be aware of in the configuration of code and MATLAB.

Search, the configuration of the Greg Mori code is mainly for 32bit. There are two versions on the network. One is the configuration guide under Linux (32bit+matlab 2010a):/http kittipatkampa.wordpress.com/2011/02/28/how-to-install-greg-moris-superpixel-matlab-code/

The steps for configuration are very detailed, and the resulting problems are predictable. The reference value is large.

Another version is a simple revision of the domestic researcher http://blog.csdn.net/likuan/article/details/7389761 is also a test for version 32bit, suitable for testing Windows versions.

I downloaded the 64bit package, in the configuration or encountered the above two methods of modification are not the same place. Make a list of the specific processes first.

1. Download the benchmark library of image segmentation from Berkeley and extract it into the folder under your Superpixel code (assuming your code is extracted to a folder named Superpixel), the extracted directory structure is as follows:

2. Modify the path in ' segbench/dataset/bsdsroot.m ' according to the Kittipatkampa method;

3.mex directory Yu_imncut all c files, one by one Mex, ' Mex *.c ' is not good for .... This step is similar to the above two methods, the only difference is that because it is running on 64bit, the MEX command requires the following parameters:

Mex-o-largearraydims csparse.cmex-o-largearraydims ic.cmex-o-largearraydims imnb.cmex-o-largeArrayDims PARMATV.CME X-o-largearraydims spmd1.c
You can also write these commands to a file named ' MAKE.M ', batch run;

4. Modify the SP_DEMO.M header to add the access to the current path (this basic reference Likuan guidance)

S_cur_path = Fileparts (Mfilename (' FullPath ')), CD (S_cur_path); Addpath (Genpath (S_cur_path));

5.likuan guidence in the request to modify the CNCUT.M in the two spmd for the SPMD2, which is not required in 64bit code, for 64bit code, this step can be ignored;

6.Then Enjoy It!


7. Some notes because different systems have different built-in compilers (gcc,vc2008,2010 etc), it is recommended that you need to port the code to different machines to remove the original Mex file before running the code, and then re-MEX, which avoids unnecessary errors.

Of course, the code is still some warning, I am more lazy than to delve into which a good suggestion pm I


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.