41,836 reputation
562170
bio website
location
age
visits member for 2 years, 6 months
seen 9 hours ago

Aug
5
comment How to set up the Fourier domain for a Fourier Transform?
The FFT outputs positive frequencies first, from zero up to Nyquist, then negative frequencies. See the linked question for more details.
Aug
5
comment Merging lists and adding common elements
More terse: Reap[Sow@@@Join[J,L],_,{#1,Total@#2}&]//Last
Aug
4
comment Behaviour of Plot3D with large numbers
For a simpler example: Plot3D[Sign[u], {u, -1, 1}, {p, -100, 100}, ExclusionsStyle -> Red]
Aug
4
comment Behaviour of Plot3D with large numbers
Looks like a bug with the handling of exclusions. Try with ExclusionsStyle -> Red for example.
Aug
4
comment V10's Operator Forms - what are they good for?
@Mr.Wizard, I'm not sure either. I've noticed that some folk avoid @ and // too, so maybe using a single consistent style for function application is a more important consideration for them than other aspects of readability.
Aug
4
comment V10's Operator Forms - what are they good for?
@xzczd, yes you could use // the way I have written it. Perhaps that would be clearer actually.
Aug
2
comment How to prevent function from passing values to slot
@Mr.Wizard, good point, thanks.
Jul
31
comment Why is my compiled code slower?
Nice work untangling those loops! Any particular reason not to use IdentityMatrix[{J, n}] ?
Jul
30
comment Speed up adding Poisson noise to an image
You mention speeding up the initial run of the code, and that it's a shame that PoissonDistribution can't be compiled. In fact the delay on the initial run is caused by compiling code to provide the Poisson distribution :-) You can look at Image`ColorOperationsDump`iImageEffectPoissonNoise to see how it works internally.
Jul
30
comment Speed up adding Poisson noise to an image
@rasher, as blochwave correctly states, the distribution parameter depends on the individual pixel values so you can't simply generate a whole array of random values from a single distribution.
Jul
30
comment Speeding Up Image Processing Functions
I don't think there is much you can do to speed up the built-in WatershedComponents. It is implemented using a separate program ITK.exe which I assume is an implementation of the ITK toolkit. I suspect paw's suggestion to use GPU processing might be the best approach to getting performance fast enough for a dynamic interface. A Google search for watershed components gpu gets some interesting looking results.
Jul
30
comment Automatically lining up two images that have some common elements
@Mr.Wizard, I made an attempt at doing what you describe by doing correlations on smaller sub-images to get a local translation which varies across the image, then interpolating that data and using ImageForwardTransformation to apply the warp. It didn't work very well though.
Jul
28
comment why the variable scope is not local when using evaluate to plot multicurve?
For this reason it is better to use the option Evaluated -> True instead of Evaluate
Jul
28
comment Interpolation function rejected by ParametricPlot3D
I think it is just an accident that Mathematica manages to correctly interpret the unsupported syntax in some cases.
Jul
28
comment Interpolation function rejected by ParametricPlot3D
y[t] /. bally is a list. Use y[t] /. First[bally] to extract the actual interpolating function.
Jul
26
comment Possible bug in Dynamic
+1 Nice troubleshooting. Wrapping the ContourPlot in PreemptProtect seems to work too.
Jul
26
comment TrueQ returning False on true statement
TrueQ[Log[2]/Log[8] == 1/3] returns True with version 10 on Windows 7.
Jul
24
comment Is there a way to recreate the typical Red/Blue-Postereffect using Mathematica?
@rm-rf, oh - so I did. Thanks.
Jul
24
comment Mapping with Trace[]
{r1, r2} is evaluated first, so the symbols are replaced by their values before Trace sees them.
Jul
24
comment Is there a way to use video codecs for avi files in Mathematica?
g3kk0, just to be clear, are you saying that you get uncompressed AVI regardless of which codec you select? This is (obviously) incorrect behaviour - I suggest stating your OS and QuickTime version in the question so that others with the same setup can comment on whether they see the same problem.