RGB to Lab conversion and median filtering function
Hi .
I trying to do the following tasks using function below :
after the RGB input image is converted to an Lab* image, an
extract L ( illuminative component ) and apply a 31×31 median filter to the L image,
obtain the inverted illuminative image (L) .
adding the inverted image to the original L image.
I need your review of the function is it ok ?
and how the addition of inverted image and L component can be obtained (void add() or addWeighted() )
or is there another way to do it ?
void split_lab(Mat planes)
{
Mat lab,dst,inv;
cvtColor(planes, lab, CV_BGR2Lab);
vector <Mat> splits;
split(lab, splits);
Mat L = splits[0];
medianBlur(L, dst, 31); // is that how 31*31 median blur is obtained ?
bitwise_not(dst, inv); // is this the right way to obtain invert ?
}