LSD - Line Segment Detector / Android? -
LSD is a linear-timeline segment detector giving sub-pixel precise results. This parameter is designed to work on a digital image without tuning. It controls the number of false notifications of its own: On average, a false alarm is allowed in the image. There is a small example in the package,
Can I work on Android? And if I can, what is the proper way?
#include & lt; Stdio.h & gt; #include "lsd.h" int main (zero) {image_double image; Ntuple_list out; Unsigned int x, y, i, j; Unsigned int x = 512; / * X image size * / unsigned int y = 512; / * Y image size * / / * Create a simple image: left half black, right half gray * / image = new_image _ double (x, y); (Y = y; y; y ++) Image- & gt; Data [x + y * image-> Xsize] = x & lt; For X / 2 (x = 0; x; l; x; x ++); 0.0: 64.0; / * Image (X, Y) * / IplImage * imgInTmp = cvLoadImage ("C: \ Documents and Settings \ Eslam Farag \ My Documents \ Visual Studio 2008 \ Projects \ line \ hand.JPEG", 0); / * Lsd * / out = lsd (image); / * Print output * / printf ("% u line segment found: \ n", out-gt; size); (I = 0; i & lt; out-> size; i ++) {for (j = 0; j & lt; out-> gt; dim; j ++) printf ("% f", out- & Gt; value [i * & gt; dim + ja]); Printf ("\ n"); } / * Free memory * / free_image_double (image); Free_ntuple_list (outside); Return 0; } thanks :)
I think you use For C or C ++ development of your APK, you can just include that LSDH, its source file lsd.cpp, and then you have to pass the parameter for that line segment detector which will be enough but this case If you are using Java for your APK then you have to do a lot of modification, or you can get it Java Will transform into Ases or you'll get an alternative way to include in your project.
Comments
Post a Comment