Tag Info

New answers tagged

1

Well, since you bragged about computing power... Clear@findIntersections; findIntersections[polyGroup__] := Module[{reg}, reg = RegionIntersection[ Sequence @@ DiscretizeRegion[#, PerformanceGoal -> "Quality", Method -> "DiscretizeGraphics", AccuracyGoal -> 10, PrecisionGoal -> 10] & /@ polygons[[polyGroup]]]; ...


10

Here are some debugging ideas and a possible workaround. Note that for v10, I am using the Wolfram Programming Cloud, which as far as I can tell, is reproducing your results. Version specific specific problem Using this code: $HistoryLength = 0; i = Import["ExampleData/CTengine.tiff", "Image3D"]; oldMem = MemoryInUse[]; GaussianFilter[i, 5]; ...


1

ComponentMeasurements[] counts WHITE components: img = Import@"http://i.stack.imgur.com/OLjyi.jpg"; data8 = ColorNegate@Binarize@img; data12a = ComponentMeasurements[data8, "Count"] data13a = ComponentMeasurements[data8, "Area"] data12b = ComponentMeasurements[data8, "ConvexCount"] data13b = ComponentMeasurements[data8, "ConvexArea"] Range@5 /. data12a // ...


11

There are many different so called perceptual hash algorithms that can do the job, and fortunately at least some of them are easy to implement using Mathematica. This is my implementation of the algorithms described here. generateHash[img_, method_: "Average"] /; (method == "Average" || method == "pHash") := Module[ {resized, grayscale, mean, imgdata, ...


6

It's a good question. I do not have a real answer but this is too long for a comment. First, I'll assume that you want a probabilistic test to determine if a new submission is likely a slightly modified version of an older one. Let's say you are comparing just two. You probably don't need to test all frames of one against all frames of the other. I would ...


2

You may choose among many smoothing techniques. A way to do is using wavelets, which is not so different from my other answers 1 2. You can use those with minor changes in threshold type and value. However, you say there are two peeks and there should be one instead. It's up to you to decide which one is the right peak to find. Below, I choose the one on ...


3

Going further with my comment: peaks = FindPeaks[MedianFilter[data, 2]] (*{{1, 0.253492}, {389/2, 0.489684}, {377, 0.313048}}*) then you have 3 nice peaks. Instead of MedianFilter you can use LowpassFiler, MovingAverage, etc. - this won't disturb your data but will give you peaks positions.


2

This is not a complete answer, but I think you can build on this idea (I currently have no time to push it further). Considering that the lines are really vertical: imageData = ImageData[imgRaw]; data = Sum[First /@ imageData[[i]], {i, Length[imageData]}]; ListLinePlot[data] We can see that there are local minimums. I had no time to automate the ...


5

Well, you have two questions in one: (1) How to "take" the curve from the image into Mma? and (2) How to fit it?. Here I address the first question and give one possible solution aditional to the ones offered before. Some time ago I published a function copyCurve on this site, along with its detailed description. You can take it from there. Copy the ...


3

Here's something to get you started, (assembled from Andy Ross' code). Data points are extracted from a data series in an image. Your original image will need some editing in order to process each curve separately. The following tadpoles plot is used for example. img = Import@"http://www.biologycorner.com/resources/graph_tadpoles.JPG"; data = ...


5

As always in such cases, I would first try the most basic image processing approaches and see how far you come. Here, like in many other situations you can probably use a difference of Gaussian filters to get rid of the background variations and after this, you try to binarize your slightly smoothed images: Function[url, With[{img = Import[url]}, ...


6

im1 = Import["http://i.stack.imgur.com/78jWB.png"]; {cx, cy} = {50, 50}; cen = ComponentMeasurements[im1, "Centroid"][[All, 2]][[1]]; im2 = ImageForwardTransformation[im1, (# + {cx, cy} - cen) &, DataRange -> Full]; (* or ImageForwardTransformation[im1, TranslationTransform[{cx, cy}-cen], DataRange -> Full] *) im3 = ImageTransformation[im1, (# - ...


7

url = "http://i.stack.imgur.com/rM4LS.png"; img = MorphologicalBinarize@Import[url]; cornerslist = ImageCorners[img]; Show[ img2, ListPlot[ { cornerslist } , PlotStyle -> Red , PlotMarkers -> Automatic ] ] rectcorner = Join[ MinimalBy[cornerslist, First, 2], MaximalBy[cornerslist, First, 2] ] {{78.5, 46.5}, {79.5, ...


1

So this doesn't sit unanswered, here is revised code incorporating @nikies comment: I also fixed some bugs (unrelated to performance) in the original. i0 = ExampleData[{"TestImage", "Lena"}]; shift = {-10.1, 3.6}; (* {row,col} *) w = 80; h = 100; x0 = {220, 230};(*{row,col}*) small = ImageTake[ImageTransformation[i0, ...



Top 50 recent answers are included