I\'m pretty new to OpenCV (about 2 months now). I have the book Learning OpenCV by Bradski and Kaehler. My question is, if I want to do everything in a 2.0+ manner, when sho
When writing a Blob detection routine I noticed that using
IplImage* img;
uchar* image_src = (uchar*)img->imageData;
image_src[x+y*width] = ...;
Is much faster than using
Mat image;
image.at(x,y) = ...;
About 5x faster. Some of this may be because I used a nested X,Y loop for Mat and a single loop for IplImage. But if you have to write any routines that work directly off pixels I would stick with IplImage.