I created a 3D matrix as cv::mat which contain on each axis (X, Y and Z) avalue from 0 to 255, as follow:
int sizes[] = { 100, 100, 100 };
Mat *matrix;
matrix = new Mat(3,sizes, CV_32FC1, cv::Scalar(0));
for(int i=0;i<100;i++)
for(int j=0;j<100;j++)
for(int k=0;k<100;k++){
//some values are 255
matrix->at<float>(i,j,k) = 0;
// and some of them are 255 : (TODO)
}
And now I want smooth the whole 3D matrix, how I can do that with opencv lib?
Any help will be appreciated,