I need to create a method in C# that will receive an image (or path to it), blur it and then try to merge the blurred image with the original using OpenCvSharp4. So far, I can create the blur image just fine, but the merging part is giving me a hard time. I've had tried a few pieces of sample code found online to no avail. Any idea how to get the merging part ?
-thanks,
var mat = Cv2.ImRead(OriginalFileName, ImreadModes.Unchanged);
Cv2.Resize(mat, mat, new Size(933, 934), 0d, 0d, InterpolationFlags.Linear);
Cv2.CvtColor(mat, mat, ColorConversionCodes.BGR2RGB);
Mat newImage = new Mat();
Cv2.GaussianBlur(mat, newImage, new Size(67, 67), 0d, 0d, BorderTypes.Default);
Cv2.CvtColor(newImage, newImage, ColorConversionCodes.BGR2RGB);
Mat merged = Mat.Ones || Mat.Zeros // HELP NEEDED HERE
Cv2.Merge(new Mat[] { mat, newImage }, merged);