Hot answers tagged

22

Use the Classify[] function to train your own Classification function on a list of example photos of X and O... https://www.wolfram.com/mathematica/new-in-10/enhanced-image-processing/handwritten-digits-classification.html the classify function http://reference.wolfram.com/language/ref/Classify.html here is the particular section in classify ...


13

In this case (distinguishing x's from o's), it is also pretty easy to design your own classifier. Begin by binarizing, and then calculate the EulerNumber for each. The Eulernumber for x's will be zero, while the o's will have a component with Eulernumber 1 (The Euler number is the number of encircled regions). The erosion will help to make it a little more ...


9

With Frame -> All, the automatic Spacings are weird. The automatic BaselinePosition is bad either way. It seems to be a good idea to include substitutes for as many of those options which are Automatic by default as possible: pic2 = ImageResize[ImageCrop@Rasterize@Graphics@Disk[], {Automatic, 40}]; Grid[{{pic2}}, Alignment -> {Center, Center}, ...


6

Here's one way: img=Import["http://i.stack.imgur.com/LBVmD.jpg"] Dilation[EdgeDetect[img], 2]


6

Here is the answer from Wolfram Technical Support 12-bit TIFF files are not currently supported by Mathematica. Our developers are interested in supporting this format, however, and I have filed a suggestion on your behalf. I have also included your contact information so that you can be notified if this gets implemented.


5

If you're command line friendly, one possible workaround is to use imagemagick or one of the various libtiff command line tools to turn your image into 16-bit, viz.--- Import["12_bit.tif"] (* $Failed *) Run["/usr/local/bin/convert 12_bit.tif -depth 16 16_bit.tif"] (* 0 *) Import["16_bit.tif"] (* sweet sweet success *) On the Mac, I have imagemagick and ...


4

There are several ways to reduce the size of the image. Perhaps the simplest is to reduce the number of pixels when it is generated. For example, if you do: test = Image3D[Table[Sin[x + y + z], {x, 1, 100, 3}, {y, 1, 100, 3}, {z, 1, 100, 3}]] Then you get an image that looks much the same and the memory is 0.3 MB ByteCount[test]/1024/1024 ...


4

To answer your question "how can I control the parameter to attach the texture to the ring?" - well it takes a bit of trial and error. There is some documentation on the TextureCoordinateFunction, and we can work the rest out ourselves. We want the horizontal and vertical directions of the image to go with the z axis and the angular coordinate. These ...


4

Framed[i = Import["http://i.stack.imgur.com/tTeBU.png"]] ib = ColorNegate@Binarize@i; sc = SelectComponents[ib, "Count", -1]; bb = ComponentMeasurements[sc, "BoundingBox"]; bs = Reverse[Sort /@ {#[[1]], Last@ImageDimensions@sc - #[[2]]} &@ Transpose[bb[[1, 2]]]]; it = ImageTake[sc, Sequence @@ bs]; it1 = ImageTake[i, Sequence @@ bs]; eps = ...


3

I'm not sure that I fully understand what you need, but perhaps the following will help you get started. First, import the picture: img = Import["http://vignette4.wikia.nocookie.net/rickandmorty/images/d/dd/Rick.png/revision/latest?cb=20131230003659"] Then find the outer edge: edge = EdgeDetect@ColorQuantize[img, 1] Finally, find the position of ...


2

One way to approach this is to use a Watershed algorithm to segment the image. Each of the watersheds contains one of the symbols. i = Import["http://i.stack.imgur.com/tTeBU.png"]; waterI = WatershedComponents[i]; waterI // Colorize You can then separate out the three symbols {m1, m2, m3, m4} = ComponentMeasurements[waterI, "Mask"]; ...



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