Tag Info

New answers tagged

1

The direct approach to the problem is to take the Raster expression directly from the generated Graphics object and then convert it to an Image object by applying Image to Raster (not to Graphics!). As Documentation says, "Image[Raster[...]] converts a Raster object to an image." The solution is as follows: data = CellularAutomaton[{1635, {3, 1}}, {{1}, ...


4

This question is ill-posed. It has nothing to do with Manipulate. ColorData["TemperatureMap", "Image"]


10

You can use ImageTrim to extract the bounding boxes from the image. image = Import["http://i.stack.imgur.com/GjN95.jpg"]; m = MorphologicalComponents@Binarize@ColorNegate@MinFilter[image, 1]; m = SelectComponents[m, "Elongation", # > 0.8 &]; c = ComponentMeasurements[{m, image}, "BoundingBox"]; ImageTrim[image, #] & /@ c[[All, 2]]


6

So basically ImageCapture[] is the hub where you set things which CurrentImage[] adoptes. Run ImageCapture[] and in-interface select the device - it is easier: Then run your code with CurrentImage[] - it will now pick up the external camera. Droste video-feedback effect you see in the images proves I'm not using my laptop camera in all this ;-) - not ...


3

According to an example here:ImageValue, you could use an extension of this perhaps: ImageValue[yourimage, Table[{i, i}, {i, .5, 10, 1}]]; This takes the values of the diagonal pixels in the image and outputs them as a list - you could then interpolate this for your intensity plot. Extending it to an arbitrary line shouldn't be too much of a leap!


9

Edit: I've included the code from Bresenham's line algorithm which is used to get positions of pixels of interest. Also couple of minor improvements added. Looking forward for any sugesstions :) img = ColorConvert[Import["http://newton.umsl.edu/run//nano/5102D120.png"], "Grayscale"] Deploy@With[{opt = Sequence[Frame -> True, ...


4

You could use ImageTransformation: img = ExampleData[{"TestImage", "Lena"}]; line = {{150.`, 406.`}, {271.`, 156.`}}; ImageTransformation[img, line[[1]] + #[[1]]*(line[[2]] - line[[1]]) &, {100, 1}, PlotRange -> {{0, 1}, {0, 1}}, DataRange -> Full] If you want raw pixel values instead of an image, use ImageData[transformResult][[1]], to get ...


5

I think this could be what you're looking for. First let's create a list of patches: img = ExampleData[{"TestImage", "Lena"}]; patches = ImagePartition[img, 256, {128, 128}] I'm not going to use ImageAssemble to put these back together. The trick is to create black and white masks, one for each patch. This is one example: And then to use ImageMultiply ...


2

ip = ImagePartition[ExampleData[{"TestImage", "Lena"}], 40, {10, 10}] ; ImageAssemble[Map[ImageCrop[#, {10, 10}] &, ip, {2}]]


4

Exporting .ico from Mathematica works fine in version 9.0.1. On Mac, the built-in function sips tells me that it only supports image sizes that are a power of 2. So you could try to create the desired file using this: Export["img.ico", img, ImageSize -> {256, 256}] where img is the image to be exported. However, in version 9.0.1 I'm able to export ...



Top 50 recent answers are included