emgucv - Using Seq in emgu c# -


i have self-defined struct of point (as opposed system.drawing.point):

struct pointd {     public double x,y; } 

i want seq of points, , there extract minimum area rectangle:

using (memstorage stor = new memstorage()) {     seq<pointd> seq = new seq<pointd>(cvinvoke.cv_maketype(6, 2), stor);     seq.push(new pointd(0.5, 0));     seq.push(new pointd(1.0, 0));     seq.push(new pointd(0, 1.0));     seq.push(new pointd(1.0, 1.0));     var output = seq.getminarearect(); } 

however, code throws exception @ getminarearect(), saying input sequence must 2d points. question there way data format through correctly? thinking lack bit of something, code can work system.drawing.point.

i assume following work:

int[] pts = {   new pointf(0.5, 0),   new pointf(1.0, 0),   new pointf(0, 1.0),   new pointf(1.0, 1.0) }; mcvbox2d box = pointcollection.minarearect(pts); 

additional example : http://www.emgu.com/wiki/index.php/minimum_area_rectangle_in_csharp


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -