8,898 reputation
22045
bio website
location Munich, Germany
age 35
visits member for 2 years, 2 months
seen 22 hours ago

I work at a small mechanical engineering company, where I develop software and image processing algorithms for camera-based inspection machines.


Nov
4
asked Is there a way to symbolically invert a piecewise function
Nov
4
answered Plot[ D[Sin[x]] ] and Evaluate[]
Nov
4
comment Selecting morphological components by clicking on them?
@belisarius: Try PixelValue[k, {232., 138.5}]. It should be 0 or 16, but it's 8. I guess you should round the coordinates before passing them to PixelValues. I wasn't aware of that either.
Nov
4
comment Selecting morphological components by clicking on them?
@MichaelE2: You're right! From the documentation: PixelValue gives the value of the pixel nearest to {x,y}, except that when the position {x,y} lies on a boundary between pixels, the average of the pixels surrounding {x,y} is returned.
Nov
4
comment Selecting morphological components by clicking on them?
You won't see a difference unless you position the locator right at the edge of a component. But you can try to get a pixel value of e.g. the Lena test image with these indices and with PixelValue, and you should get a different result.
Nov
4
comment Selecting morphological components by clicking on them?
I just copied your second example and replaced PixelValue[k, #] & /@ Dynamic@pts with Dynamic[PixelValue[k, pts]]. I didn't try any more than that.
Nov
4
comment Selecting morphological components by clicking on them?
I think your array indices are off by one, because coordinates start at 0 and indices start at 1. I always try to avoid these coordinate to array index conversions, because I never get them right, either.
Nov
4
comment Selecting morphological components by clicking on them?
Just nitpicking: PixelValue can take a list of points, as well as one point. So instead of map, you could just have written PixelValue[k, pts]
Nov
3
comment Selecting morphological components by clicking on them?
You can select a point in an image using LocatorPane, and your can use PixelValue to get the pixel value of an image at that point. If you call PixelValue on Image[MorphologicalComponents[binaryImage]], it'll give you the label index at that point. (Sorry, I don't have time for a full answer right now, but if you look at the documentation for these functions, you should be able to piece it together.)
Nov
2
comment How can I merge multiple sets of morphological components (perhaps selected using different metrics)?
Not that I know of. But you could always add the two images, binarize the result and use MorphologicalComponents to implement that.
Nov
2
answered How can I merge multiple sets of morphological components (perhaps selected using different metrics)?
Nov
2
comment How can I properly Partition “IntensityData” output from “ComponentMeasurements”? (Recovering the (x, y) dimensions of a rect. morph. component?)
@halirutan: He doesn't if his components are all rectangular (because of Method -> "BoundingBox"). Otherwise, you're right of course. I just wanted to show how BoundingBox and ImageTrim can work together and didn't want to complicate things with masking.
Nov
2
answered How can I properly Partition “IntensityData” output from “ComponentMeasurements”? (Recovering the (x, y) dimensions of a rect. morph. component?)
Nov
2
comment How can I properly Partition “IntensityData” output from “ComponentMeasurements”? (Recovering the (x, y) dimensions of a rect. morph. component?)
Use Partition on the returned IntensityData? I don't think so, because some lines might be longer than others. At least unless the components are all perfectly rectangular.
Nov
2
comment How can I properly Partition “IntensityData” output from “ComponentMeasurements”? (Recovering the (x, y) dimensions of a rect. morph. component?)
I think "IntensityData" is meant to be used for histogram processing, where the position of the intensities doesn't matter. Couldn't you just measure the "BoundingBox" instead and pass the result to ImageTrim to cut out the right area of the image? You can measure "Mask" to get a sparse array where the pixels of the component are set to 1. (I'm not sure what you're trying to achieve, I that's what I use when I need both the intensity and the location of the pixels in a component.)
Nov
1
answered Image correlation
Oct
30
comment I want to calculate the pixel values of an image and export to a standard format
+1, but don't do this for images from a typical megapixel camera. I regularly loose hours of unsaved work by doing just that...
Oct
30
revised I want to calculate the pixel values of an image and export to a standard format
added 174 characters in body
Oct
30
answered I want to calculate the pixel values of an image and export to a standard format
Oct
23
awarded  Good Answer