public static void Blobs(OpenCV cv, Pixbuf pixbuf, Select selection, double ScaleX, double ScaleY) { if (pixbuf != null) { using (var mat = cv.ToMat(pixbuf)) { cv.BlobDetectorMat( mat, MinArea, MaxArea, selection, ScaleX, ScaleY ); } } }
protected void OnBlobDetectorButtonClicked(object o, EventArgs e) { HideEdit(); if (OriginalImage != null) { Application.Invoke(delegate { using (var mat = cv.ToMat(OriginalImage)) { cv.BlobDetectorMat( mat, Convert.ToInt32(minArea.Value), Convert.ToInt32(maxArea.Value), GtkSelection.Selection, Convert.ToDouble(imageBox.WidthRequest) / OriginalImage.Width, Convert.ToDouble(imageBox.HeightRequest) / OriginalImage.Height ); } }); } }