Added Sobel filter

This commit is contained in:
Ashkan Kiani 2015-01-28 21:22:08 -08:00
parent addfdee5f9
commit 838b3aba53

View file

@ -78,6 +78,17 @@ func Canny(image, edges *IplImage, threshold1, threshold2 float64, aperture_size
//CVAPI(void) cvCanny( const CvArr* image, CvArr* edges, double threshold1, //CVAPI(void) cvCanny( const CvArr* image, CvArr* edges, double threshold1,
// double threshold2, int aperture_size CV_DEFAULT(3) ); // double threshold2, int aperture_size CV_DEFAULT(3) );
/* Calculates the first, second, third, or mixed image derivatives using an
* extended Sobel operator. */
func Sobel(src, dst *IplImage, xorder, yorder, aperture_size int) {
C.cvSobel(unsafe.Pointer(src), unsafe.Pointer(dst),
C.int(xorder), C.int(yorder),
C.int(aperture_size),
)
}
// C: void cvSobel(const CvArr* src, CvArr* dst, int xorder, int yorder, int aperture_size=3 )
const ( const (
CV_INPAINT_NS = C.CV_INPAINT_NS CV_INPAINT_NS = C.CV_INPAINT_NS
CV_INPAINT_TELEA = C.CV_INPAINT_TELEA CV_INPAINT_TELEA = C.CV_INPAINT_TELEA