New answers tagged

0

Or you can try: ImageDifference[img1, img2] // ImageAdjust


3

Try Binarize[ImageDifference[img1, img2], 0].


0

A bit too late to the party, I found that there's no way to add texture to the rabbit using @Simon's method, thus I created one of my own. Effect first! One rabbit only, correct texture for the rabbit for most part. The code is as follows, and could be downloaded here: mappedstereogram[img_Image, depth_Image, bg_Image, n_List: {5, 3}, shift_: 40, ...


2

You can use the special form ImageSize -> 1 -> {a,b} for setting image size: Row[Table[Labeled[ VoronoiMesh[pts, PlotRangePadding -> 0, Frame -> True, ImageSize -> 1 -> 20 {s, 1}], "s = " <> ToString[s], Top], {s, { .8, 1, 1.3, 2}}], Spacer[5]]


4

What if you scale underlying points of MeshRegion? That way you have complete control and you can use geometric transformation functions like ScalingTransform, RotationTransform, etc. (* mesh comes form OP's code *) newCrds = ScalingTransform[{2, 1}] /@ MeshCoordinates[mesh] MeshRegion[newCrds, MeshCells[mesh, 2], Frame -> True]


2

I was able to do it using Texture, hk0 = Texture@ Show[ListDensityPlot[Shk0, InterpolationOrder -> 1, AspectRatio -> Automatic, ColorFunction -> ColorData["SunsetColors"]], hk0Outline, Frame -> False]; hhl = Texture@ Show[ListDensityPlot[Shhl, InterpolationOrder -> 1, AspectRatio -> 1/Sqrt[2], ...


1

Generally, I really recommend image processing docs - lots useful stuff there: http://reference.wolfram.com/language/guide/ImageProcessing.html http://reference.wolfram.com/language/guide/ColorProcessing.html DistanceTransform resolution depends on your original image resolution which you can control in Graphics: dpts = ImageAdjust[DistanceTransform[...


18

There are many ways to do this, modifying, improving my method or doing a completely different thing. My goal here is to show a very basic idea that should give you a start. LocatorPane and Manipulate give means of interactive addition/deletion and dragging of points in 2D plane. The problem is how to add an edge -- there has to be interaction between 2 ...


4

Rather than trying to process the puzzle image, we can work with the procedure that produced it (from Vasiliy Kaurov's wonderful blog page Designing Jigsaw Puzzles with Mathematica). Two things we need to add: (1) We need to get polygon primitives with wiggled edges rather than lines, and (2) We need to use the input image as Texture for polygon primitives ...


2

Not particularly efficient buy an easy to write recursion ClearAll[splitMerge] splitMerge[i_, maxSt_, minSize_, newImage_] := ImageAssemble@Map[If[ And[ Max@ImageMeasurements[#, "StandardDeviation"] > maxSt, And @@ Thread[ImageDimensions[#] > minSize] ], splitMerge[ImagePartition[#, {Scaled[{1/2, 1/2}]}], maxSt, ...


7

Here's my take at the issue (some comments are inlined) extractRectangles[i_Image?ImageQ] := Block[ {dims, i0, i1, masks1, masks2, masks3, tfun, coords}, (* downsampling (just to make it faster) *) i0 = ImageResize[RemoveAlphaChannel[i], 500]; dims = ImageDimensions[i0]; (* smoothing *) i1 = MeanShiftFilter[i0, 3, .05, MaxIterations-...


8

Here is an approach based on WatershedComponents and MorphologicalGraph. Some of the steps feel a bit over-complicated, so feel free to point out any improvements. The end result is a Graph expression describing the cell walls: Here is the code with some intermediate results: Get the original image: img = Import["https://i.stack.imgur.com/elbTN.png"] Do ...


Top 50 recent answers are included