2012-11-26 13:26:18 -0600 | commented answer | How to operate on each pixel of a cv2.cv.Mat with a 3 x 3 matrix? Thanks! Im using Python and cv2 so I think I have to make a few modifications. Does "x=Mat(image.at<cv::Vec3b>(i,j));" create a 3 x 1 matrix for each pixel? Also does this snippet of code assume I am manually iterating over each pixel in the image or is there some built in function I haven't found that will automatically operate on every pixel? Thanks, Scott |
2012-11-25 21:02:22 -0600 | asked a question | How to operate on each pixel of a cv2.cv.Mat with a 3 x 3 matrix? I want to operate on each bgr pixel of a CvMat with a (3 x 3) Miyazaki matrix (http://www.cg.info.hiroshima-cu.ac.jp/~miyazaki/knowledge/teche40.html). I have tried various operations but I keep getting various errors. Any help on what operation/syntax is needed would be greatly appreciated! |