Info

This question is closed. Reopen it to edit or answer.

Inconsistencies on a discrete surface?

1 view (last 30 days)
Don Crawford
Don Crawford on 3 Dec 2013
Closed: MATLAB Answer Bot on 20 Aug 2021
I am looking for a nudge in the right direction as to how to solve this problem.
I have data which defines a solid cylinder. The data is composed of a 3d internal radius and a thickness at each point in reference to a center axis (thickness is a separate data set from radius).
I am trying to write logic functions which describe inconsistencies in the data, such as holes (which would show up as sudden peaks through the total expected thickness), reductions in thickness (hills), whether the change begins internally or externally, or even increases in thickness (and whether it is internally or externally based on the expected surface).
I started out using differentials to compare slopes and set thresholds of what would be considered what I define.
Any good references or pushes in the right direction would be great!
Here is an example of the type of data and my logic. I have normalized the radius to expected so that any change from 0 is addition or reduction from the expected surface. Likewise for the thickness. For this example I am taking 12 measurements of a cross section of the cylinder. The cylinder has an expected thickness of 0.5.
internalRadius = [0,0,0,0.1,0.3,0.5,0.5,0.3,0.1,0,0,0]
Thickness = [0,0,0,-0.1,-0.3,-0.5,-0.5,-0.3,-0.1,0,0,0]
% So for this example, there is an internal hole.
internalRadius = [0,0,0,0,0,0.5,0.5,0,0,0,0,0]
Thickness = [0,0,0,-0.1,-0.3,-0.5,-0.5,-0.3,-0.1,0,0,0]
For this example, there is an external hole.
The data sets I am using are typically 100 x ~30000 x (-1 to +1)
Thanks to all that consider helping me.

Answers (1)

Image Analyst
Image Analyst on 6 Dec 2013
You could take the RMS value of the arrays. Best would be zero and anything greater than that is worse. You could also threshold the arrays and count (using bwlabel() if you have the Image Processing Toolbox) the number of times it exceeds the threshold. This is a "defect" count. Of course ideal would be zero and bigger numbers are worse. It kind of depends on what information you need to take the next step. What action would you take if you had a set of measurements characterizing how good or defective this can or cylinder is? Like, if there are more than 2 holes per can then you need to shut down your manufacturing line equipment and fix something?
  2 Comments
Don Crawford
Don Crawford on 3 Jan 2014
I am trying to come up with a better method for visualizing this damage so that there would be less damage misinterpreted.
Bwlabel() is interesting and could be good for flagging holes with complete penetration. I could use this to differiate types of damage. By using the two above arrays, setting a Bwlabel() for each: internal radius, external radius, and maybe thickness. And then using the flags to section out data the met a threshold for each.
Then set logic to use the results of Bwlabel() to create a new array...
Maybe something like this
Internal damage [0,0,0,0,0,0.5,1,0.5,0,0] and also for external damage, internal surface projections, external surface projections, and so one for each category of interpretation of the defects. Holes would just be flags.
Taking the RMS of both arrays, I don't think would result in a quantitative evaluation of what the change in radius and thickness. Normally I would say you could form a cylinder out of the two arrays and then subtract it from the expected cylinder. But because there is a degree of acceptable manufacturing variation, the expected cylinder is fuzzy. I need a function for synthesizing two example arrays based off of a mode. To speed up processing and simplify things, I could use just a window of data within the array to get this mode.
Best case final product would be a picture of the volume of damage, with internal colored different from external, with compensation for what happens with a hole.
This actually really helped. Thank you. Please respond with more!
Image Analyst
Image Analyst on 3 Jan 2014
I don't really have time now. In the meantime, you might be interested in this, which may be applicable once you massage your data into the proper form: http://www.mathworks.com/matlabcentral/fileexchange/35452-finddepressions

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!