MATLAB: Create custom filter to image

mathematics

create custom filter using mean and covariance

Best Answer

Use mean2 and conv2
Is this OK with exp^ terms?
-0.5 * x * brcov.^(-1) * x'
>> whos x
Name Size Bytes Class Attributes
x 1168x565 659920 uint8
>> b1=brcov.^(-1);
>> whos b1
Name Size Bytes Class Attributes
b1 1167x1129 10540344 double
>> x';
>> x1=x';
>> whos x1
Name Size Bytes Class Attributes
x1 565x1168 659920 uint8
>> b1=brcov.^(-1);