Tag Info

Hot answers tagged

24

I think the essence of the problem here is that width needs to be counted orthogonally to some best fit line going through the elongated shape. Even naked eye would estimate some non-zero slope. We need to make line completely horizontal on average. We could use ImageLines (see this compact example) but I suggest optimization approach. Import image: i = ...


14

The answer by Vitaliy is great but his approach has one drawback: ImageRotate introduces artifacts depending on the Resampling method which affects the final estimates for the slit width. A better solution would process the original image data without distorting it. The following approach does not include any artificial manipulations with the original data ...


9

If you are looking for a quick estimate, you can erode the line until it disappears. The point at which it is gone gives an estimate of the thickness of the original line. In this implementation, adjust the slider until the line is just barely visible. The t parameter is the number of pixels eroded, and so corresponds to the thickness of the line. When I do ...


8

kglr's very useful trophy from the land of undocumented functions needs to be recorded. Suppose you have the following plot: Plot[Sin[2 Pi t], {t, 0, 1}, ImageSize -> Tiny] Then you can just cut and paste {100, 54} Note, however, that Predictions`getImageSize actually reports ImageSize plus ImageMargins, as shown in the listing below. ...


6

Suppose these are img1 and img2 (in this example img2 is a Deuteranopia colour blindness effect with some contrast adjustment): You first convert them to the "HSB" colour space using ColorConvert[img1,"HSB"] and likewise for img2. All you then need to do is extract the values in the Saturation channel and pair them up: points = Transpose[ ...


2

Use Export gg = GraphicsGrid[Table[Plot[a*x^n, {x, 0, 1}], {n, 2}, {a, 2}]]; Export["test.jpg", gg]; Import["test.jpg"] You can use other formats such as "test.gif" or "test.png"



Only top voted, non community-wiki answers of a minimum length are eligible