Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

segmentation fault

$
0
0
this code can work the image size 256x256, but not work on 4096x4096. I really confuse where get problem. the img.at(i,j) should not access invalid memory address. void dustHighValue(Mat & img, float & sigma) { int m = img.rows; int n = img.cols; copyMakeBorder(img, img,2, 2, 2, 2, BORDER_CONSTANT, Scalar::all(0)); Mat tmp; Scalar meanValue, stdValue; for ( int i=2; i(i,j) > (sigma * stdValue[0] + meanValue[0])) { img.at(i,j) = meanValue[0]; } } img=img(Rect(2,2,n,m)); }

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>