Hot answers tagged

59 votes

How to automatically remove text from images?

PLEASE NOTE There is a reason why watermarks are there in the first place - to prevent unauthorised reuse of images. For more information on the issues around removing watermarks from images,...
  • 8,668
45 votes
Accepted

Create the source image for this cool animated illusion

TUTORIAL Import Image img = Import["https://i.stack.imgur.com/xzcUg.jpg"] Split into Components Using this approach (credit: nikie): ...
  • 23.4k
33 votes
Accepted

How can I detect if an image is of poor quality?

As was correctly noted in comments, out-of-focus images cannot been correctly detected by a simple gradient filter since out-of-focus images can have sharp edges. I propose another simple idea to ...
  • 43.1k
33 votes
Accepted

How to project 3d image in the planes xy, xz, yz?

Update 2: The function projectToWalls does not work in version 12.0 because the function PlotRange no longer works. To fix the ...
  • 352k
32 votes
Accepted

Reconstruct a graph from an image (curved edges and edge crossings)

Without claiming much generality, I made the following. I'm using a slightly more complex image than your proposed one. ...
32 votes
Accepted

How to generate image like QR code with Mathematica

This version of generation code is originally posted at wolfram community. I guess a story-telling type post would attract more upvotes and probably give some insight about how to 'solve problems' ...
  • 9,228
32 votes
Accepted

How can I make a graph network from image of granular packing?

Another starting point, where the objects being more or less fixed size disks is used ad hoc to measure their centroids as components after some mangling, and those which are close enough to each ...
  • 15.7k
30 votes
Accepted

Best method to find variation in width along the image of a slit?

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 ...
24 votes

Deleting noisy data from a plot (manually) and export the best remaining data

One simple way of "filtering" your data is to treat the points as a graph, and search for the shortest path from left to right: ...
  • 35.6k
24 votes
Accepted

Are Mathematica's maps copyright-free?

No, they are not copyright-free, but the data they are based on is openly licensed. The map data mainly comes from OpenStreetMaps (which is licensed under the Open Database License, similar to ...
  • 12.7k
23 votes
Accepted

How can I capture a rectangular area from an image?

Tricky. But with a bit of creative cheating, I can get close: First, load the image and binarize it: ...
  • 35.6k
23 votes
Accepted

Why in Mathematica 13 do imported PDFs have lower image quality?

TL;DR Has the default changed for some import option? From the investigation given below we see three important changes: By default FrontEnd of version 13.0.0 applies to the whole Notebook window a ...
22 votes
Accepted

How to align a poster?

A few minor mistakes: corners and the target coordinates weren't in the same order For some reasons, pixels isn't the default unit for ...
  • 35.6k
22 votes
Accepted

Quickly importing several thousands of jpg files?

Reading the file as Import["file.jpeg", "ImageNoExif"] is noticeably faster on my machine than the default ...
  • 229k
21 votes
Accepted

How to generate a Graph from a picture of a graph?

...
20 votes
Accepted

Reproduce image effect in Mathematica

Load image img = Import["http://i.stack.imgur.com/qzMGE.jpg"] ImagePartition and DominantColors Make an array of Disk of the ...
  • 31.8k
19 votes

Trace one point's coordinate values in sequentially images

Let's start with an example set everyone (at least everyone with a recent Mathematica version) should be able to use: ...
19 votes
Accepted

How to use an image as a plot background

One can use Prolog to create a background for a Plot. ...
  • 27.2k
18 votes

Calculate the 2D Fourier transform of an Image

Taking the Fourier transform is easy and fun! Let's strip away some of the complexities. First, remove the color from the image, since this just complicates things (you can always take the transform ...
  • 66.1k
18 votes
Accepted

Generating uniform random points over a binary image

Update Silvia proposed a much faster algorithm that I believe produces I uniform distribution. Here is my implementation of it. ...
  • 266k
18 votes

Best method to find variation in width along the image of a slit?

The answer by Vitaliy is great but his approach has one drawback: ImageRotate introduces artifacts depending on the Resampling ...
18 votes
Accepted

Extracting data from analog screen photograph

Doing this with basic image processing can be done. In comparison to the post you have linked, your situation is more complicated because you have a monochrome image with no option to separate colors. ...
  • 111k
17 votes
Accepted

How to count proportion of two phase in a electron microscope picture

Here's an idea that could work: The "Ferrite" areas have a border that's slightly darker than the background, while the area in between has a border that's slightly brighter than its neighborhood. So ...
  • 35.6k
17 votes

Fit image of mountain to gaussian

A careful method of finding the mountain boundary including what is masked by the snow but not including the clouds: ...
17 votes
Accepted

Remove a specific color (black) within an image

Remove the white lines in the S with a vertical opening Opening[i, {{1}, {1}, {1}}] Remove the small black lines with a closing ...
  • 2,051
16 votes

Reproduce image effect in Mathematica

Here's my solution. Change CompilationTarget -> "C" to CompilationTarget -> "WVM" if you don't have a C compiler available....
  • 1,733
16 votes
Accepted

Rotate an object in image about its centroid

Those damn coordinate systems! :) You can see a small part of the object at the lower left corner of your result image. That's because you forgot to add the center vector after the rotation to ...
16 votes
Accepted

Wrong Graphics coordinate system after Image to Graphics conversion

I reproduce the issue with version 13.0.0 on Windows 10 x64. Apparently, the issue arises due to a non-default value of ImageResolution option of ...
15 votes

Fit image of mountain to gaussian

A rough draft of a solution: ...
  • 27.2k

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