mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
remove some incomplete functions
This commit is contained in:
parent
fd4af1b049
commit
faa50fdb0a
7 changed files with 0 additions and 111 deletions
|
@ -311,10 +311,7 @@ void define_ruby_class()
|
||||||
rb_define_method(rb_klass, "invert", RUBY_METHOD_FUNC(rb_invert), -1);
|
rb_define_method(rb_klass, "invert", RUBY_METHOD_FUNC(rb_invert), -1);
|
||||||
rb_define_singleton_method(rb_klass, "solve", RUBY_METHOD_FUNC(rb_solve), -1);
|
rb_define_singleton_method(rb_klass, "solve", RUBY_METHOD_FUNC(rb_solve), -1);
|
||||||
rb_define_method(rb_klass, "svd", RUBY_METHOD_FUNC(rb_svd), -1);
|
rb_define_method(rb_klass, "svd", RUBY_METHOD_FUNC(rb_svd), -1);
|
||||||
rb_define_method(rb_klass, "svbksb", RUBY_METHOD_FUNC(rb_svbksb), -1);
|
|
||||||
rb_define_method(rb_klass, "eigenvv", RUBY_METHOD_FUNC(rb_eigenvv), -1);
|
rb_define_method(rb_klass, "eigenvv", RUBY_METHOD_FUNC(rb_eigenvv), -1);
|
||||||
rb_define_method(rb_klass, "calc_covar_matrix", RUBY_METHOD_FUNC(rb_calc_covar_matrix), -1);
|
|
||||||
rb_define_method(rb_klass, "mahalonobis", RUBY_METHOD_FUNC(rb_mahalonobis), -1);
|
|
||||||
|
|
||||||
/* drawing function */
|
/* drawing function */
|
||||||
rb_define_method(rb_klass, "line", RUBY_METHOD_FUNC(rb_line), -1);
|
rb_define_method(rb_klass, "line", RUBY_METHOD_FUNC(rb_line), -1);
|
||||||
|
@ -349,7 +346,6 @@ void define_ruby_class()
|
||||||
rb_define_private_method(rb_klass, "__find_corner_sub_pix", RUBY_METHOD_FUNC(rbi_find_corner_sub_pix), -1);
|
rb_define_private_method(rb_klass, "__find_corner_sub_pix", RUBY_METHOD_FUNC(rbi_find_corner_sub_pix), -1);
|
||||||
rb_define_method(rb_klass, "good_features_to_track", RUBY_METHOD_FUNC(rb_good_features_to_track), -1);
|
rb_define_method(rb_klass, "good_features_to_track", RUBY_METHOD_FUNC(rb_good_features_to_track), -1);
|
||||||
|
|
||||||
rb_define_method(rb_klass, "sample_line", RUBY_METHOD_FUNC(rb_sample_line), 2);
|
|
||||||
rb_define_method(rb_klass, "rect_sub_pix", RUBY_METHOD_FUNC(rb_rect_sub_pix), -1);
|
rb_define_method(rb_klass, "rect_sub_pix", RUBY_METHOD_FUNC(rb_rect_sub_pix), -1);
|
||||||
rb_define_method(rb_klass, "quadrangle_sub_pix", RUBY_METHOD_FUNC(rb_quadrangle_sub_pix), -1);
|
rb_define_method(rb_klass, "quadrangle_sub_pix", RUBY_METHOD_FUNC(rb_quadrangle_sub_pix), -1);
|
||||||
rb_define_method(rb_klass, "resize", RUBY_METHOD_FUNC(rb_resize), -1);
|
rb_define_method(rb_klass, "resize", RUBY_METHOD_FUNC(rb_resize), -1);
|
||||||
|
@ -2878,18 +2874,6 @@ rb_svd(int argc, VALUE *argv, VALUE self)
|
||||||
return rb_ary_new3(3, w, u, v);
|
return rb_ary_new3(3, w, u, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* call-seq:
|
|
||||||
* svbksb
|
|
||||||
*
|
|
||||||
* not yet.
|
|
||||||
*/
|
|
||||||
VALUE
|
|
||||||
rb_svbksb(int argc, VALUE *argv, VALUE self)
|
|
||||||
{
|
|
||||||
rb_raise(rb_eNotImpError, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* eigenvv!(<i>[eps = 0.0]</i>) -> [eigen_vectors(cvmat), eigen_values(cvmat)]
|
* eigenvv!(<i>[eps = 0.0]</i>) -> [eigen_vectors(cvmat), eigen_values(cvmat)]
|
||||||
|
@ -2926,31 +2910,6 @@ rb_eigenvv(int argc, VALUE *argv, VALUE self)
|
||||||
return rb_ary_new3(2, eigen_vectors, eigen_values);
|
return rb_ary_new3(2, eigen_vectors, eigen_values);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* call-seq:
|
|
||||||
* calc_covar_matrix()
|
|
||||||
*
|
|
||||||
* not yet.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
VALUE
|
|
||||||
rb_calc_covar_matrix(int argc, VALUE *argv, VALUE self)
|
|
||||||
{
|
|
||||||
rb_raise(rb_eNotImpError, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* call-seq:
|
|
||||||
* mahalonobis(vec, mat) -> float
|
|
||||||
*
|
|
||||||
* not yet.
|
|
||||||
*/
|
|
||||||
VALUE
|
|
||||||
rb_mahalonobis(int argc, VALUE *argv, VALUE self)
|
|
||||||
{
|
|
||||||
rb_raise(rb_eNotImpError, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
|
@ -3824,43 +3783,6 @@ rb_good_features_to_track(int argc, VALUE *argv, VALUE self)
|
||||||
return corners;
|
return corners;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* call-seq:
|
|
||||||
* sample_line(p1, p2[,connectivity = 8]) {|pixel| }
|
|
||||||
*
|
|
||||||
* not yet.
|
|
||||||
*/
|
|
||||||
VALUE
|
|
||||||
rb_sample_line(int argc, VALUE *argv, VALUE self)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
VALUE p1, p2, connectivity;
|
|
||||||
if (rb_scan_args(argc, argv, "21", &p1, &p2, &connectivity) < 3)
|
|
||||||
connectivity = INT2FIX(8);
|
|
||||||
CvPoint point1 = VALUE_TO_CVPOINT(p1), point2 = VALUE_TO_CVPOINT(p2);
|
|
||||||
int size;
|
|
||||||
switch(FIX2INT(connectivity)) {
|
|
||||||
case 4:
|
|
||||||
size = abs(point2.x - point1.x) + abs(point2.y - point1.y) + 1;
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
size = maxint(abs(point2.x - point1.x) + 1, abs(point2.y - point1.y) + 1);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
rb_raise(rb_eArgError, "argument 3(connectivity) should be 4 or 8. 8 is default.");
|
|
||||||
}
|
|
||||||
VALUE buf = cCvMat::new_object(1, size, cvGetElemType(CVARR(self)));
|
|
||||||
cvSampleLine(CVARR(self), point1, point2, CVMAT(buf)->data.ptr, FIX2INT(connectivity));
|
|
||||||
if (rb_block_given_p()) {
|
|
||||||
for(int i = 0; i < size; i++) {
|
|
||||||
//Data_Wrap_Struct(cCvScalar::rb_class(), 0, 0, CVMAT(buf)->data.ptr[]);
|
|
||||||
//rb_yield(cCvScalar::new_object);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return buf;
|
|
||||||
*/
|
|
||||||
return Qnil;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
|
|
|
@ -132,11 +132,8 @@ VALUE rb_det(VALUE self);
|
||||||
VALUE rb_invert(int argc, VALUE *argv, VALUE self);
|
VALUE rb_invert(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rb_solve(int argc, VALUE *argv, VALUE self);
|
VALUE rb_solve(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rb_svd(int argc, VALUE *argv, VALUE self);
|
VALUE rb_svd(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rb_svbksb(int argc, VALUE *argv, VALUE self);
|
|
||||||
VALUE rb_eigenvv(int argc, VALUE *argv, VALUE self);
|
VALUE rb_eigenvv(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rb_eigenvv_bang(int argc, VALUE *argv, VALUE self);
|
VALUE rb_eigenvv_bang(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rb_calc_covar_matrix(int argc, VALUE *argv, VALUE self);
|
|
||||||
VALUE rb_mahalonobis(int argc, VALUE *argv, VALUE self);
|
|
||||||
|
|
||||||
VALUE rb_dft(int argc, VALUE *argv, VALUE self);
|
VALUE rb_dft(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rb_dct(int argc, VALUE *argv, VALUE self);
|
VALUE rb_dct(int argc, VALUE *argv, VALUE self);
|
||||||
|
@ -172,7 +169,6 @@ VALUE rb_corner_harris(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rbi_find_corner_sub_pix(int argc, VALUE *argv, VALUE self);
|
VALUE rbi_find_corner_sub_pix(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rb_good_features_to_track(int argc, VALUE *argv, VALUE self);
|
VALUE rb_good_features_to_track(int argc, VALUE *argv, VALUE self);
|
||||||
|
|
||||||
VALUE rb_sample_line(int argc, VALUE *argv, VALUE self);
|
|
||||||
VALUE rb_rect_sub_pix(int argc, VALUE *argv, VALUE self);
|
VALUE rb_rect_sub_pix(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rb_quadrangle_sub_pix(int argc, VALUE *argv, VALUE self);
|
VALUE rb_quadrangle_sub_pix(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rb_resize(int argc, VALUE *argv, VALUE self);
|
VALUE rb_resize(int argc, VALUE *argv, VALUE self);
|
||||||
|
@ -208,7 +204,6 @@ VALUE rb_draw_contours_bang(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rb_pyr_segmentation(VALUE self, VALUE level, VALUE threshold1, VALUE threshold2);
|
VALUE rb_pyr_segmentation(VALUE self, VALUE level, VALUE threshold1, VALUE threshold2);
|
||||||
VALUE rb_pyr_mean_shift_filtering(int argc, VALUE *argv, VALUE self);
|
VALUE rb_pyr_mean_shift_filtering(int argc, VALUE *argv, VALUE self);
|
||||||
VALUE rb_watershed(VALUE self, VALUE markers);
|
VALUE rb_watershed(VALUE self, VALUE markers);
|
||||||
|
|
||||||
VALUE rb_moments(int argc, VALUE *argv, VALUE self);
|
VALUE rb_moments(int argc, VALUE *argv, VALUE self);
|
||||||
|
|
||||||
VALUE rb_hough_lines(int argc, VALUE *argv, VALUE self);
|
VALUE rb_hough_lines(int argc, VALUE *argv, VALUE self);
|
||||||
|
|
|
@ -197,13 +197,6 @@ rb_min_enclosing_circle(VALUE self)
|
||||||
return success ? circle : Qnil;
|
return success ? circle : Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
|
||||||
rb_calc_pgh(VALUE self)
|
|
||||||
{
|
|
||||||
/* not yet */
|
|
||||||
return Qnil;
|
|
||||||
}
|
|
||||||
|
|
||||||
__NAMESPACE_END_POINT_SET
|
__NAMESPACE_END_POINT_SET
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -29,7 +29,6 @@ VALUE rb_check_contour_convexity(VALUE self);
|
||||||
VALUE rb_convexity_defects(VALUE self, VALUE hull);
|
VALUE rb_convexity_defects(VALUE self, VALUE hull);
|
||||||
VALUE rb_min_area_rect2(VALUE self);
|
VALUE rb_min_area_rect2(VALUE self);
|
||||||
VALUE rb_min_enclosing_circle(VALUE self);
|
VALUE rb_min_enclosing_circle(VALUE self);
|
||||||
VALUE rb_calc_pgh(VALUE self);
|
|
||||||
|
|
||||||
__NAMESPACE_END_POINT_SET
|
__NAMESPACE_END_POINT_SET
|
||||||
|
|
||||||
|
|
|
@ -2483,10 +2483,6 @@ class TestCvMat < OpenCVTestCase
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_svdksb
|
|
||||||
flunk('FIXME: CvMat#svdksb is not implemented yet')
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_eigenvv
|
def test_eigenvv
|
||||||
elems = [6, -2, -3, 7]
|
elems = [6, -2, -3, 7]
|
||||||
m0 = create_cvmat(2, 2, :cv32f, 1) { |j, i, c|
|
m0 = create_cvmat(2, 2, :cv32f, 1) { |j, i, c|
|
||||||
|
@ -2522,14 +2518,6 @@ class TestCvMat < OpenCVTestCase
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_calc_covar_matrix
|
|
||||||
flunk('FIXME: CvMat#calc_covar_matrix is not implemented yet')
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_mahalonobis
|
|
||||||
flunk('FIXME: CvMat#mahalonobis is not implemented yet')
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_find_homography
|
def test_find_homography
|
||||||
# Nx2
|
# Nx2
|
||||||
src = CvMat.new(4, 2, :cv32f, 1)
|
src = CvMat.new(4, 2, :cv32f, 1)
|
||||||
|
|
|
@ -273,10 +273,6 @@ class TestCvMat_imageprocessing < OpenCVTestCase
|
||||||
mat0.good_features_to_track(0.2, 5, :use_harris => DUMMY_OBJ)
|
mat0.good_features_to_track(0.2, 5, :use_harris => DUMMY_OBJ)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_sample_line
|
|
||||||
flunk('FIXME: CvMat#sample_line is not implemented yet.')
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_rect_sub_pix
|
def test_rect_sub_pix
|
||||||
mat0 = CvMat.load(FILENAME_LENA256x256, CV_LOAD_IMAGE_ANYCOLOR | CV_LOAD_IMAGE_ANYDEPTH)
|
mat0 = CvMat.load(FILENAME_LENA256x256, CV_LOAD_IMAGE_ANYCOLOR | CV_LOAD_IMAGE_ANYDEPTH)
|
||||||
center = CvPoint2D32f.new(mat0.width / 2, mat0.height / 2)
|
center = CvPoint2D32f.new(mat0.width / 2, mat0.height / 2)
|
||||||
|
|
|
@ -122,9 +122,5 @@ class TestPointSet < OpenCVTestCase
|
||||||
@contour2.min_enclosing_circle
|
@contour2.min_enclosing_circle
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_calc_pgh
|
|
||||||
flunk('FIXME: PointSet#calc_pgh is not implemented yet.')
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue