I am trying to convert sobel of matlab to opencv manually.What is the equivalent if imfilter of matlab in opencv. I used filter2D but it does not give the same output.
MATLAB:
bx = imfilter(gray_image,mask,'replicate');
opencv:
Point anchor(0,0);
float delta = 0.0;
cv::filter2D(gray_img, bx, CV_32FC1, mask, anchor, delta, BORDER_REPLICATE);
How can I have the samle output as in MATLAB in opencv for this function???