I have a noisy binary image of size 300X200 pixel. I need to clean it up, but using a given objective function, which I should maximise. So I have the noisy binary image and the objective function. I should find the cleaned binary image which maximizes my objective function. I need to solve this task in Matlab.
My first idea was to generate every possible binary matrix of size 300X200, and find the one that gives the objective function a maximal value. But I know that this is not a good way, as there are too many possible matrixes.
Does anyone know a better way to do this? Help please! Thank you very much :)