Tag Info

Hot answers tagged

16

I'm not 100% sure what you want: "segmentation" has a well-defined meaning in image processing, and I think that's not what you want. Also, I couldn't reproduce your results (I think DominantColors isn't guaranteed to give the same order or even the same results every time it's run). So this may or may not help... First, this seems more reproducible than ...


13

MorphologicalBinarize and ColorNegate it. We use Manipulate to choose the finest parameter. img = Image[ Import["https://maps.googleapis.com/maps/api/staticmap?center=+51.\ 5+-0.116667&zoom=10&size=600x600&scale=2&style=feature:road.highway%\ 7Ccolor:0x000000%7Cweight:1%7Cvisibility:on"], ImageSize -> Medium]; Manipulate[ ...


8

There are ImageMeasurements for this: ImageMeasurements[image, "Mean"] (* {0.427958, 0.559264, 0.130725} *)


6

If ImageMeasurements didn't exist we could have used this one-liner: Total[#]/Length[#] &@Flatten[ImageData[img], 1] ImageData will give you a matrix of RGB vectors, Flatten[...,1] will then give you a one-dimensional list of RGB vectors. Total adds them together, by dividing by the number of RGB vectors we get the mean. Also take a look at ...


5

Well I decided to give it a bit of a go...First import the image and convert to grayscale, then crop to focus on the area of interest. Then I used a LaplacianGaussianFilter, which is often used in blob detection. img = ImageAdjust@ColorConvert[Import["http://i.imgur.com/4lDwE33.jpg"], "Grayscale"]; smallimg = ImageAdjust@ImageTake[img, {200, 500}, {200, ...


4

For this example, it seems that setting the Alpha Channel to .1 yields correct result across all languages without needing to crop. TextRecognize[img ~SetAlphaChannel~ .1, Language -> #] & /@ {"English", "French", "German", "Spanish", "Portuguese", "Italian"} {"12 Catherine FicktEuschAMK", "12 Catherine FicktEuschAMK", "12 Catherine ...


3

You probably won't achieve exactly the same effect in Mathematica as you will with GIMP, but I think this is pretty close: ColorConvert[ ImageAdjust[ MeanShiftFilter[ImageAdjust[ImageAdjust[image, {0, 0, 2}]], 5, .1], {1, 0}], "Grayscale"]


3

Let me present a geometric approach. xrange = {-5, 5}; yrange = {-4, 4}; zrange = {-3, 3}; rrange = {1/2, 1}; xrangeext = {-#, #} &@ Max[rrange] + xrange; yrangeext = {-#, #} &@ Max[rrange] + yrange; zrangeext = {-#, #} &@ Max[rrange] + zrange; cylinders = Table[ Cylinder[Table[RandomReal /@ {xrange, yrange, zrange}, {2}], RandomReal[rrange]], ...


3

I would use some edge-preserving filter (like CurvatureFlowFilter) to get a smooth image before feeding to LocalAdaptiveBinarize: img = Import["Test.tif"] smoothimg = CurvatureFlowFilter[img, 2] biimg = LocalAdaptiveBinarize[smoothimg, 10, {1, 0, .05}] mask = Dilation[biimg, DiskMatrix[1]]; cleanimg = ImageMultiply[img, mask] ...


3

This link talks about hacking a MagiQuest receiver with an Arduino. It mentions that the modulation rate of the IR signal is somewhere in the region of 37 kHz, a factor of more than 1000 times faster than anything your webcam can detect. So you simply will not be able to do this with a webcam. Even if the modulation rate were much lower you would still ...


2

One way of getting this to work is by using the Locator as a Control of Manipulate. For the convenience of easier spotting the replaced pixel I have cropped and magnified the image. image = ExampleData[{"TestImage", "Lena"}]; img = ImageCrop[image, 100]; Manipulate[ Row@{img, Dynamic@(new = ReplacePixelValue[new, pt -> 0])} // Magnify[#, 10] ...


1

Using a set-up similar to Taiki, but taking literally the OP's request for 2D slices instead of the thin 3D slices in the OP's code: SeedRandom[1]; xrange = {-5, 5}; yrange = {-5, 5}; zrange = {-5, 5}; cylinders = Table[Cylinder[ Table[RandomReal /@ {xrange, yrange, zrange}, {2}]], {10}]; plots = Block[{reg}, reg = Compile @@ {{x, y, z}, ...


1

ℛ = ImplicitRegion[x^2 + y^2 <= 1 && Abs[z] < 5, {x, y, z}]; RegionPlot3D[ℛ, PlotPoints -> 100, PlotRange -> {{-2, 2}, {-2, 2}, {-6, 6}}] // Quiet slice =RegionIntersection[ℛ, ImplicitRegion[x^2 + y^2 < 2 && Abs[z - .5] < .01, {x, y, z}]]; RegionPlot3D[slice, PlotPoints -> 100, PlotRange -> {{-2, 2}, ...



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