Tag Info

Hot answers tagged

8

Tricky. But with a bit of creative cheating, I can get close: First, load the image and binarize it: img = Import["http://i.imgur.com/qAZBdFb.jpg"]; bin = MorphologicalBinarize[ColorNegate@img, {.1, .5}] I invert the image for two reasons: First, MorphologicalBinarize takes a lower and an upper threshold, i.e. it assumes bright blobs on dark ...


7

Here is a look at the default behavior of ImageAdjust on a color image: img = ExampleData[{"TestImage", "Lena"}]; adj = ImageAdjust@img; Column[ Table[ inout = Transpose@(Flatten[ImageData@ColorSeparate[#][[channel]], 1] & /@ {img, adj}); fit = LinearModelFit[ inout , x , x]; Row[{fit, Show[{Plot[fit[x], {x, 0, 1}, ...


6

Although you have set the option PlotRangeClipping -> True, you didn't actually specify a PlotRange. This forces Graphics to determine the appropriate range automatically. The default for PlotRange is All, so the result of the Export command is actually correct. The notebook display is not correct. But if you want the notebook display to show the ...


4

The link to the picture itself is stored in a data-src element of each hyperlink. You will have to use string patterns to extract them. For instance, you could use the following as a starting point: url = "http://www.worldwideinterweb.com/item/3678-50-horrible-photos-by-horrible-professional-photographers.html"; StringCases[ Import[url, "Source"], ...


4

Assuming all your images are the same size and channel depth you can create a per pixel, per channel scale factor base on what ImageAdjust has done and multiply each image by it. adjustImages[keyImage_, images_] := With[{scaleFactor = Flatten@ImageData@ImageAdjust@keyImage/Flatten@ImageData@keyImage}, Image@ArrayReshape[scaleFactor Flatten@ImageData@#, ...


3

Under the "Properties & Relations" on the Documentation page for ImageAdjust we read: ImageAdjust[image] is equivalent to ImageAdjust[image,{0,0,1},{min,max},{0,1}] where {min,max} is the channel-wise pixel ranges in image: ImageAdjust[img] == ImageAdjust[img, {0, 0, 1}, ImageMeasurements[img, {"Min", "Max"}], {0, 1}] True So ...


3

As others have explained, the basic web page that gets imported doesn't contain any images. This is because many (most) web pages are not served as static entities, but have dynamic behavior due to javascript execution. So Import is not going to be terribly useful here. However, when you use my WebUnit package, this is easy: WebUnit talks directly to a ...


1

Looking at the result of Union@Import[url, "ImageLinks"] appears to give an answer: {"http://www.worldwideinterweb.com/plugins/system/lazyloadforjoomla/blank.gif"} It is very likely the images are loaded on demand by the scripts on the page. So, Import[..., "ImageLinks"] can't be used to spider through them.



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