Tag Info

New answers tagged


For Instagram you first have to initiate the service: instagram = ServiceConnect["Instagram"] This will open a dialog window where you have to click Sign in to Instagram. That will take you to Instagram API authentication website where you have to follow the steps to get an access key. Paste this access key in the Mathematica dialog. Once you are ...


You can use the name to find the path, but not the image variable. name = "image.png"; img = Import[name] FindFile[name] FindFile finds the same file that Import finds. If you have another image with the same name in a different directory, by changing to that directory (with SetDirectory) Import and FindFile will find the second image.


Let us plot something interesting: img = Rasterize@DensityPlot[Cos[ArcTan[y, x] + x^2 + y^2], {x, -2, 2}, {y, -2, 2}, ColorFunction -> "Rainbow", Frame -> None, PlotPoints -> 100] Correspondence function f = Nearest@Table[List @@ Blend["Rainbow", x] -> List @@ cfun@x, {x, 0, 1, 0.003}]; Now we can convert colors (use First@f@# & ...


Import allows you to select the graylevel information directly from the JPEG data. In this case, you can apply a custom colorfunction: ArrayPlot[Import["ExampleData/coneflower.jpg", "GrayLevels"], AspectRatio -> 1, ColorFunction -> (Blend[{{0, RGBColor[159, 0, 255, 1]}, {1, GrayLevel[0.2]}}, #1] &)]


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 detect such images. Introduction Roughly speaking, the brightness of a defocused image $B(x,y)$ is a convolution of a focused image $B_0(x',y')$ with some kernel ...


You can put it to the last cell and evaluate, it will resize all images from InputCells to the width of 100px. You can of course change affected cell set and output parameters. Do[ With[{nr = NotebookRead[cell]}, If[! FreeQ[nr, "ImageGraphics"], SelectionMove[cell, Cell, All]; NotebookWrite[ EvaluationNotebook[], nr /. g : ...


images = ExampleData[{"TestImage", #}] & /@ {"Lena", "Elaine", "Mandrill"}; BarChart[{1, 2, 3}, ChartLabels -> Placed[Thumbnail[#, Tiny] & /@ images, Axis, Panel[#, FrameMargins -> 0] &]] Alternatively, you could use Magnify instead of Thumbnail: BarChart[{1, 2, 3}, ChartLabels -> Placed[images, Axis, Framed[Magnify[#, .3], ...

Top 50 recent answers are included