Closed korhun closed 5 years ago
I feel like, at the very least, you could provide the parameters for the specific call and what transformations you are doing on the image prior to blurring. Those aren't necessarily trade secrets as this library is entirely open source.
OK I'll try:
Cv2.CvtColor(mat, mat, ColorConversionCodes.BGR2GRAY);
Cv2.PyrUp(mat, mat);
Cv2.BilateralFilter(mat, m2, 1, 95, 15);
Cv2.GaussianBlur(m2, image, new OpenCvSharp.Size(0, 0), 1);
Cv2.AddWeighted(m2, 1.5d, image, -0.4d, 0, mat);
mat.ConvertTo(mat, mat.Type(), 1.1d);
Cv2.AdaptiveThreshold(gray, preprocessed, 255, AdaptiveThresholdTypes.MeanC, ThresholdTypes.Binary, 55, 17);
Cv2.Canny(preprocessed, preprocessed, 100, 200);
Mat rot = Cv2.GetRotationMatrix2D(center, angleInDegrees, scale);
Rect bbox = new RotatedRect(center, mat.Size().ToSize2f(), (float)angleInDegrees).BoundingRect();
rot.Set<double>(0, 2, rot.At<double>(0, 2) + bbox.Width * 0.5f - center.X);
rot.Set<double>(1, 2, rot.At<double>(1, 2) + bbox.Height * 0.5f - center.Y);
Cv2.WarpAffine(mat, mat, rot, bbox.Size, st, borderSt, borderValue);
Cv2.Transpose(mat, mat);
Cv2.Flip(mat, mat, FlipMode.Y);
Cv2.CopyMakeBorder(mat, mat, 16, 16, 16, 16, BorderTypes.Constant, new Scalar(255));
Bitmap img;
using (Mat mat = BitmapConverter.ToMat(img))
Mat mat = Mat.FromStream(stream, readMode);
Cv2.Merge(lst.ToArray(), mat1);
OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat);
Cv2.Resize(mat, mat, new Size(w1, h1), 0d, 0d, st);
using (Mat marker = Mat.Zeros(im.Size(), MatType.CV_8UC1))
MatOfByte mat = new MatOfByte(im); // cv::Mat_<cv::Vec3b>
var indexer = mat.GetIndexer();
Cv2.BitwiseAnd(im, ~marker, im);
Cv2.GaussianBlur(mat, gaussian1, new Size(kernel_sz1, kernel_sz1), sigma1, sigma1, Replicate);
Cv2.Subtract(gaussian0, gaussian1, mat);
Another project:
new HOGDescriptor(new Size(48, 48), new Size(16, 16), new Size(8, 8), new Size(8, 8));
Mat[] bgr = mat.Split();
float[] arrB = hog.Compute(bgr[0], s1, s2, null);
Mat desc = new Mat(new Size(lst.Count, 1), MatType.CV_32FC1);
desc.SetArray(0, 0, lst.ToArray());
Cv2.EqualizeHist(mat, mat);
svm.Predict(mat);
Cv2.ApproxPolyDP(cont, px0_01, true);
Cv2.BilateralFilter(matBinary, ci, 10, 500, 500);
var cc = Cv2.HoughCircles(ci, HoughMethods.Gradient, 1d, 15d, 370, 18, 5, 50);
Cv2.Resize(mask, mask, mat0.Size(), interpolation: InterpolationFlags.Nearest);
Cv2.ConvexHull(line).ToList();
var rr = Cv2.MinAreaRect(line);
var pl = rr.GetEllipseTouchingPoints(line, 0.1d).ToList();
rr = Cv2.FitEllipse(ch);
I hope this helps.
My computer has been changed and I have made the exact same tests many times with newer versions than 3.4.1.20181108 including latest version 4. I could not get any errors. Maybe something was wrong with my previous PC. I think its better to close this issue, its uncertain.
Thank you for the good work...
Hi, first of all thank you for the good work. We have been using your library about 2 years time and no issue has ever reported to me that was caused by opencvshap. Congratulations for that. However I have seen an issue which is very hard to make you debug, and find why it is happening:
I know I'm not giving you good hits to examine, but maybe the version changes would help you.