New answers tagged

2

Here is an example of using FFmpeg to convert a video to images and import them into Mathematica. I'm using the jfkrice.avi video as an example. This will convert the video to a list of images ffmpeg -i jfkrice.avi -r 10 -f image2 jfkrice/%05d.png the number 10 means 10 images per second. Then we can use Mathematica to import them imgls = Import /@ ...


1

Since this question has popped up again, here is a way to use MaxFilter followed by smoothing with a GaussianFilter. pts = RandomReal[{1, 5}, {10^4, 2}]; pts2 = Select[pts, #[[1]]*#[[2]] <= 5 &]; {xs, ys} = Transpose[Sort[pts2, #1[[1]] < #2[[1]] &]]; Show[{ListPlot[pts2], ListLinePlot[Transpose[{xs, GaussianFilter[MaxFilter[ys, 50], 50]}], ...


2

Just for record by a function used in this site rarely:EstimatedBackground pts = RandomReal[{1, 5}, {10^4, 2}]; pts2 = Select[pts, #[[1]]*#[[2]] <= 5 &]; ListPlot[pts2] ListLinePlot[-EstimatedBackground[-Reverse@ SortBy[pts2, Last][[All, 2]]], DataRange -> MinMax[pts2[[All, 1]]], Epilog -> {Red, Point[pts2]}]


4

There are a number of ways (if I understand aim),e.g.: lst = data = {{a1, b1}, {a2, b2}, {a3, b3}, {a4, b4}}; lst /. {x_, y_} :> {f[x], y} MapAt[f, lst, {All, 1}] {f@#1, #2} & @@@ lst


7

The package IndependentComponentAnalysis.m can be used for Independent Component Analysis (ICA). This answer uses the generated data from my previous answer (which is about opportunistic application of general Non-Negative Matrix Factorization for ICA). Load the package: ...


0

For people who has the same problem but their data manipulation isn't too heavy (like me), can use this neat trick. In this example, I defined a list my do loop want to loop over, point 32 and 33 are bad data so i deleted them manually! Instead of looping over i,1000,1044 now we loop over a list called list of points It works for small data processing, ...



Top 50 recent answers are included