9

img0 = Import["https://i.stack.imgur.com/pLroE.png"]; 1. ComponentMeasurements Graphics[{Blue, Values @ ComponentMeasurements[Binarize @ img0 , "Contours"]}] You can get the coordinate data by a simple ReplaceAll: data = Join @@ Values[ComponentMeasurements[Binarize@img0, "Contours"]] /. Line[x_] :> x; Row[ListPlot[...


8

Update Mesh Clear; all = Tuples[{0, 1, 2}, 3]; erase = Tuples[{0, 2}, 3]; rest = Complement[all, erase]; Graphics3D[{Lighting -> "Accent", EdgeForm[Blue], FaceForm[], Cuboid[#] & /@ rest}, Boxed -> False] Solid Clear; all = Tuples[{0, 1, 2}, 3]; erase = Tuples[{0, 2}, 3]; rest = Complement[all, erase]; Graphics3D[Cuboid[#] & /@ ...


8

This topic got some updates since 2016 :-) I will give a short review of resources. Top recent: Wolfram Technology Conference (WTC) 2020 At the Wolfram Technology Conference (WTC) 2020 (currently in progress) Mikayel Egibyan from Wolfram image processing team just gave a talk on this topic exactly with approaches based on the modern machine learning and ...


6

You could just do this: img = Binarize@Import["https://i.stack.imgur.com/pLroE.png"]; ListPlot@PixelValuePositions[EdgeDetect@img, 1] Or if you want to use meshing then: img = Binarize@Import["https://i.stack.imgur.com/pLroE.png"]; ListPlot@MeshCoordinates@RegionBoundary@ImageMesh@img If you want to go further and break them up into ...


5

thickness = 10; img = Import["https://i.stack.imgur.com/PvtRV.png"]; 1. ContourDetect + EdgeDetect + Dilation ImageMultiply[img, ColorNegate @ Dilation[EdgeDetect @ ImagePad[ColorNegate @ ContourDetect[img], 20], thickness]] 2. ComponentMeasurements img0 = ImagePad[img, 10]; Show[img0, Graphics[{AbsoluteThickness[thickness], Red, ...


5

A simple idea is to identify the corners and then create all possible rectangles that can be created from those corners: img = ColorConvert[ Import["https://i.stack.imgur.com/i0HUj.png"], "Grayscale" ]; corners = ImageCorners[img]; HighlightImage[img, corners] A rectangle can be created using three points, so we simply create ...


5

You do not need excotic function, the built in tools will do the job. Due to bad weather, I did some experimenting. What I did not yet try is to use Nest, that I think may come in handy. For the time being, I did everything "by hand". Maybe I will add more, if I have the time. Have fun: inputs = Import /@ { CloudObject["https://www....


4

I have tested code from the paper Through the Looking-Glass, and What the Quadratic Camera Found There to understand how they been able to take Figure 1-5. Let use this code to produce Julia set points from the picture inputs[[1]] inputs = Import /@ {CloudObject[ "https://www.wolframcloud.com/objects/09bf1cae-1109-4490-a35a-\ 960ff9199863"], ...


4

rp = RegionPlot3D[RegionDifference[Cuboid[], CantorMesh[1, 3]], Lighting -> "Neutral", Boxed -> False, PlotTheme -> "Monochrome", ImageSize -> Large] coords = DeleteCases[_List?(FreeQ[1/3 | 2/3])] @ Tuples[Subdivide[3], 3]; nng = Show[NearestNeighborGraph[coords, VertexSize -> 0, VertexCoordinates -> coords, ...


3

This method is short, but slow at higher resolutions: ImageApply[RandomVariate@*BernoulliDistribution, ImageResize[img, {100, 100}]] Instead, it makes more sense to pre-generate a random image first which is much faster at high resolutions: With[{dims = {1920, 1440}}, Binarize[ImageSubtract[ImageResize[img, dims], RandomImage[1, dims]],0]] See also my ...


3

Maybe using RandomChoice works better (it does so for me). f[img_, k_] := Image[ArrayFlatten[ Map[ RandomChoice[{1 - #, #} -> {0, 1}, {k, k}] &, ImageData[img], {2} ] ]]; Example: f[ExampleData[{"Texture", "Bark"}], 5]


3

ok, here goes my idea. Even if it doesn't pan out perfectly it might serve as an introduction to image alignment (aka image registration). Basic definitions img = ColorConvert[Import["https://i.stack.imgur.com/eFjUe.png"], "Grayscale"]; img2 = ColorConvert[Import["https://i.stack.imgur.com/pnTX6.png"], "Grayscale"]; ...


3

img = Import["https://i.stack.imgur.com/i0HUj.png"]; imgmesh = ImageMesh[img]; tworects = imgmesh // MeshCoordinates // Sort // Subsets[#, {2}] & // Select[VectorLess] // Rectangle @@@ # & // Select[RegionWithin[imgmesh, #] &] // Subsets[#, {2}] & // Select[RegionEqual[RegionUnion @@ #, imgmesh] &] // ...


3

Using ImageMesh and textures is a little more awkward than I expected it to be, but it does the job without needing image manipulation like EdgeDetect: img = ImageCrop[Import["https://i.stack.imgur.com/PvtRV.png"]]; mesh = ImageMesh[AlphaChannel[img]]; coords = MeshCoordinates[mesh]; mmx = MinMax[coords[[All, 1]]]; mmy = MinMax[coords[[All, 2]]]; ...


3

I am now much closer to an answer. It is a two-step process. First the original image must be transformed. Second, the transformed image is used to get the pixel color in a modified Julia code where the position of the pixel is not the original z0, but the last position before escaping the radius of 2. Part 1 - Transforming the original image The ...


2

This is not an answer, but I want to show an image. This is the left reflection of the Julia set with c= -0.79 + I 0.15. No colors shown. Black represents points not escaping after 100 iterations. The four gray levels represents points escaping at the first, second and third iteration, and at higher iterations. The shape of the three darker bands are visible ...


2

Here is one of many possible approaches: img = ExampleData[{"TestImage", "Mandrill"}]; data = ImageData[img]; {w, h} = ImageDimensions[img]; (* Total number of images *) nImages = 100; (* Random choice for which pixels are on or off for each image *) r = Table[RandomVariate[BernoulliDistribution[i/(i + 1)], {w, h}], {i, nImages}]; (* ...


2

Perhaps ImageCompose? Fold[ImageCompose[#, #2[[1]], #2[[2]], #2[[2]]] &, back, {{img1, {Left, Bottom}}, {img2, {Right, Top}}}] If you wish to have a Graphics object, just wrap with Show: Show[%, ImageSize -> 600, Frame -> True, PlotRangePadding -> Scaled[.02]]


2

Need to specify positions for Inset in a specific way. Graphics[{Inset[back, {Center, Center}, {Center, Center}, ImageDimensions[back]], Inset[img1, Scaled[{0, 0}]], Inset[img2, Scaled[{1, 1}]]}]


2

Update 2 This is a better implementation of the parts function that does not assume that the spacings are the same. It finds groups of rows in the image that are not composed of entirely white pixels and splits by those groups. ClearAll@parts parts[image_] := Module[{width, height, imageData}, {width, height} = ImageDimensions@image; imageData = ...


1

You have a hard problem. The following - just an extended comment - offers one approach to attack it. Maybe you or others can build on it. Start with your first two lines of code: image00 = Import[FileNameJoin[{NotebookDirectory[], "image_00.png"}]] imageAdj01 = ImageAdjust[image00, {0.5, 0., 0.3} ] Then apply a filter: HarmonicMeanFilter[...


1

Clear["Global`*"] region1 = RegionProduct[ DiscretizeGraphics[ Text[Style["Fally", Bold, FontFamily -> "Times"]], _Text, MaxCellMeasure -> 0.1], MeshRegion[{{0}, {2}}, Line[{1, 2}]]]; region2 = RegionProduct[ DiscretizeGraphics[ Text[Style["Mol", Bold, FontFamily -> "Times"]], ...


1

This comes close, and I suspect a masking approach would be better given that all objects appear to be of the same size. An edge-preserving filter is applied to smooth out the background while maintaining contrast of the objects. Colors are then binned into 3 categories (high/low/background). I ignore one of the high/low, which is an area for improvement. ...


1

As promised above, I played a bit more. This time using Nestlist, what make things much easier. Please play with it. tr = TranslationTransform[{2, 0}].RotationTransform[Pi/9].ScalingTransform[0.99{1,1}]; Graphics[{tx,Polygon[#, VertexTextureCoordinates -> Automatic] & /@ NestList[tr, pol[[1]], 400]}] tr = TranslationTransform[{1,0}]....


1

I think writing code in mathematica to read a font that has only one image per character is a much different task then teaching mathematica to recognize your hand writting. you already have the training data with that script font you used. you can achieve %100 accuracy without using any machine learning. you need to pick one raster size for your TTF font and ...


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