Merge pull request #41 from norcalli/master

Added Sobel filter
This commit is contained in:
Chih-Wei Chang 2015-01-29 21:05:57 +08:00
commit efdfab35f1

View file

@ -79,6 +79,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