I am playing with some Compressed Sensing (think single pixel camera) applications and would like to have a Mathematica equivalent of a Matlab package call Convex Optimization (CVX). Specifically, I am solving an underdetermined, constrained, L1Norm minimization problem. I have been using NMinimize, but it very slow compared to the Matlab code written by a colleague. I don’t want to give him the pleasure of thinking Matlab is superior. I am sure that the long run times are due to my poor programing skills. The solution is sparse but I do not know how to add that as an additional constraint. Anyway, seems I can’t find a good reference for compressed sensing in Mathematica. Any suggestions would be great!
As an example two data sets
1D
coef = Transpose[RandomReal[#, 7] & /@ {1, 10 Pi, 2 Pi}];
f[t_] = Total[(#[[1]] Sin[#[[2]] t + #[[3]]]) & /@ coef];
data1d = Table[f[t], {t, 0, 10, 0.01}];
Sample obtained using
RandomSample[data1d,n1]
2D
data2d = ImageData[ExampleData[{"TestImage", "Boat"}]];
1 pixel random sampling
Total[RandomSample[#, 256] & /@ data2d, 2]
I hope the 200 reputation points bounty don't go to waste.
Comments
Post a Comment